diff --git a/build.gradle b/build.gradle index 12b6984ff35..d4c9a31a241 100644 --- a/build.gradle +++ b/build.gradle @@ -327,7 +327,8 @@ artifacts { archives converterJar } -task copyToLibs(type: Copy) { +task copyToLibs(type: Copy, dependsOn:[startScripts,distTar,distZip,installDist]) { + mustRunAfter createExe into "$buildDir/libs" from configurations.runtimeClasspath } @@ -693,7 +694,7 @@ allprojects { } // https://youtrack.jetbrains.com/issue/KT-46165 tasks.withType(org.gradle.jvm.tasks.Jar) { - duplicatesStrategy = DuplicatesStrategy.WARN + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } tasks.withType(JavaExec) { jvmArgs += '--enable-preview' diff --git a/code/gradle/release.gradle b/code/gradle/release.gradle index 5dc467ce732..e46659e16fc 100644 --- a/code/gradle/release.gradle +++ b/code/gradle/release.gradle @@ -180,7 +180,7 @@ launch4j { downloadUrl = "https://jdk.java.net/" } -task layoutNsisOptional(type: Copy, dependsOn: copyToOutput) { +task layoutNsisOptional(type: Copy, dependsOn: [copyToOutput]) { description="Assemble the optional files for PCGen installations" into nsisOptionFolder @@ -408,14 +408,15 @@ task cleanNsis(type: Delete) { } -task sourcesJar(type: Jar, dependsOn: classes) { +task sourcesJar(type: Jar, dependsOn: [classes, copyToOutput, createExe, distTar, distZip, layoutNsisBase, + startScripts]) { + duplicatesStrategy DuplicatesStrategy.INCLUDE description = "build source jar file" - classifier = 'sources' + //classifier = 'sources' from sourceSets.main.allSource } -task assembleArtifacts(type: Copy, dependsOn: ['build', 'runtimeZip', 'sourcesJar', - 'buildNsis']) { +task assembleArtifacts(type: Copy, dependsOn: [build, runtimeZip, sourcesJar, buildNsis]) { description = "Create the release artifacts and get them into the release folder." into releaseDir // buildNsis puts the exe into the release folder directly