Gradle: in no optimization mode, generate JS, which is friendly to Chrome debugger

This commit is contained in:
Alexey Andreev 2023-07-31 15:13:02 +02:00
parent ef2e887d06
commit e1827880c9

View File

@ -18,6 +18,7 @@ package org.teavm.gradle.tasks;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;
import org.teavm.gradle.api.OptimizationLevel;
import org.teavm.tooling.TeaVMTargetType;
import org.teavm.tooling.builder.BuildStrategy;
@ -52,5 +53,8 @@ public abstract class GenerateJavaScriptTask extends TeaVMTask {
builder.setStrict(getStrict().get());
builder.setSourceMapsFileGenerated(getSourceMap().get());
builder.setEntryPointName(getEntryPointName().get());
if (getOptimization().get() == OptimizationLevel.NONE) {
builder.setMaxTopLevelNames(1000);
}
}
}