Don't configure the operations Java/JDK version if the project's Java release is not set
This commit is contained in:
parent
044e53ae24
commit
b29169213b
3 changed files with 13 additions and 6 deletions
|
@ -324,13 +324,17 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
*/
|
||||
public CompileKotlinOperation fromProject(BaseProject project) {
|
||||
project_ = project;
|
||||
return buildMainDirectory(project.buildMainDirectory())
|
||||
var op = buildMainDirectory(project.buildMainDirectory())
|
||||
.buildTestDirectory(project.buildTestDirectory())
|
||||
.compileMainClasspath(project.compileMainClasspath())
|
||||
.compileTestClasspath(project.compileTestClasspath())
|
||||
.mainSourceFiles(getKotlinFileList(new File(project.srcMainDirectory(), "kotlin")))
|
||||
.testSourceFiles(getKotlinFileList(new File(project.srcTestDirectory(), "kotlin")))
|
||||
.compileOptions(new CompileKotlinOptions().jdkRelease(project.javaRelease()));
|
||||
.testSourceFiles(getKotlinFileList(new File(project.srcTestDirectory(), "kotlin")));
|
||||
if (project.javaRelease() != null) {
|
||||
return op.compileOptions(new CompileKotlinOptions().jdkRelease(project.javaRelease()));
|
||||
}
|
||||
|
||||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue