aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-12-09 09:46:10 -0800
committerAndy Clement <aclement@pivotal.io>2016-12-09 09:46:10 -0800
commit3714f91628b7c83e2333895370b7b9a3a160a8a9 (patch)
treed6ead236b46ca8f86d7b2ab0f01ef6d996b431d4 /build
parent90aa179e2c0b2870d8678f8e9948bf631840c93b (diff)
downloadaspectj-3714f91628b7c83e2333895370b7b9a3a160a8a9.tar.gz
aspectj-3714f91628b7c83e2333895370b7b9a3a160a8a9.zip
fix warnings in build - support .isJava8 option in buildV1_8_10
Diffstat (limited to 'build')
-rw-r--r--build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java
index 379016a6f..107905231 100644
--- a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java
+++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java
@@ -224,15 +224,20 @@ public class AntBuilder extends Builder {
Path path = new Path(project);
boolean hasSourceDirectories = false;
boolean isJava5Compile = false;
+ boolean isJava8Compile = false;
for (File file: result.getSrcDirs()) {
// for (Iterator iter = result.getSrcDirs().iterator(); iter.hasNext();) {
// File file = (File) iter.next();
path.createPathElement().setLocation(file);
if (!isJava5Compile
- && (Util.Constants.JAVA5_SRC.equals(file.getName()) || Util.Constants.JAVA5_TESTSRC.equals(file.getName()) || new File(
- file.getParent(), ".isJava5").exists())) {
+ && (Util.Constants.JAVA5_SRC.equals(file.getName()) ||
+ Util.Constants.JAVA5_TESTSRC.equals(file.getName()) ||
+ new File(file.getParent(), ".isJava5").exists())) {
isJava5Compile = true;
}
+ if (new File(file.getParent(),".isJava8").exists()) {
+ isJava8Compile = true;
+ }
if (!hasSourceDirectories) {
hasSourceDirectories = true;
}
@@ -269,8 +274,13 @@ public class AntBuilder extends Builder {
javac.setTarget("1.1"); // 1.1 class files - Javac in 1.4 uses 1.4
javac.setSource("1.3");
} else {
- javac.setSource("1.7");
- javac.setTarget("1.7");
+ if (isJava8Compile) {
+ javac.setSource("1.8");
+ javac.setTarget("1.8");
+ } else {
+ javac.setSource("1.7");
+ javac.setTarget("1.7");
+ }
}
// compile
boolean passed = false;