I'm a gradle newbie and have just started to move my projects over to gradle
0.9 Preview 3
I have the following in my master gradle file:
allprojects {
group = 'de.huxhorn.sulky'
version = '0.9.12'
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'project-reports'
sourceCompatibility = 1.5
targetCompatibility = 1.5
repositories {
mavenCentral()
}
dependencies {
testCompile libraries.junit
testCompile libraries.'slf4j-api'
testCompile libraries.'logback-classic'
}
jar {
manifest.attributes provider: 'gradle'
}
task release(dependsOn: [clean, build.taskDependencies]) << {
println 'Finished release.'
}
gradle.taskGraph.whenReady {taskGraph ->
if (!taskGraph.hasTask(release)) {
version = version+'-SNAPSHOT'
}
}
}
This should automatically append "-SNAPSHOT" to the version of my files if
release is not contained in the tasks. If I use "release" then it should
perform a clean build. The version part works but calling
gradle release
explodes since clean is executed after build.
gradle clean release
on the other hand, works.
What am I doing wrong?
Regards,
Joern.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email