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
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="EntryPointsManager">
|
<component name="EntryPointsManager">
|
||||||
<pattern value="rife.bld.extension.CompileKotlinOperationBuild" method="pmd" />
|
<pattern value="rife.bld.extension.CompileKotlinOperationBuild" method="pmd" />
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
<option value="$PROJECT_DIR$/../bld-checkstyle/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../bld-checkstyle/config/pmd.xml" />
|
||||||
<option value="$PROJECT_DIR$/../bld-exec/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../bld-exec/config/pmd.xml" />
|
||||||
<option value="$PROJECT_DIR$/../bld-testng/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../bld-testng/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-generated-version/config/pmd.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
|
|
|
@ -324,13 +324,17 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
*/
|
*/
|
||||||
public CompileKotlinOperation fromProject(BaseProject project) {
|
public CompileKotlinOperation fromProject(BaseProject project) {
|
||||||
project_ = project;
|
project_ = project;
|
||||||
return buildMainDirectory(project.buildMainDirectory())
|
var op = buildMainDirectory(project.buildMainDirectory())
|
||||||
.buildTestDirectory(project.buildTestDirectory())
|
.buildTestDirectory(project.buildTestDirectory())
|
||||||
.compileMainClasspath(project.compileMainClasspath())
|
.compileMainClasspath(project.compileMainClasspath())
|
||||||
.compileTestClasspath(project.compileTestClasspath())
|
.compileTestClasspath(project.compileTestClasspath())
|
||||||
.mainSourceFiles(getKotlinFileList(new File(project.srcMainDirectory(), "kotlin")))
|
.mainSourceFiles(getKotlinFileList(new File(project.srcMainDirectory(), "kotlin")))
|
||||||
.testSourceFiles(getKotlinFileList(new File(project.srcTestDirectory(), "kotlin")))
|
.testSourceFiles(getKotlinFileList(new File(project.srcTestDirectory(), "kotlin")));
|
||||||
.compileOptions(new CompileKotlinOptions().jdkRelease(project.javaRelease()));
|
if (project.javaRelease() != null) {
|
||||||
|
return op.compileOptions(new CompileKotlinOptions().jdkRelease(project.javaRelease()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return op;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -227,9 +227,10 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
|
||||||
@Override
|
@Override
|
||||||
public DokkaOperation fromProject(BaseProject project) {
|
public DokkaOperation fromProject(BaseProject project) {
|
||||||
project_ = project;
|
project_ = project;
|
||||||
sourceSet_ = new SourceSet()
|
sourceSet_ = new SourceSet().src(new File(project.srcMainDirectory(), "kotlin").getAbsolutePath());
|
||||||
.src(new File(project.srcMainDirectory(), "kotlin").getAbsolutePath())
|
if (project.javaRelease() != null) {
|
||||||
.jdkVersion(project.javaRelease());
|
sourceSet_ = sourceSet_.jdkVersion(project.javaRelease());
|
||||||
|
}
|
||||||
moduleName_ = project.name();
|
moduleName_ = project.name();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue