Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrade build to Gradle m9.

Conflicts:

	build.gradle
  • Loading branch information...
commit 4af6e82e65ffc5c60c72f0986f9db3c261d0ac2e 1 parent 7ddbe0b
Luke Daley alkemist authored
96 build.gradle
View
@@ -13,51 +13,53 @@ buildscript {
apply plugin: 'idea'
-grailsVersion = '2.0.2.BUILD-SNAPSHOT'
-antTraxVersion = "1.7.1"
-antVersion = "1.8.2"
-aspectjVersion = "1.6.10"
-commonsBeanUtilsVersion = "1.8.3"
-commonsCliVersion = "1.2"
-commonsCollectionsVersion = "3.2.1"
-commonsIOVersion = "2.1"
-commonsLangVersion = "2.6"
-datastoreVersion = "1.0.3.BUILD-SNAPSHOT"
-gantVersion = "1.9.6"
-gdocEngineVersion = "1.0.1"
-groovyVersion = "1.8.6"
-gradleGroovyVersion = groovyVersion
-gradleGroovyVersion = "1.8.2"
-ivyVersion = "2.2.0"
-jansiVersion = "1.2.1"
-jlineVersion = "1.0"
-jnaVersion = "3.2.3"
-slf4jVersion = "1.6.2"
-springLoadedVersion = "1.0.4"
-springVersion = "3.1.0.RELEASE"
-springWebflowVersion= "2.0.8.RELEASE"
-hibernateVersion = "3.6.8.Final"
-ehcacheVersion = "2.4.6"
-junitVersion = "4.10"
-concurrentlinkedhashmapVersion = "1.2_jdk5"
-
-archivesBaseName = 'grails'
-version = grailsVersion
+ext {
+ grailsVersion = '2.0.2.BUILD-SNAPSHOT'
+ antTraxVersion = "1.7.1"
+ antVersion = "1.8.2"
+ aspectjVersion = "1.6.10"
+ commonsBeanUtilsVersion = "1.8.3"
+ commonsCliVersion = "1.2"
+ commonsCollectionsVersion = "3.2.1"
+ commonsIOVersion = "2.1"
+ commonsLangVersion = "2.6"
+ datastoreVersion = "1.0.3.BUILD-SNAPSHOT"
+ gantVersion = "1.9.6"
+ gdocEngineVersion = "1.0.1"
+ groovyVersion = "1.8.6"
+ gradleGroovyVersion = groovyVersion
+ gradleGroovyVersion = "1.8.2"
+ ivyVersion = "2.2.0"
+ jansiVersion = "1.2.1"
+ jlineVersion = "1.0"
+ jnaVersion = "3.2.3"
+ slf4jVersion = "1.6.2"
+ springLoadedVersion = "1.0.4"
+ springVersion = "3.1.0.RELEASE"
+ springWebflowVersion= "2.0.8.RELEASE"
+ hibernateVersion = "3.6.8.Final"
+ ehcacheVersion = "2.4.6"
+ junitVersion = "4.10"
+ concurrentlinkedhashmapVersion = "1.2_jdk5"
+}
// directories created during the build which are related
// to turning the workspace root into a GRAILS_HOME
-homeDistDir = file("dist")
-homeBinDir = file("bin")
-homeConfDir = file("conf")
-homeDslSupportDir = file("dsl-support")
-homeLibDir = file("lib")
-homeSrcDir = file("src")
+ext {
+ homeDistDir = file("dist")
+ homeBinDir = file("bin")
+ homeConfDir = file("conf")
+ homeDslSupportDir = file("dsl-support")
+ homeLibDir = file("lib")
+ homeSrcDir = file("src")
+}
// Groovy is added as a dependency to both the 'groovy' and 'compile'
// configurations, so place the dependency in a shared variable. The
// 'compile' is required so that Groovy appears as a dependency in the
// artifacts' POMs.
-jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
+ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
+ext.groovyDependency = null
if (jointBuildGroovyJarProperty) {
jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
if (jointBuildGroovyJar.exists()) {
@@ -118,7 +120,7 @@ subprojects { project ->
version = grailsVersion
group = "org.grails"
- isCiBuild = project.hasProperty("isCiBuild")
+ ext.isCiBuild = project.hasProperty("isCiBuild")
manifest.mainAttributes(
"Built-By": System.properties['user.name'],
@@ -220,7 +222,7 @@ subprojects { project ->
authentication(userName: username, password: password)
}
}
- project.deployer = mavenDeployer {
+ project.ext.deployer = mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
@@ -280,13 +282,15 @@ subprojects { project ->
The pom argument is of the following type:
http://maven.apache.org/ref/2.2.1/maven-model/apidocs/org/apache/maven/model/Model.html
*/
- project.poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
- project.pomModifications = []
- project.modifyPom = { Closure modification -> project.pomModifications << modification }
- project.poms*.whenConfigured {
- project.pomModifications*.call(it)
+ ext {
+ poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
+ pomModifications = []
+ modifyPom = { Closure modification -> project.pomModifications << modification }
+ poms*.whenConfigured {
+ pomModifications*.call(it)
+ }
}
-
+
// Remove any dependencies that shouldn't be included in the POM
modifyPom { pom ->
configurations.runtime.allDependencies.each { dependency ->
@@ -319,5 +323,5 @@ apply {
}
task wrapper(type: Wrapper) {
- gradleVersion "1.0-milestone-7"
+ gradleVersion "1.0-milestone-9"
}
2  buildSrc/src/main/groovy/org/grails/gradle/GrailsBuildPlugin.groovy
View
@@ -17,7 +17,7 @@ class GrailsBuildPlugin implements Plugin<Project> {
// Add utility for getting sources, returns a configuration containing the source jar versions
// of the dependencies in the given configuration(s)
- project.sourcesFor = { configurations ->
+ project.ext.sourcesFor = { configurations ->
// We can't use varargs for the closure signature due to an issue in the mixin mechanism in this
// version of Gradle.
31 gradle/assemble.gradle
View
@@ -47,9 +47,6 @@ task populateDependencies(type: Sync) {
into homeLibDir
includeEmptyDirs = false
- grailsRepoCacheHash = "a5610c5703557b062da6cb64b3488b38"
- eachFile { file -> file.path -= "$grailsRepoCacheHash/" }
-
// Only configure this task if we are indeed going to run it because it forces a resolution of all of the subproject
// dependencies which is very costly and we want to avoid it if we aren't going to run this task. Because we do this
// 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) {
if (taskGraph.hasTask(':populateDependencies')) {
def projectNames = rootProject.subprojects*.name
- baseCacheDir = "$gradle.gradleUserHomeDir/caches"
- versionedCacheDir = "$baseCacheDir/artifacts-7/artifacts"
+ ext.baseCachesDir = "$gradle.gradleUserHomeDir/caches"
+ ext.cacheDir = "$baseCachesDir/artifacts-8"
+ ext.metadata = "$cacheDir/module-metadata"
+ ext.filestore = "$cacheDir/filestore"
- from versionedCacheDir
libsConfigurations.each { configuration ->
configuration.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def dependency = artifact.moduleVersion.id
-
- // Force the download of the binary artifact
- // Gradle 1.0-milestone-7 will get the file until this is called with the way
- // we are using the API.
- artifact.file
+ into("$dependency.group/$dependency.name/jars") {
+ from artifact.file // this will trigger the actual download if necessary
+ }
if (!projectNames.contains(dependency.name)) {
- def base = "${grailsRepoCacheHash}/${dependency.group}/${dependency.name}/${dependency.version}"
- include "${base}/*-${dependency.version}.*"
- include "${base}/jar/${dependency.name}-${dependency.version}.jar"
- include "${base}/bundle/${dependency.name}-${dependency.version}.jar"
+ def base = "${dependency.group}/${dependency.name}/${dependency.version}"
+ from ("${metadata}/${base}") {
+ include "*.ivy.xml"
+ eachFile { it.path = "$dependency.group/$dependency.name/ivy-${dependency.version}.xml" }
+ }
}
}
}
@@ -92,7 +89,7 @@ task sourcesJars(type: Sync) {
}
task pluginsFromSvn {
- plugins = [
+ ext.plugins = [
hibernate: grailsVersion,
tomcat: grailsVersion,
resources: "1.1.6",
@@ -100,7 +97,7 @@ task pluginsFromSvn {
jquery: "1.7.1"
]
- dir = file("$buildDir/pluginsFromSvn")
+ ext.dir = file("$buildDir/pluginsFromSvn")
outputs.files { dir.listFiles().findAll { it.name.endsWith(".zip") } }
doFirst {
ant {
4 gradle/docs.gradle
View
@@ -3,7 +3,7 @@
* This target generates a set of stubs for the Groovy sources
*/
task stubs {
- destinationDir = "$buildDir/docs/stubs"
+ ext.destinationDir = "$buildDir/docs/stubs"
doFirst {
def isolatedAnt = services.get(org.gradle.api.internal.project.IsolatedAntBuilder)
isolatedAnt.execute {
@@ -39,7 +39,7 @@ task stubs {
}
task docs {
- destinationDir = file("${projectDir}/doc")
+ ext.destinationDir = file("${projectDir}/doc")
}
task javadoc(type:Javadoc) {
BIN  gradle/wrapper/gradle-wrapper.jar
View
Binary file not shown
4 gradle/wrapper/gradle-wrapper.properties
View
@@ -1,6 +1,6 @@
-#Fri Jan 06 12:36:13 GMT 2012
+#Tue Mar 27 15:46:39 BST 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-7-bin.zip
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-9-bin.zip
2  grails-core/build.gradle
View
@@ -54,7 +54,7 @@ dependencies {
}
compile ("com.springsource.springloaded:springloaded-core:$springLoadedVersion") {
- notInPom = true
+ ext.notInPom = true
}
compile "org.springframework:spring-tx:${springVersion}"
2  grails-hibernate/build.gradle
View
@@ -56,7 +56,7 @@ dependencies {
compile ("org.hibernate:hibernate-core:$hibernateVersion") {
exclude group: 'commons-logging', module:'commons-logging'
exclude group: 'commons-collections', module:'commons-collections'
- exclude group: 'antlr', model: 'antlr'
+ exclude group: 'antlr', module: 'antlr'
}
compile 'javassist:javassist:3.12.0.GA'
compile 'javax.transaction:jta:1.1'
36 grails-resources/build.gradle
View
@@ -1,7 +1,7 @@
task createSharedFilesJar(type: Jar, description: 'Package up the files that are shared by both applications and plugins.') {
version = null
appendix = "shared-files"
- appFileJar = true
+ ext.appFileJar = true
from("src/war/WEB-INF") {
into "web-app/WEB-INF"
include "applicationContext.xml", "sitemesh.xml", "tld/*.tld"
@@ -15,7 +15,7 @@ task createSharedFilesJar(type: Jar, description: 'Package up the files that are
task createSharedApplicationFilesJar(type: Jar, description: 'Package up the files that are exclusive to applications.') {
version = null
appendix = "app-files"
- appFileJar = true
+ ext.appFileJar = true
from("src/war") {
into "web-app"
exclude "WEB-INF/**"
@@ -29,7 +29,7 @@ task createSharedApplicationFilesJar(type: Jar, description: 'Package up the fil
task createSharedPluginFilesJar(type: Jar, description: 'Package up the files that are exclusive to plugins.') {
version = null
appendix = "plugin-files"
- appFileJar = true
+ ext.appFileJar = true
from("src/grails/templates/plugins")
from("src/grails") {
include "grails-app/views/error.gsp"
@@ -40,27 +40,23 @@ task createSharedPluginFilesJar(type: Jar, description: 'Package up the files th
task createIntegrationFilesJar(type: Jar, description: 'Files to integrate Grails with IDEs and build systems.') {
version = null
appendix = "integration-files"
- appFileJar = true
+ ext.appFileJar = true
from("src/grails/templates/ide-support", "src/grails/ant")
}
-allJarFileTasks = [createSharedFilesJar,createSharedApplicationFilesJar,createSharedPluginFilesJar,createIntegrationFilesJar]
-task resourceJarFiles(dependsOn:allJarFileTasks)
+ext.allJarFileTasks = tasks.matching { it.hasProperty("appFileJar") }
+task resourceJarFiles(dependsOn: allJarFileTasks)
-
-jar.dependsOn resourceJarFiles
-
-for (jarTask in allJarFileTasks) {
- jar.from(jarTask.archivePath)
-}
-
-jar.from("src/war") {
- into "src/war"
- include "WEB-INF/**"
- exclude 'WEB-INF/tld/grails.tld', 'WEB-INF/tld/spring.tld'
-}
-jar.from("src/grails/templates") {
- into "src/grails/templates"
+jar {
+ from allJarFileTasks
+ from("src/war") {
+ into "src/war"
+ include "WEB-INF/**"
+ exclude 'WEB-INF/tld/grails.tld', 'WEB-INF/tld/spring.tld'
+ }
+ from("src/grails/templates") {
+ into "src/grails/templates"
+ }
}
jar.appendix = 'resources'
Please sign in to comment.
Something went wrong with that request. Please try again.