From e899af0ad4e4c5325e662b03acbfb48d9cba6f7f Mon Sep 17 00:00:00 2001 From: anttil <anttil> Date: Tue, 18 Mar 2014 07:33:40 +0000 Subject: [PATCH] SWE-22 / SP-1216: Create source jars in all java projects SVN: 31158 --- gradle/javaproject.gradle | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/gradle/javaproject.gradle b/gradle/javaproject.gradle index 37a6b39fc7a..4e38ebaa3a5 100644 --- a/gradle/javaproject.gradle +++ b/gradle/javaproject.gradle @@ -3,6 +3,18 @@ apply plugin: 'project-report' evaluationDependsOnChildren() +configurations { + tests { + extendsFrom testRuntime + }, + sources, + ecj +} + +configurations.all { + resolutionStrategy.cacheChangingModulesFor 0, 'hours' +} + task wrapper(type: Wrapper) { gradleVersion = '1.8' distributionUrl = "http://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.8/gradle-1.8-all.zip" @@ -119,10 +131,6 @@ task sourceJar(type: Jar) { classifier "sources" } -configurations { - ecj -} - dependencies { ecj "eclipse:ecj:+" } @@ -165,10 +173,6 @@ processTestResources { fileMode=0666 } -configurations.all { - resolutionStrategy.cacheChangingModulesFor 0, 'hours' -} - apply plugin: 'eclipse' eclipse { @@ -191,14 +195,14 @@ task testJar(type: Jar, dependsOn: testClasses) { from sourceSets.test.output } -configurations { - tests { - extendsFrom testRuntime - } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource } artifacts { - tests testJar + tests testJar, + sources sourceJar } task compileDependencies(type: Copy) { -- GitLab