private void buildProfile(int kind, IProgressMonitor monitor, TeaVMProfile profile, ClassLoader classLoader)
throws CoreException {
if ((kind == AUTO_BUILD || kind == INCREMENTAL_BUILD) && !shouldBuild(profile)) {
return;
}
IStringVariableManager varManager = VariablesPlugin.getDefault().getStringVariableManager();
TeaVMTool tool = new TeaVMTool();
tool.setClassLoader(classLoader);
tool.setDebugInformationGenerated(profile.isDebugInformationGenerated());
tool.setSourceMapsFileGenerated(profile.isSourceMapsGenerated());
tool.setSourceFilesCopied(profile.isSourceFilesCopied());
String targetDir = profile.getTargetDirectory();
tool.setTargetDirectory(new File(varManager.performStringSubstitution(targetDir, false)));
tool.setTargetFileName(profile.getTargetFileName());
tool.setMinifying(profile.isMinifying());
tool.setRuntime(mapRuntime(profile.getRuntimeMode()));
tool.setMainClass(profile.getMainClass());
tool.getProperties().putAll(profile.getProperties());
tool.setIncremental(profile.isIncremental());
String cacheDir = profile.getCacheDirectory();
tool.setCacheDirectory(!cacheDir.isEmpty() ?
new File(varManager.performStringSubstitution(cacheDir, false)) : null);
for (ClassHolderTransformer transformer : instantiateTransformers(profile, classLoader)) {
tool.getTransformers().add(transformer);
}
for (Map.Entry<String, String> entry : profile.getClassAliases().entrySet()) {
ClassAlias classAlias = new ClassAlias();