Skip to content

Commit

Permalink
Merge branch '3.0.x' into 3.1.x
Browse files Browse the repository at this point in the history
Closes gh-36972
  • Loading branch information
snicoll committed Aug 14, 2023
2 parents 5764525 + cf27e3e commit 5f2432a
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
*
* @author Phillip Webb
* @author Scott Frederick
* @author Omar YAYA
* @since 3.0.0
*/
public abstract class AbstractAotMojo extends AbstractDependencyFilterMojo {
Expand Down Expand Up @@ -152,10 +153,16 @@ protected final void compileSourceFiles(URL[] classPath, File sourcesDirectory,
options.add(releaseVersion);
}
else {
options.add("--source");
options.add(compilerConfiguration.getSourceMajorVersion());
options.add("--target");
options.add(compilerConfiguration.getTargetMajorVersion());
String source = compilerConfiguration.getSourceMajorVersion();
if (source != null) {
options.add("--source");
options.add(source);
}
String target = compilerConfiguration.getTargetMajorVersion();
if (target != null) {
options.add("--target");
options.add(target);
}
}
options.addAll(new RunArguments(this.compilerArguments).getArgs());
Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromPaths(sourceFiles);
Expand Down

0 comments on commit 5f2432a

Please sign in to comment.