Permalink
Browse files

Merge remote-tracking branch 'build/multi-project'

Conflicts:
	settings.gradle
  • Loading branch information...
2 parents f170a3e + 2b31d36 commit 8096fa5d5d183e020768865e3315eb98a58fbd97 Karthik Ranganathan committed Sep 11, 2012
Showing with 22 additions and 14 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 gradle/buildscript.gradle
  3. +5 −1 gradle/convention.gradle
  4. +12 −8 gradle/release.gradle
  5. +2 −4 settings.gradle
View
@@ -46,6 +46,8 @@ Thumbs.db
*/build
#
# # IntelliJ specific files/directories
+
+# IntelliJ specific files/directories
out
.idea
*.ipr
@@ -8,5 +8,5 @@ repositories {
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.0'
classpath 'com.mapvine:gradle-cobertura-plugin:0.1'
- classpath 'gradle-release:gradle-release:1.0pre'
+ classpath 'gradle-release:gradle-release:1.0-SNAPSHOT'
}
@@ -9,7 +9,7 @@ subprojects { project ->
sourceCompatibility = 1.6
// GRADLE-2087 workaround, perform after java plugin
- status = version.contains('-SNAPSHOT')?'snapshot':'release'
+ status = rootProject.status
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
@@ -21,6 +21,10 @@ subprojects { project ->
from javadoc.destinationDir
}
+ // Ensure output is on a new line
+ javadoc.doFirst { println "" }
+
+
artifacts {
archives sourcesJar
archives javadocJar
View
@@ -25,6 +25,8 @@ task uploadArtifactory(type: GradleBuild) {
startParameter.getExcludedTaskNames().add('check')
tasks = [ 'build', 'artifactoryPublish' ]
}
+task releaseArtifactory(dependsOn: [checkSnapshotDependencies, uploadArtifactory])
+
task buildWithArtifactory(type: GradleBuild) {
startParameter = project.gradle.startParameter.newInstance()
@@ -34,11 +36,11 @@ task buildWithArtifactory(type: GradleBuild) {
}
// Ensure upload happens before taggging but after all pre-checks
-uploadArtifactory.dependsOn checkSnapshotDependencies
-createReleaseTag.dependsOn uploadArtifactory
+releaseArtifactory.dependsOn checkSnapshotDependencies
+createReleaseTag.dependsOn releaseArtifactory
gradle.taskGraph.whenReady { taskGraph ->
- if ( taskGraph.hasTask(uploadArtifactory) && !taskGraph.hasTask(':release') ) {
- throw new GradleException('"release" task has to be run before uploading to Artifactory')
+ if ( taskGraph.hasTask(uploadArtifactory) && rootProject.status == 'release' && !taskGraph.hasTask(':release') ) {
+ throw new GradleException('"release" task has to be run before uploading a release to Artifactory')
}
}
subprojects.each { project ->
@@ -57,8 +59,10 @@ ext.'gradle.release.useAutomaticVersion' = "true"
release {
// http://tellurianring.com/wiki/gradle/release
- failOnCommitNeeded=false
- failOnPublishNeeded=false
- failOnUnversionedFiles=false
- failOnUpdateNeeded=false
+ failOnCommitNeeded=true
+ failOnPublishNeeded=true
+ failOnUnversionedFiles=true
+ failOnUpdateNeeded=true
+ includeProjectNameInTag=true
+ requireBranch = null
}
View
@@ -1,4 +1,2 @@
-include 'eureka-client'
-include 'eureka-server'
-include 'eureka-core'
-include 'eureka-resources'
+rootProject.name='eureka' // TEMPLATE: Change this
+include 'eureka-client','eureka-server','eureka-core','eureka-resources'

0 comments on commit 8096fa5

Please sign in to comment.