From d97f68eec02b5cb76b62f2b0a2bbcb77e2fe0849 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Thu, 8 Oct 2020 11:49:05 +0200 Subject: [PATCH] Address review issues --- build.gradle.kts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index df23726f2..112f1500f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ + import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin import net.minecrell.gradle.licenser.LicenseExtension import net.minecrell.gradle.licenser.Licenser @@ -76,10 +77,14 @@ subprojects { } tasks { - named("clean") { - doFirst { - delete("../target") - } + // This is to create the target dir under the root project with all jars. + val assembleTargetDir = create("assembleTargetDirectory") { + destinationDir = rootDir.resolve("target") + into(destinationDir) + from(withType()) + } + named("build") { + dependsOn(assembleTargetDir) } } } @@ -106,7 +111,15 @@ allprojects { withJavadocJar() } + val javadocDir = rootDir.resolve("docs").resolve("javadoc").resolve(project.name) tasks { + named("clean") { + doFirst { + delete(rootDir.resolve("target")) + delete(javadocDir) + } + } + compileJava { options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000")) options.compilerArgs.add("-Xlint:all") @@ -124,6 +137,7 @@ allprojects { "implSpec:a:Implementation Requirements:", "implNote:a:Implementation Note:" ) + opt.destinationDirectory = javadocDir } shadowJar {