Added configuring the Java/JDK version from the project

This commit is contained in:
Erik C. Thauvin 2023-11-11 22:18:14 -08:00
parent 8597447422
commit 044e53ae24
2 changed files with 8 additions and 3 deletions

View file

@ -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;
}