Never minify TeaVM output in Eclipse builder

This commit is contained in:
Alexey Andreev 2018-01-10 00:06:55 +03:00
parent 09d857f572
commit 02f61b5d50
5 changed files with 2 additions and 34 deletions

View File

@ -88,7 +88,7 @@ public class TeaVMProjectConfigurator extends AbstractProjectConfigurator {
private void configureProfile(MojoExecution execution, TeaVMProfile profile, IProgressMonitor monitor)
throws CoreException {
monitor.beginTask("Configuring profile " + profile.getName(), 120);
monitor.beginTask("Configuring profile " + profile.getName(), 110);
String buildDir = getProjectBuildDirectory();
String mainClass = maven.getMojoParameterValue(mavenSession, execution, "mainClass", String.class);
@ -104,10 +104,6 @@ public class TeaVMProjectConfigurator extends AbstractProjectConfigurator {
profile.setTargetFileName(targetFileName != null ? targetFileName : "classes.js");
monitor.worked(10);
Boolean minifying = maven.getMojoParameterValue(mavenSession, execution, "minifying", Boolean.class);
profile.setMinifying(minifying != null ? minifying : true);
monitor.worked(10);
String runtime = maven.getMojoParameterValue(mavenSession, execution, "runtime", String.class);
profile.setRuntimeMode(runtime != null ? getRuntimeMode(runtime) : TeaVMRuntimeMode.SEPARATE);
monitor.worked(10);

View File

@ -93,7 +93,6 @@ public class PreferencesBasedTeaVMProjectSettings implements TeaVMProjectSetting
profile.setEnabled(true);
profile.setTargetDirectory(varManager.generateVariableExpression("workspace_loc", "/" + projectName));
profile.setTargetFileName("classes.js");
profile.setMinifying(true);
profile.setIncremental(false);
profile.setCacheDirectory(varManager.generateVariableExpression("workspace_loc", "/" + projectName));
profile.setSourceMapsGenerated(true);
@ -156,7 +155,6 @@ public class PreferencesBasedTeaVMProjectSettings implements TeaVMProjectSetting
private String mainClass;
private String targetDirectory;
private String targetFileName;
private boolean minifying;
private TeaVMRuntimeMode runtimeMode = TeaVMRuntimeMode.SEPARATE;
private boolean incremental;
private String cacheDirectory;
@ -224,16 +222,6 @@ public class PreferencesBasedTeaVMProjectSettings implements TeaVMProjectSetting
this.targetFileName = targetFileName;
}
@Override
public boolean isMinifying() {
return minifying;
}
@Override
public void setMinifying(boolean minifying) {
this.minifying = minifying;
}
@Override
public TeaVMRuntimeMode getRuntimeMode() {
return runtimeMode;
@ -344,7 +332,6 @@ public class PreferencesBasedTeaVMProjectSettings implements TeaVMProjectSetting
mainClass = preferences.get(MAIN_CLASS, "");
targetDirectory = preferences.get(TARGET_DIRECTORY, "");
targetFileName = preferences.get(TARGET_FILE_NAME, "");
minifying = preferences.getBoolean(MINIFYING, true);
runtimeMode = TeaVMRuntimeMode.valueOf(preferences.get(RUNTIME, TeaVMRuntimeMode.SEPARATE.name()));
incremental = preferences.getBoolean(INCREMENTAL, false);
cacheDirectory = preferences.get(CACHE_DIRECTORY, "");
@ -370,7 +357,6 @@ public class PreferencesBasedTeaVMProjectSettings implements TeaVMProjectSetting
preferences.put(MAIN_CLASS, mainClass);
preferences.put(TARGET_DIRECTORY, targetDirectory);
preferences.put(TARGET_FILE_NAME, targetFileName);
preferences.putBoolean(MINIFYING, minifying);
preferences.put(RUNTIME, runtimeMode.name());
preferences.putBoolean(INCREMENTAL, incremental);
preferences.put(CACHE_DIRECTORY, cacheDirectory);

View File

@ -39,10 +39,6 @@ public interface TeaVMProfile {
void setTargetFileName(String targetFileName);
boolean isMinifying();
void setMinifying(boolean minifying);
TeaVMRuntimeMode getRuntimeMode();
void setRuntimeMode(TeaVMRuntimeMode runtimeMode);

View File

@ -151,7 +151,7 @@ public class TeaVMProjectBuilder extends IncrementalProjectBuilder {
String targetDir = profile.getTargetDirectory();
tool.setTargetDirectory(new File(varManager.performStringSubstitution(targetDir, false)));
tool.setTargetFileName(profile.getTargetFileName());
tool.setMinifying(profile.isMinifying());
tool.setMinifying(false);
tool.setRuntime(mapRuntime(profile.getRuntimeMode()));
tool.setMainClass(profile.getMainClass());
tool.getProperties().putAll(profile.getProperties());

View File

@ -79,7 +79,6 @@ public class TeaVMProfileDialog extends Dialog {
private Button targetDirectoryWorkspaceButton;
private Button targetDirectoryFileSystemButton;
private Text targetFileNameField;
private Button minifyingButton;
private Combo runtimeField;
private Button incrementalButton;
private Text cacheDirectoryField;
@ -178,7 +177,6 @@ public class TeaVMProfileDialog extends Dialog {
createTargetDirectoryField(group);
createTargetFileNameField(group);
createRuntimeField(group);
createMinifyField(group);
}
private void createIncrementalGroup(Composite parent) {
@ -438,12 +436,6 @@ public class TeaVMProfileDialog extends Dialog {
runtimeField.add("don't attach");
}
private void createMinifyField(Composite container) {
minifyingButton = new Button(container, SWT.CHECK);
minifyingButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
minifyingButton.setText("generate minified (&obfuscated) code");
}
private void createIncrementalField(Composite container) {
incrementalButton = new Button(container, SWT.CHECK);
incrementalButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
@ -634,7 +626,6 @@ public class TeaVMProfileDialog extends Dialog {
mainClassField.setText(profile.getMainClass() != null ? profile.getMainClass() : "");
targetDirectoryField.setText(profile.getTargetDirectory());
targetFileNameField.setText(profile.getTargetFileName());
minifyingButton.setSelection(profile.isMinifying());
runtimeField.select(runtimeModes.indexOf(profile.getRuntimeMode()));
incrementalButton.setSelection(profile.isIncremental());
cacheDirectoryField.setText(profile.getCacheDirectory());
@ -672,7 +663,6 @@ public class TeaVMProfileDialog extends Dialog {
profile.setMainClass(!mainClass.isEmpty() ? mainClass : null);
profile.setTargetDirectory(targetDirectoryField.getText());
profile.setTargetFileName(targetFileNameField.getText().trim());
profile.setMinifying(minifyingButton.getSelection());
profile.setRuntimeMode(runtimeModes.get(runtimeField.getSelectionIndex()));
profile.setIncremental(incrementalButton.getSelection());
profile.setCacheDirectory(cacheDirectoryField.getText());