diff --git a/gradle/javaproject.gradle b/gradle/javaproject.gradle index f51078a30d3530f6699ff2424af0d8f63bcb97b7..09367092a1b1c32a92815ae73efb89106734a39b 100644 --- a/gradle/javaproject.gradle +++ b/gradle/javaproject.gradle @@ -192,27 +192,19 @@ task testJar(type: Jar, dependsOn: testClasses) { from sourceSets.test.output } -jar { - doLast { - tasks.sourcesJar.execute() - } -} - task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allSource - - doLast { - tasks.sourceJarForEclipseLaunchConfigs.execute() - } } -task sourceJarForEclipseLaunchConfigs(type: Copy) { +task sourceJarForEclipseLaunchConfigs(type: Copy, dependsOn: sourcesJar) { into sourcesJar.destinationDir from sourcesJar.archivePath rename '.*', 'sources.jar' } +jar.dependsOn sourceJarForEclipseLaunchConfigs + artifacts { tests testJar }