mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ant generation: IDEA-51623: custom compilers for tests are now running in test target
This commit is contained in:
@@ -76,7 +76,7 @@ public class CompileModuleChunkTarget extends CompositeGenerator {
|
||||
final Tag srcTag = new Tag("src", Pair.create("refid", BuildProperties.getSourcepathProperty(moduleChunkName)));
|
||||
myProductionTarget.add(new Mkdir(outputPathRef));
|
||||
createCustomCompilerTasks(project, moduleChunk, genOptions, false, customCompilers, compilerArgs, bootclasspathTag,
|
||||
classpathTag, compilerExcludes, srcTag, outputPathRef);
|
||||
classpathTag, compilerExcludes, srcTag, outputPathRef, myProductionTarget);
|
||||
if (customCompilers.length == 0 || genOptions.enableFormCompiler) {
|
||||
final Javac javac = new Javac(genOptions, moduleChunk, outputPathRef);
|
||||
javac.add(compilerArgs);
|
||||
@@ -98,7 +98,7 @@ public class CompileModuleChunkTarget extends CompositeGenerator {
|
||||
testClassPath.add(new PathElement(BuildProperties.propertyRef(BuildProperties.getOutputPathProperty(moduleChunkName))));
|
||||
myTestsTarget.add(new Mkdir(testOutputPathRef));
|
||||
createCustomCompilerTasks(project, moduleChunk, genOptions, true, customCompilers, compilerArgs, bootclasspathTag,
|
||||
testClassPath, compilerExcludes, srcTag, testOutputPathRef);
|
||||
testClassPath, compilerExcludes, srcTag, testOutputPathRef, myTestsTarget);
|
||||
if (customCompilers.length == 0 || genOptions.enableFormCompiler) {
|
||||
final Javac javac = new Javac(genOptions, moduleChunk, testOutputPathRef);
|
||||
javac.add(compilerArgs);
|
||||
@@ -132,6 +132,7 @@ public class CompileModuleChunkTarget extends CompositeGenerator {
|
||||
* @param compilerExcludes the compiler excluded tag
|
||||
* @param srcTag the soruce tag
|
||||
* @param outputPathRef the output path references
|
||||
* @param target the target where to add custom compiler
|
||||
*/
|
||||
private void createCustomCompilerTasks(Project project,
|
||||
ModuleChunk moduleChunk,
|
||||
@@ -143,13 +144,14 @@ public class CompileModuleChunkTarget extends CompositeGenerator {
|
||||
Tag classpathTag,
|
||||
PatternSetRef compilerExcludes,
|
||||
Tag srcTag,
|
||||
String outputPathRef) {
|
||||
String outputPathRef,
|
||||
Target target) {
|
||||
if (customCompilers.length > 1) {
|
||||
myProductionTarget.add(new Tag("fail", Pair.create("message", CompilerBundle.message(
|
||||
target.add(new Tag("fail", Pair.create("message", CompilerBundle.message(
|
||||
"generated.ant.build.compile.modules.fail.custom.comipilers"))));
|
||||
}
|
||||
for (ChunkCustomCompilerExtension ext : customCompilers) {
|
||||
ext.generateCustomCompile(project, moduleChunk, genOptions, compileTests, myProductionTarget, compilerArgs, bootclasspathTag,
|
||||
ext.generateCustomCompile(project, moduleChunk, genOptions, compileTests, target, compilerArgs, bootclasspathTag,
|
||||
classpathTag, compilerExcludes, srcTag, outputPathRef);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user