Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 336 lines (287 sloc) 11.44 kb
4e9c9f1 @graemerocher deleted bin, conf and junit style sheets and made it so they are put …
graemerocher authored
1 import org.apache.tools.ant.filters.ReplaceTokens
2
712a509 Split build into a couple of build scripts. Updated to new version of…
hd authored
3 buildscript {
4 repositories {
b2580ee @alkemist [build] Update repos to use new dsl
alkemist authored
5 maven { url "http://repo.grails.org/grails/core" }
b298314 @lhotari GRAILS-8052 Updated Junit to 4.9 version. Excluded transient dependen…
lhotari authored
6 //mavenRepo(urls: 'http://evgeny-goldin.org/artifactory/repo/')
712a509 Split build into a couple of build scripts. Updated to new version of…
hd authored
7 }
8 dependencies {
7622fd4 @lhotari GRAILS-8052: commons-io -> 2.1
lhotari authored
9 classpath "commons-io:commons-io:2.1"
b298314 @lhotari GRAILS-8052 Updated Junit to 4.9 version. Excluded transient dependen…
lhotari authored
10 //classpath "com.goldin.plugins:gradle:0.1-RC3" // http://evgeny-goldin.com/wiki/Gradle-duplicates-plugin
712a509 Split build into a couple of build scripts. Updated to new version of…
hd authored
11 }
12 }
13
620b896 @graemerocher added code to load log4j.properties only if it exists, add ehcache as…
graemerocher authored
14 apply plugin: 'idea'
15
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
16 ext {
585153f @jeffbrown version 2.3.0.BUILD-SNAPSHOT
jeffbrown authored
17 grailsVersion = '2.3.0.BUILD-SNAPSHOT'
90bcf95 @alkemist [build] Only require artifact signing if we are uploading non snapsho…
alkemist authored
18 isBuildSnapshot = grailsVersion.endsWith(".BUILD-SNAPSHOT")
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
19 antTraxVersion = "1.7.1"
20 antVersion = "1.8.2"
21 aspectjVersion = "1.6.10"
22 commonsBeanUtilsVersion = "1.8.3"
23 commonsCliVersion = "1.2"
24 commonsCollectionsVersion = "3.2.1"
25 commonsIOVersion = "2.1"
26 commonsLangVersion = "2.6"
873f414 @graemerocher update to 1.1.0 of datastore API
graemerocher authored
27 datastoreVersion = "1.1.0.RELEASE"
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
28 gantVersion = "1.9.6"
29 gdocEngineVersion = "1.0.1"
19d933b @bobbywarner Updated to Groovy 2.0.5
bobbywarner authored
30 groovyVersion = "2.0.5"
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
31 gradleGroovyVersion = groovyVersion
32 gradleGroovyVersion = "1.8.2"
33 ivyVersion = "2.2.0"
34 jansiVersion = "1.2.1"
35 jlineVersion = "1.0"
36 jnaVersion = "3.2.3"
37 slf4jVersion = "1.6.2"
f323274 @graemerocher update to spring-loaded 1.0.6
graemerocher authored
38 springLoadedVersion = "1.0.6"
a41b4d4 @lhotari GRAILS-9332 "Upgrade Spring to 3.1.2.RELEASE version"
lhotari authored
39 springVersion = "3.1.2.RELEASE"
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
40 springWebflowVersion= "2.0.8.RELEASE"
c1cba66 @graemerocher upgrade to hibernate 3.6.10
graemerocher authored
41 hibernateVersion = "3.6.10.Final"
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
42 ehcacheVersion = "2.4.6"
43 junitVersion = "4.10"
44 concurrentlinkedhashmapVersion = "1.2_jdk5"
45 }
46
6aa944b @graemerocher some more fixes and tweaks
graemerocher authored
47 version = grailsVersion
76e9d1a @graemerocher fixes to building of 'grails-scripts' jar
graemerocher authored
48
45f82bf @jeffbrown arrange for most directories which are created during a build to be d…
jeffbrown authored
49 // directories created during the build which are related
50 // to turning the workspace root into a GRAILS_HOME
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
51 ext {
52 homeDistDir = file("dist")
53 homeBinDir = file("bin")
54 homeConfDir = file("conf")
55 homeDslSupportDir = file("dsl-support")
56 homeLibDir = file("lib")
57 homeSrcDir = file("src")
58 }
45f82bf @jeffbrown arrange for most directories which are created during a build to be d…
jeffbrown authored
59
305746b @pledbrook Groovy was not appearing as a dependency in the artifacts' POMs, so i…
pledbrook authored
60 // Groovy is added as a dependency to both the 'groovy' and 'compile'
61 // configurations, so place the dependency in a shared variable. The
62 // 'compile' is required so that Groovy appears as a dependency in the
63 // artifacts' POMs.
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
64 ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
65 ext.groovyDependency = null
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
66 if (jointBuildGroovyJarProperty) {
67 jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
68 if (jointBuildGroovyJar.exists()) {
69 groovyDependency = dependencies.create(files(jointBuildGroovyJar))
70 } else {
71 throw new GradleException("The groovy.jar system property points to ${jointBuildGroovyJar.absolutePath} which does not exist.")
3ae39a1 @jeffbrown Improve the handling of the groovy.jar system property
jeffbrown authored
72 }
305746b @pledbrook Groovy was not appearing as a dependency in the artifacts' POMs, so i…
pledbrook authored
73 } else {
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
74 groovyDependency = dependencies.create("org.codehaus.groovy:groovy-all:${groovyVersion}") {
75 exclude module:"commons-cli"
76 exclude module:"ant"
77 }
b5edff2 @alkemist First cut at upgrading to Gradle 1.0-milestone-6.
alkemist authored
78 }
5dc34a6 @alkemist [build] fix for sources jar task
alkemist authored
79
80 allprojects {
81 repositories {
82 maven { url "http://repo.grails.org/grails/core" }
0d91c09 @jeffbrown use spock 0.7-groovy-2.0-SNAPSHOT
jeffbrown authored
83 // TODO configure this as a remote for repo.grails.org so we don't need this here...
84 maven { url 'http://oss.sonatype.org/content/repositories/snapshots' }
5dc34a6 @alkemist [build] fix for sources jar task
alkemist authored
85 }
86
87 configurations {
88 all {
89 resolutionStrategy {
31b9814 @alkemist [build] Increase cache TTL on CI build to 1 hour to speed it up.
alkemist authored
90 def cacheHours = isCiBuild ? 1 : 24
5dc34a6 @alkemist [build] fix for sources jar task
alkemist authored
91 cacheDynamicVersionsFor cacheHours, 'hours'
92 cacheChangingModulesFor cacheHours, 'hours'
93 }
94 }
95 }
96 }
97
744e0ab @alkemist [build] Let IDEA know this is a Git project.
alkemist authored
98
99 idea {
100 project {
101 jdkName "1.6"
102 ipr {
103 withXml { provider ->
104 def node = provider.asNode()
105 node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
106 }
107 }
108 }
109 }
6d7b0f8 @graemerocher enhanced the gradle install command to also install into GRAILS_HOME/…
graemerocher authored
110 subprojects { project ->
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
111 apply plugin: 'groovy'
112 apply plugin: 'maven'
c2c3421 @graemerocher the root project is no longer a groovy project, custom assemble task …
graemerocher authored
113 apply plugin: 'eclipse'
114 apply plugin: 'idea'
c1535be @graemerocher re-organization of dependency definitions so only the subprojects tha…
graemerocher authored
115 apply plugin: 'project-report'
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
116 apply plugin: 'signing'
b298314 @lhotari GRAILS-8052 Updated Junit to 4.9 version. Excluded transient dependen…
lhotari authored
117 //apply plugin: 'duplicates'
c434df7 @graemerocher some fixes to the tests, removed redundant IML file
graemerocher authored
118
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
119 sourceCompatibility = "1.5"
120 targetCompatibility = "1.5"
121 archivesBaseName = 'grails'
122 version = grailsVersion
4a69917 @burtbeckwith whitespace, STS warnings, etc.
burtbeckwith authored
123 group = "org.grails"
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
124
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
125 ext.isCiBuild = project.hasProperty("isCiBuild")
4881bcf @alkemist [build] Update build to use new cache ttl api in Gradle.
alkemist authored
126
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
127 manifest.mainAttributes(
128 "Built-By": System.properties['user.name'],
129 "Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
130 "Implementation-Title": "Grails",
131 "Implementation-Version": grailsVersion,
132 "Implementation-Vendor": 'grails.org')
133
faafb32 @graemerocher fixed merged changes in build.gradle
graemerocher authored
134
c2c3421 @graemerocher the root project is no longer a groovy project, custom assemble task …
graemerocher authored
135 configure([compileGroovy, compileTestGroovy]) {
136 groovyOptions.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
137 groovyOptions.encoding = "UTF-8"
380f9c9 @jeffbrown gradle useAnt=true
jeffbrown authored
138 groovyOptions.useAnt = true
139 options.useAnt = true
c2c3421 @graemerocher the root project is no longer a groovy project, custom assemble task …
graemerocher authored
140 }
141
142 configure([compileJava, compileTestJava]) {
143 options.deprecation = true
144 options.debug = true
145 }
146
744e0ab @alkemist [build] Let IDEA know this is a Git project.
alkemist authored
147 idea {
148 module.iml.whenMerged { module ->
149 // adding slf4j-simple with scope TEST to .iml
150 module.dependencies << new org.gradle.plugins.ide.idea.model.ModuleLibrary(
151 [new org.gradle.plugins.ide.idea.model.Path("jar://\$GRADLE_USER_HOME/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-${slf4jVersion}.jar!/")], [], [], [], "TEST"
152 )
153 }
fb0aaf0 @sarmbruster injecting slf4j-simple library into generated IntelliJ idea module fi…
sarmbruster authored
154 }
e1110b5 @hansd Changed build to use a virtual repository at repo.gradle.org.
hansd authored
155
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
156 dependencies {
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
157 groovy groovyDependency
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
158
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
159 if (project.name != "grails-docs") {
160 // Logging
161 compile "org.slf4j:slf4j-api:$slf4jVersion"
162 compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
163
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
164 // Specs
8627a48 @graemerocher fix for GRAILS-8258 "Unit test with Async in Grails 2.0.0.RC1"
graemerocher authored
165 compile 'javax.servlet:javax.servlet-api:3.0.1'
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
166 compile 'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final'
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
167
168
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
169 // Testing
170 testCompile "junit:junit:${junitVersion}"
0d91c09 @jeffbrown use spock 0.7-groovy-2.0-SNAPSHOT
jeffbrown authored
171 testCompile('org.spockframework:spock-core:0.7-groovy-2.0-SNAPSHOT') {
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
172 transitive = false
173 }
352b29e @graemerocher add spock to test compile path
graemerocher authored
174 }
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
175 }
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
176
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
177 test {
178 excludes = ["**/*TestCase.class", "**/*\$*.class"]
179 }
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
180
3eef48f @alkemist Don't compile the project just to create a source jar.
alkemist authored
181 task sourcesJar(type: Jar) {
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
182 classifier = 'sources'
183 appendix = project.name[7..-1]
184 from sourceSets.main.allSource
185 }
186
187 task javadocJar(type: Jar, dependsOn:javadoc) {
188 classifier = 'javadoc'
189 appendix = project.name[7..-1]
190 from javadoc.destinationDir
191 }
192
4a69917 @burtbeckwith whitespace, STS warnings, etc.
burtbeckwith authored
193 groovydoc.doLast {
194 delete("${buildDir}/tmp")
195 }
a9878e1 @graemerocher cleanup tmp directory after groovydoc task and increase permgen to fi…
graemerocher authored
196
dcb6008 @alkemist Move the javadoc and source jars onto a new gradle configuration name…
alkemist authored
197 configurations {
198 meta
a624cc1 @alkemist Added a new configuration “published” that extends “archives” and “me…
alkemist authored
199 published.extendsFrom archives, meta
7f8c0ff @alkemist whitespace
alkemist authored
200 all*.exclude group:'commons-logging', module: 'commons-logging'
dcb6008 @alkemist Move the javadoc and source jars onto a new gradle configuration name…
alkemist authored
201 }
202
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
203 artifacts {
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
204 archives jar
92a87df @graemerocher fixes signing of javadoc/source jars
graemerocher authored
205 archives sourcesJar
206 archives javadocJar
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
207 }
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
208
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
209 signing {
210 sign configurations.archives
5c6c4b7 @graemerocher update version to 2.1 rc1
graemerocher authored
211 required { !isBuildSnapshot && gradle.taskGraph.hasTask(uploadPublished) }
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
212 }
213
a624cc1 @alkemist Added a new configuration “published” that extends “archives” and “me…
alkemist authored
214 uploadPublished {
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
215 repositories {
4f91357 @graemerocher added Realm configuration for Ivy
graemerocher authored
216 final url = project.version.endsWith("SNAPSHOT") ? "http://repo.grails.org/grails/libs-snapshots-local" :
217 "http://repo.grails.org/grails/libs-releases-local"
218
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
219 repositories {
220 mavenDeployer {
221 repository(url: url) {
222 final username = project.hasProperty("artifactoryPublishUsername") ? project.artifactoryPublishUsername : null
223 final password = project.hasProperty("artifactoryPublishPassword") ? project.artifactoryPublishPassword : null
657e2f5 @graemerocher fixed for build error
graemerocher authored
224
7995c9f @graemerocher ignoring test temporarily, as due to infrastructure issues it is not …
graemerocher authored
225 if(username && password) {
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
226 org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Artifactory Realm", "repo.grails.org", username, password);
227 }
4f91357 @graemerocher added Realm configuration for Ivy
graemerocher authored
228
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
229 authentication(userName: username, password: password)
230 }
231 }
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
232 project.ext.deployer = mavenDeployer {
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
233 beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
234
235 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
44a005f @graemerocher check for existence of property before reading
graemerocher authored
236 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
237 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
238 }
239 snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
44a005f @graemerocher check for existence of property before reading
graemerocher authored
240 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
241 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
aac8b64 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
242 }
243
244 pom.project {
245 name 'Grails'
246 packaging 'jar'
247 description 'Grails Web Application Framework'
248 delegate.url 'http://grails.org/'
249
250 scm {
251 delegate.url 'scm:git@github.com:grails/grails-core.git'
252 connection 'scm:git@github.com:grails/grails-core.git'
253 developerConnection 'scm:git@github.com:grails/grails-core.git'
254 }
255
256 licenses {
257 license {
258 name 'The Apache Software License, Version 2.0'
259 delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
260 distribution 'repo'
261 }
262 }
263
264 developers {
265 developer {
266 id 'graemerocher'
267 name 'Graeme Rocher'
268 }
269 developer {
270 id 'jeffscottbrown'
271 name 'Jeff Brown'
272 }
273 }
274 }
275 }
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
276 }
277 }
278 }
0b4429a @alkemist Add modifyPom(Closure) utility to build scripts for POM fine tuning.
alkemist authored
279
280 /*
281 Install a method that can be used to fine tune the poms, e.g…
282
283 modifyPom { pom ->
284 pom.dependencies.removeAll(pom.dependencies.findAll { it.scope == "test" })
285 }
286
4ed630a @alkemist Added note about type of arg to modifyPom()
alkemist authored
287 Mods are run in order they are encountered in the build script.
288
289 The pom argument is of the following type:
290 http://maven.apache.org/ref/2.2.1/maven-model/apidocs/org/apache/maven/model/Model.html
0b4429a @alkemist Add modifyPom(Closure) utility to build scripts for POM fine tuning.
alkemist authored
291 */
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
292 ext {
293 poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
294 pomModifications = []
295 modifyPom = { Closure modification -> project.pomModifications << modification }
296 poms*.whenConfigured {
297 pomModifications*.call(it)
298 }
0b4429a @alkemist Add modifyPom(Closure) utility to build scripts for POM fine tuning.
alkemist authored
299 }
9873bd6 @alkemist Upgrade build to Gradle m9.
alkemist authored
300
8333442 @alkemist Instead of using a separate configuration for the agent to avoid it b…
alkemist authored
301 // Remove any dependencies that shouldn't be included in the POM
302 modifyPom { pom ->
303 configurations.runtime.allDependencies.each { dependency ->
304 if (dependency.hasProperty("notInPom") && dependency.notInPom) {
305 pom.dependencies.removeAll { it.groupId == dependency.group && it.artifactId == dependency.name }
306 }
307 }
308 }
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
309 }
310
a551f4c @alkemist Turned the clean task into a proper delete task.
alkemist authored
311 task clean(type: Delete) {
312 delete buildDir,
313 homeBinDir,
314 homeConfDir,
315 homeDistDir,
316 homeDslSupportDir,
317 homeLibDir,
fc745d6 @alkemist Reworked the assemble type targets to be more idiomatic Gradle and cl…
alkemist authored
318 homeSrcDir
89a2d32 Added single test execution. Changed output destination to be the sam…
hd authored
319 }
320
f4e132e @alkemist Add a task for showing the dependencies of all projects.
alkemist authored
321 task allDependencies(dependsOn: { subprojects*.implicitTasks*.dependencies })
322
776d3af @alkemist Self contain all of the install/dist stuff into assemble.gradle.
alkemist authored
323 // From this point on we need the subprojects to be fully configured, so force their full evaluation
324 subprojects.each { evaluationDependsOn it.path }
4e9c9f1 @graemerocher deleted bin, conf and junit style sheets and made it so they are put …
graemerocher authored
325
776d3af @alkemist Self contain all of the install/dist stuff into assemble.gradle.
alkemist authored
326 apply {
327 from 'gradle/docs.gradle' // tasks for building the documentation (e.g. user guide, javadocs)
328 from 'gradle/assemble.gradle' // tasks for creating an installation or distribution
0b0722b @lhotari Fixed findbugs task in gradle build
lhotari authored
329 from 'gradle/findbugs.gradle'
39e7d7e @pledbrook Upgrade Spring Loaded dependency to 1.0.1.
pledbrook authored
330 }
2074e70 @jeffbrown GRAILS-8270 - Include grails-datastore-* source jars in the distribution
jeffbrown authored
331
051f937 @alkemist [build] Update to latest gradle snapshot, as it's slightly faster at …
alkemist authored
332 task wrapper(type: Wrapper) {
317163b @jeffbrown generate Gradle 1.1 wrapper
jeffbrown authored
333 gradleVersion = '1.1'
f23d350 @jeffbrown Gradle 1.0 Wrapper
jeffbrown authored
334 jarFile = 'gradle/wrapper/gradle-wrapper.jar'
051f937 @alkemist [build] Update to latest gradle snapshot, as it's slightly faster at …
alkemist authored
335 }
Something went wrong with that request. Please try again.