提交 26d0db53 authored 作者: Thomas Mueller's avatar Thomas Mueller

Build: support target version

上级 a5051304
...@@ -105,7 +105,7 @@ public class Build extends BuildBase { ...@@ -105,7 +105,7 @@ public class Build extends BuildBase {
File.pathSeparator + "src/main"); File.pathSeparator + "src/main");
String version = getTargetJavaVersion(); String version = getTargetJavaVersion();
if (version != null) { if (version != null) {
args = args.plus("-target", version); args = args.plus("-target", version, "-source", version);
} }
javac(args, files); javac(args, files);
} }
...@@ -187,7 +187,7 @@ public class Build extends BuildBase { ...@@ -187,7 +187,7 @@ public class Build extends BuildBase {
} }
String version = getTargetJavaVersion(); String version = getTargetJavaVersion();
if (version != null) { if (version != null) {
args = args.plus("-target", version); args = args.plus("-target", version, "-source", version);
} }
javac(args, files); javac(args, files);
} }
...@@ -224,7 +224,7 @@ public class Build extends BuildBase { ...@@ -224,7 +224,7 @@ public class Build extends BuildBase {
} }
String version = getTargetJavaVersion(); String version = getTargetJavaVersion();
if (version != null) { if (version != null) {
args = args.plus("-target", version); args = args.plus("-target", version, "-source", version);
} }
javac(args, files); javac(args, files);
...@@ -238,7 +238,7 @@ public class Build extends BuildBase { ...@@ -238,7 +238,7 @@ public class Build extends BuildBase {
"-d", "temp", "-sourcepath", "src/test" + File.pathSeparator + "src/tools", "-d", "temp", "-sourcepath", "src/test" + File.pathSeparator + "src/tools",
"-classpath", classpath); "-classpath", classpath);
if (version != null) { if (version != null) {
args = args.plus("-target", version); args = args.plus("-target", version, "-source", version);
} }
javac(args, files); javac(args, files);
files = files("src/test"). files = files("src/test").
...@@ -964,7 +964,7 @@ public class Build extends BuildBase { ...@@ -964,7 +964,7 @@ public class Build extends BuildBase {
File.pathSeparator + "src/test" + File.pathSeparator + "src/main"); File.pathSeparator + "src/test" + File.pathSeparator + "src/main");
String version = getTargetJavaVersion(); String version = getTargetJavaVersion();
if (version != null) { if (version != null) {
args = args.plus("-target", version); args = args.plus("-target", version, "-source", version);
} }
javac(args, files); javac(args, files);
String cp = "bin" + File.pathSeparator + "temp" + String cp = "bin" + File.pathSeparator + "temp" +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论