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 #mainSourceFiles() mainSourceFiles}</li>
|
||||
* <li>{@link #testSourceFiles() testSourceFile}</li>
|
||||
* <li>{@link CompileKotlinOptions#jdkRelease jdkRelease}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param project the project to configure the compile operation from
|
||||
|
@ -328,7 +329,8 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
.compileMainClasspath(project.compileMainClasspath())
|
||||
.compileTestClasspath(project.compileTestClasspath())
|
||||
.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}.
|
||||
* <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
|
||||
*/
|
||||
@Override
|
||||
public DokkaOperation fromProject(BaseProject 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();
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue