Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Upgrade build to Gradle m9.

Conflicts:

	build.gradle
  • Loading branch information...
commit 4af6e82e65ffc5c60c72f0986f9db3c261d0ac2e 1 parent 7ddbe0b
Luke Daley alkemist authored
96 build.gradle
@@ -13,51 +13,53 @@ buildscript {
13 13
14 14 apply plugin: 'idea'
15 15
16   -grailsVersion = '2.0.2.BUILD-SNAPSHOT'
17   -antTraxVersion = "1.7.1"
18   -antVersion = "1.8.2"
19   -aspectjVersion = "1.6.10"
20   -commonsBeanUtilsVersion = "1.8.3"
21   -commonsCliVersion = "1.2"
22   -commonsCollectionsVersion = "3.2.1"
23   -commonsIOVersion = "2.1"
24   -commonsLangVersion = "2.6"
25   -datastoreVersion = "1.0.3.BUILD-SNAPSHOT"
26   -gantVersion = "1.9.6"
27   -gdocEngineVersion = "1.0.1"
28   -groovyVersion = "1.8.6"
29   -gradleGroovyVersion = groovyVersion
30   -gradleGroovyVersion = "1.8.2"
31   -ivyVersion = "2.2.0"
32   -jansiVersion = "1.2.1"
33   -jlineVersion = "1.0"
34   -jnaVersion = "3.2.3"
35   -slf4jVersion = "1.6.2"
36   -springLoadedVersion = "1.0.4"
37   -springVersion = "3.1.0.RELEASE"
38   -springWebflowVersion= "2.0.8.RELEASE"
39   -hibernateVersion = "3.6.8.Final"
40   -ehcacheVersion = "2.4.6"
41   -junitVersion = "4.10"
42   -concurrentlinkedhashmapVersion = "1.2_jdk5"
43   -
44   -archivesBaseName = 'grails'
45   -version = grailsVersion
  16 +ext {
  17 + grailsVersion = '2.0.2.BUILD-SNAPSHOT'
  18 + antTraxVersion = "1.7.1"
  19 + antVersion = "1.8.2"
  20 + aspectjVersion = "1.6.10"
  21 + commonsBeanUtilsVersion = "1.8.3"
  22 + commonsCliVersion = "1.2"
  23 + commonsCollectionsVersion = "3.2.1"
  24 + commonsIOVersion = "2.1"
  25 + commonsLangVersion = "2.6"
  26 + datastoreVersion = "1.0.3.BUILD-SNAPSHOT"
  27 + gantVersion = "1.9.6"
  28 + gdocEngineVersion = "1.0.1"
  29 + groovyVersion = "1.8.6"
  30 + gradleGroovyVersion = groovyVersion
  31 + gradleGroovyVersion = "1.8.2"
  32 + ivyVersion = "2.2.0"
  33 + jansiVersion = "1.2.1"
  34 + jlineVersion = "1.0"
  35 + jnaVersion = "3.2.3"
  36 + slf4jVersion = "1.6.2"
  37 + springLoadedVersion = "1.0.4"
  38 + springVersion = "3.1.0.RELEASE"
  39 + springWebflowVersion= "2.0.8.RELEASE"
  40 + hibernateVersion = "3.6.8.Final"
  41 + ehcacheVersion = "2.4.6"
  42 + junitVersion = "4.10"
  43 + concurrentlinkedhashmapVersion = "1.2_jdk5"
  44 +}
46 45
47 46 // directories created during the build which are related
48 47 // to turning the workspace root into a GRAILS_HOME
49   -homeDistDir = file("dist")
50   -homeBinDir = file("bin")
51   -homeConfDir = file("conf")
52   -homeDslSupportDir = file("dsl-support")
53   -homeLibDir = file("lib")
54   -homeSrcDir = file("src")
  48 +ext {
  49 + homeDistDir = file("dist")
  50 + homeBinDir = file("bin")
  51 + homeConfDir = file("conf")
  52 + homeDslSupportDir = file("dsl-support")
  53 + homeLibDir = file("lib")
  54 + homeSrcDir = file("src")
  55 +}
55 56
56 57 // Groovy is added as a dependency to both the 'groovy' and 'compile'
57 58 // configurations, so place the dependency in a shared variable. The
58 59 // 'compile' is required so that Groovy appears as a dependency in the
59 60 // artifacts' POMs.
60   -jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
  61 +ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
  62 +ext.groovyDependency = null
61 63 if (jointBuildGroovyJarProperty) {
62 64 jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
63 65 if (jointBuildGroovyJar.exists()) {
@@ -118,7 +120,7 @@ subprojects { project ->
118 120 version = grailsVersion
119 121 group = "org.grails"
120 122
121   - isCiBuild = project.hasProperty("isCiBuild")
  123 + ext.isCiBuild = project.hasProperty("isCiBuild")
122 124
123 125 manifest.mainAttributes(
124 126 "Built-By": System.properties['user.name'],
@@ -220,7 +222,7 @@ subprojects { project ->
220 222 authentication(userName: username, password: password)
221 223 }
222 224 }
223   - project.deployer = mavenDeployer {
  225 + project.ext.deployer = mavenDeployer {
224 226 beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
225 227
226 228 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
@@ -280,13 +282,15 @@ subprojects { project ->
280 282 The pom argument is of the following type:
281 283 http://maven.apache.org/ref/2.2.1/maven-model/apidocs/org/apache/maven/model/Model.html
282 284 */
283   - project.poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
284   - project.pomModifications = []
285   - project.modifyPom = { Closure modification -> project.pomModifications << modification }
286   - project.poms*.whenConfigured {
287   - project.pomModifications*.call(it)
  285 + ext {
  286 + poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
  287 + pomModifications = []
  288 + modifyPom = { Closure modification -> project.pomModifications << modification }
  289 + poms*.whenConfigured {
  290 + pomModifications*.call(it)
  291 + }
288 292 }
289   -
  293 +
290 294 // Remove any dependencies that shouldn't be included in the POM
291 295 modifyPom { pom ->
292 296 configurations.runtime.allDependencies.each { dependency ->
@@ -319,5 +323,5 @@ apply {
319 323 }
320 324
321 325 task wrapper(type: Wrapper) {
322   - gradleVersion "1.0-milestone-7"
  326 + gradleVersion "1.0-milestone-9"
323 327 }
2  buildSrc/src/main/groovy/org/grails/gradle/GrailsBuildPlugin.groovy
@@ -17,7 +17,7 @@ class GrailsBuildPlugin implements Plugin<Project> {
17 17
18 18 // Add utility for getting sources, returns a configuration containing the source jar versions
19 19 // of the dependencies in the given configuration(s)
20   - project.sourcesFor = { configurations ->
  20 + project.ext.sourcesFor = { configurations ->
21 21
22 22 // We can't use varargs for the closure signature due to an issue in the mixin mechanism in this
23 23 // version of Gradle.
31 gradle/assemble.gradle
@@ -47,9 +47,6 @@ task populateDependencies(type: Sync) {
47 47 into homeLibDir
48 48 includeEmptyDirs = false
49 49
50   - grailsRepoCacheHash = "a5610c5703557b062da6cb64b3488b38"
51   - eachFile { file -> file.path -= "$grailsRepoCacheHash/" }
52   -
53 50 // Only configure this task if we are indeed going to run it because it forces a resolution of all of the subproject
54 51 // dependencies which is very costly and we want to avoid it if we aren't going to run this task. Because we do this
55 52 // after the task graph is ready we have to add the explicit dependency on the configurations as per above.
@@ -57,24 +54,24 @@ task populateDependencies(type: Sync) {
57 54 if (taskGraph.hasTask(':populateDependencies')) {
58 55 def projectNames = rootProject.subprojects*.name
59 56
60   - baseCacheDir = "$gradle.gradleUserHomeDir/caches"
61   - versionedCacheDir = "$baseCacheDir/artifacts-7/artifacts"
  57 + ext.baseCachesDir = "$gradle.gradleUserHomeDir/caches"
  58 + ext.cacheDir = "$baseCachesDir/artifacts-8"
  59 + ext.metadata = "$cacheDir/module-metadata"
  60 + ext.filestore = "$cacheDir/filestore"
62 61
63   - from versionedCacheDir
64 62 libsConfigurations.each { configuration ->
65 63 configuration.resolvedConfiguration.resolvedArtifacts.each { artifact ->
66 64 def dependency = artifact.moduleVersion.id
67   -
68   - // Force the download of the binary artifact
69   - // Gradle 1.0-milestone-7 will get the file until this is called with the way
70   - // we are using the API.
71   - artifact.file
  65 + into("$dependency.group/$dependency.name/jars") {
  66 + from artifact.file // this will trigger the actual download if necessary
  67 + }
72 68
73 69 if (!projectNames.contains(dependency.name)) {
74   - def base = "${grailsRepoCacheHash}/${dependency.group}/${dependency.name}/${dependency.version}"
75   - include "${base}/*-${dependency.version}.*"
76   - include "${base}/jar/${dependency.name}-${dependency.version}.jar"
77   - include "${base}/bundle/${dependency.name}-${dependency.version}.jar"
  70 + def base = "${dependency.group}/${dependency.name}/${dependency.version}"
  71 + from ("${metadata}/${base}") {
  72 + include "*.ivy.xml"
  73 + eachFile { it.path = "$dependency.group/$dependency.name/ivy-${dependency.version}.xml" }
  74 + }
78 75 }
79 76 }
80 77 }
@@ -92,7 +89,7 @@ task sourcesJars(type: Sync) {
92 89 }
93 90
94 91 task pluginsFromSvn {
95   - plugins = [
  92 + ext.plugins = [
96 93 hibernate: grailsVersion,
97 94 tomcat: grailsVersion,
98 95 resources: "1.1.6",
@@ -100,7 +97,7 @@ task pluginsFromSvn {
100 97 jquery: "1.7.1"
101 98 ]
102 99
103   - dir = file("$buildDir/pluginsFromSvn")
  100 + ext.dir = file("$buildDir/pluginsFromSvn")
104 101 outputs.files { dir.listFiles().findAll { it.name.endsWith(".zip") } }
105 102 doFirst {
106 103 ant {
4 gradle/docs.gradle
@@ -3,7 +3,7 @@
3 3 * This target generates a set of stubs for the Groovy sources
4 4 */
5 5 task stubs {
6   - destinationDir = "$buildDir/docs/stubs"
  6 + ext.destinationDir = "$buildDir/docs/stubs"
7 7 doFirst {
8 8 def isolatedAnt = services.get(org.gradle.api.internal.project.IsolatedAntBuilder)
9 9 isolatedAnt.execute {
@@ -39,7 +39,7 @@ task stubs {
39 39 }
40 40
41 41 task docs {
42   - destinationDir = file("${projectDir}/doc")
  42 + ext.destinationDir = file("${projectDir}/doc")
43 43 }
44 44
45 45 task javadoc(type:Javadoc) {
BIN  gradle/wrapper/gradle-wrapper.jar
Binary file not shown
4 gradle/wrapper/gradle-wrapper.properties
... ... @@ -1,6 +1,6 @@
1   -#Fri Jan 06 12:36:13 GMT 2012
  1 +#Tue Mar 27 15:46:39 BST 2012
2 2 distributionBase=GRADLE_USER_HOME
3 3 distributionPath=wrapper/dists
4 4 zipStoreBase=GRADLE_USER_HOME
5 5 zipStorePath=wrapper/dists
6   -distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-7-bin.zip
  6 +distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-9-bin.zip
2  grails-core/build.gradle
@@ -54,7 +54,7 @@ dependencies {
54 54 }
55 55
56 56 compile ("com.springsource.springloaded:springloaded-core:$springLoadedVersion") {
57   - notInPom = true
  57 + ext.notInPom = true
58 58 }
59 59
60 60 compile "org.springframework:spring-tx:${springVersion}"
2  grails-hibernate/build.gradle
@@ -56,7 +56,7 @@ dependencies {
56 56 compile ("org.hibernate:hibernate-core:$hibernateVersion") {
57 57 exclude group: 'commons-logging', module:'commons-logging'
58 58 exclude group: 'commons-collections', module:'commons-collections'
59   - exclude group: 'antlr', model: 'antlr'
  59 + exclude group: 'antlr', module: 'antlr'
60 60 }
61 61 compile 'javassist:javassist:3.12.0.GA'
62 62 compile 'javax.transaction:jta:1.1'
36 grails-resources/build.gradle
... ... @@ -1,7 +1,7 @@
1 1 task createSharedFilesJar(type: Jar, description: 'Package up the files that are shared by both applications and plugins.') {
2 2 version = null
3 3 appendix = "shared-files"
4   - appFileJar = true
  4 + ext.appFileJar = true
5 5 from("src/war/WEB-INF") {
6 6 into "web-app/WEB-INF"
7 7 include "applicationContext.xml", "sitemesh.xml", "tld/*.tld"
@@ -15,7 +15,7 @@ task createSharedFilesJar(type: Jar, description: 'Package up the files that are
15 15 task createSharedApplicationFilesJar(type: Jar, description: 'Package up the files that are exclusive to applications.') {
16 16 version = null
17 17 appendix = "app-files"
18   - appFileJar = true
  18 + ext.appFileJar = true
19 19 from("src/war") {
20 20 into "web-app"
21 21 exclude "WEB-INF/**"
@@ -29,7 +29,7 @@ task createSharedApplicationFilesJar(type: Jar, description: 'Package up the fil
29 29 task createSharedPluginFilesJar(type: Jar, description: 'Package up the files that are exclusive to plugins.') {
30 30 version = null
31 31 appendix = "plugin-files"
32   - appFileJar = true
  32 + ext.appFileJar = true
33 33 from("src/grails/templates/plugins")
34 34 from("src/grails") {
35 35 include "grails-app/views/error.gsp"
@@ -40,27 +40,23 @@ task createSharedPluginFilesJar(type: Jar, description: 'Package up the files th
40 40 task createIntegrationFilesJar(type: Jar, description: 'Files to integrate Grails with IDEs and build systems.') {
41 41 version = null
42 42 appendix = "integration-files"
43   - appFileJar = true
  43 + ext.appFileJar = true
44 44 from("src/grails/templates/ide-support", "src/grails/ant")
45 45 }
46 46
47   -allJarFileTasks = [createSharedFilesJar,createSharedApplicationFilesJar,createSharedPluginFilesJar,createIntegrationFilesJar]
48   -task resourceJarFiles(dependsOn:allJarFileTasks)
  47 +ext.allJarFileTasks = tasks.matching { it.hasProperty("appFileJar") }
  48 +task resourceJarFiles(dependsOn: allJarFileTasks)
49 49
50   -
51   -jar.dependsOn resourceJarFiles
52   -
53   -for (jarTask in allJarFileTasks) {
54   - jar.from(jarTask.archivePath)
55   -}
56   -
57   -jar.from("src/war") {
58   - into "src/war"
59   - include "WEB-INF/**"
60   - exclude 'WEB-INF/tld/grails.tld', 'WEB-INF/tld/spring.tld'
61   -}
62   -jar.from("src/grails/templates") {
63   - into "src/grails/templates"
  50 +jar {
  51 + from allJarFileTasks
  52 + from("src/war") {
  53 + into "src/war"
  54 + include "WEB-INF/**"
  55 + exclude 'WEB-INF/tld/grails.tld', 'WEB-INF/tld/spring.tld'
  56 + }
  57 + from("src/grails/templates") {
  58 + into "src/grails/templates"
  59 + }
64 60 }
65 61
66 62 jar.appendix = 'resources'

0 comments on commit 4af6e82

Please sign in to comment.
Something went wrong with that request. Please try again.