Added configuring the Java/JDK version from the project
This commit is contained in:
parent
8597447422
commit
044e53ae24
2 changed files with 8 additions and 3 deletions
|
@ -317,6 +317,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
* <li>{@link #compileTestClasspath() compilesTestClassPath}</li>
|
* <li>{@link #compileTestClasspath() compilesTestClassPath}</li>
|
||||||
* <li>{@link #mainSourceFiles() mainSourceFiles}</li>
|
* <li>{@link #mainSourceFiles() mainSourceFiles}</li>
|
||||||
* <li>{@link #testSourceFiles() testSourceFile}</li>
|
* <li>{@link #testSourceFiles() testSourceFile}</li>
|
||||||
|
* <li>{@link CompileKotlinOptions#jdkRelease jdkRelease}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param project the project to configure the compile operation from
|
* @param project the project to configure the compile operation from
|
||||||
|
@ -328,7 +329,8 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
.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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -219,14 +219,17 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
|
||||||
/**
|
/**
|
||||||
* Configures the operation from a {@link BaseProject}.
|
* Configures the operation from a {@link BaseProject}.
|
||||||
* <p>
|
* <p>
|
||||||
* Sets the {@link #sourceSet sourceSet} and {@link #moduleName moduleName} from the project.
|
* Sets the {@link #sourceSet sourceSet}, {@link SourceSet#jdkVersion jdkVersion} and {@link #moduleName moduleName}
|
||||||
|
* from the project.
|
||||||
*
|
*
|
||||||
* @param project the project to configure the operation from
|
* @param project the project to configure the operation from
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public DokkaOperation fromProject(BaseProject project) {
|
public DokkaOperation fromProject(BaseProject project) {
|
||||||
project_ = project;
|
project_ = project;
|
||||||
sourceSet_ = new SourceSet().src(new File(project.srcMainDirectory(), "kotlin").getAbsolutePath());
|
sourceSet_ = new SourceSet()
|
||||||
|
.src(new File(project.srcMainDirectory(), "kotlin").getAbsolutePath())
|
||||||
|
.jdkVersion(project.javaRelease());
|
||||||
moduleName_ = project.name();
|
moduleName_ = project.name();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue