Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 324 lines (275 sloc) 11.348 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
1a51e1d @jeffbrown Version 2.1.0.BUILD-SNAPSHOT
jeffbrown authored
16 grailsVersion = '2.1.0.BUILD-SNAPSHOT'
d1830dd @jeffbrown use ant-trax version 1.7.1 not 1.8.1. this dependency is pending inve…
jeffbrown authored
17 antTraxVersion = "1.7.1"
bb88ef3 @jeffbrown GRAILS-7939 - define gdocEngineVersion and sort version properties to…
jeffbrown authored
18 antVersion = "1.8.2"
c1535be @graemerocher re-organization of dependency definitions so only the subprojects tha…
graemerocher authored
19 aspectjVersion = "1.6.10"
72307e4 @lhotari GRAILS-8052 updated Apache commons-*, SLF4J API, ehcache-core to late…
lhotari authored
20 commonsBeanUtilsVersion = "1.8.3"
bb88ef3 @jeffbrown GRAILS-7939 - define gdocEngineVersion and sort version properties to…
jeffbrown authored
21 commonsCliVersion = "1.2"
22 commonsCollectionsVersion = "3.2.1"
7622fd4 @lhotari GRAILS-8052: commons-io -> 2.1
lhotari authored
23 commonsIOVersion = "2.1"
72307e4 @lhotari GRAILS-8052 updated Apache commons-*, SLF4J API, ehcache-core to late…
lhotari authored
24 commonsLangVersion = "2.6"
6f9a901 @graemerocher fix for GRAILS-8769 ""No property found for name" exception on unit t…
graemerocher authored
25 datastoreVersion = "1.0.2.BUILD-SNAPSHOT"
70a345f upgrade again to Groovy 1.8.3 snapshot, and only apply necessary chan…
Graeme Rocher authored
26 gantVersion = "1.9.6"
bb88ef3 @jeffbrown GRAILS-7939 - define gdocEngineVersion and sort version properties to…
jeffbrown authored
27 gdocEngineVersion = "1.0.1"
147bbed @smaldini Merge remote-tracking branch 'melix/typechecking-tests' into groovy2
smaldini authored
28 groovyVersion = "2.0.0-beta-3-SNAPSHOT"
e154aed attempt to fix failing build by using 1.8.2 for Gradle
Graeme Rocher authored
29 gradleGroovyVersion = groovyVersion
30 gradleGroovyVersion = "1.8.2"
bb88ef3 @jeffbrown GRAILS-7939 - define gdocEngineVersion and sort version properties to…
jeffbrown authored
31 ivyVersion = "2.2.0"
de9c675 @graemerocher refactored to use commons-cli for command line argument processing, a…
graemerocher authored
32 jansiVersion = "1.2.1"
fe9a4f9 Rewrote command line parsing and removed dependency on commons CLI
Graeme Rocher authored
33 jlineVersion = "1.0"
2956934 @burtbeckwith got console coloring working in Windows - was missing jna.jar and nee…
burtbeckwith authored
34 jnaVersion = "3.2.3"
72307e4 @lhotari GRAILS-8052 updated Apache commons-*, SLF4J API, ehcache-core to late…
lhotari authored
35 slf4jVersion = "1.6.2"
0c8bd9b @graemerocher updated to spring loaded 1.0.4
graemerocher authored
36 springLoadedVersion = "1.0.4"
d372444 @jeffbrown GRAILS-8293 - Upgrade to Spring 3.1.0
jeffbrown authored
37 springVersion = "3.1.0.RELEASE"
bb88ef3 @jeffbrown GRAILS-7939 - define gdocEngineVersion and sort version properties to…
jeffbrown authored
38 springWebflowVersion= "2.0.8.RELEASE"
bf22be3 @jeffbrown GRAILS-8125 - Upgrade to Hibernate 3.6.8
jeffbrown authored
39 hibernateVersion = "3.6.8.Final"
7b7791f @lhotari GRAILS-8052:
lhotari authored
40 ehcacheVersion = "2.4.6"
41 junitVersion = "4.10"
42 concurrentlinkedhashmapVersion = "1.2_jdk5"
4e9c9f1 @graemerocher deleted bin, conf and junit style sheets and made it so they are put …
graemerocher authored
43
6aa944b @graemerocher some more fixes and tweaks
graemerocher authored
44 archivesBaseName = 'grails'
45 version = grailsVersion
76e9d1a @graemerocher fixes to building of 'grails-scripts' jar
graemerocher authored
46
45f82bf @jeffbrown arrange for most directories which are created during a build to be d…
jeffbrown authored
47 // directories created during the build which are related
48 // to turning the workspace root into a GRAILS_HOME
776d3af @alkemist Self contain all of the install/dist stuff into assemble.gradle.
alkemist authored
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")
45f82bf @jeffbrown arrange for most directories which are created during a build to be d…
jeffbrown authored
55
305746b @pledbrook Groovy was not appearing as a dependency in the artifacts' POMs, so i…
pledbrook authored
56 // Groovy is added as a dependency to both the 'groovy' and 'compile'
57 // configurations, so place the dependency in a shared variable. The
58 // 'compile' is required so that Groovy appears as a dependency in the
59 // artifacts' POMs.
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
60 jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
61 if (jointBuildGroovyJarProperty) {
62 jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
63 if (jointBuildGroovyJar.exists()) {
64 groovyDependency = dependencies.create(files(jointBuildGroovyJar))
65 } else {
66 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
67 }
305746b @pledbrook Groovy was not appearing as a dependency in the artifacts' POMs, so i…
pledbrook authored
68 } else {
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
69 groovyDependency = dependencies.create("org.codehaus.groovy:groovy-all:${groovyVersion}") {
70 exclude module:"commons-cli"
71 exclude module:"ant"
72 }
305746b @pledbrook Groovy was not appearing as a dependency in the artifacts' POMs, so i…
pledbrook authored
73 }
74
c591956 @alkemist [build] reinstate sanity check for there only being one dependency re…
alkemist authored
75 // Prevent multiple repositories being used because the populateDependencies task in assemble.gradle
76 // will break down if this build uses multiple repositories.
77 gradle.taskGraph.whenReady { taskGraph ->
b5edff2 @alkemist First cut at upgrading to Gradle 1.0-milestone-6.
alkemist authored
78 if (taskGraph.hasTask(populateDependencies)) {
79 def projectsWithMultipleRepos = allprojects.findAll { repositories.size() > 1 }
80 if (projectsWithMultipleRepos) {
81 throw new GradleException(
82 "There are projects with more than one repository defined. \n" +
83 "This isn't allowed as it breaks the populateDependencies task. You can only use the grails central repo. \n" +
84 "This is a temporary workaround for the Gradle issue: http://issues.gradle.org/browse/GRADLE-1989"
85 )
86 }
87 }
88 }
5dc34a6 @alkemist [build] fix for sources jar task
alkemist authored
89
90 allprojects {
91 repositories {
92 maven { url "http://repo.grails.org/grails/core" }
93 }
94
95 configurations {
96 all {
97 resolutionStrategy {
31b9814 @alkemist [build] Increase cache TTL on CI build to 1 hour to speed it up.
alkemist authored
98 def cacheHours = isCiBuild ? 1 : 24
5dc34a6 @alkemist [build] fix for sources jar task
alkemist authored
99 cacheDynamicVersionsFor cacheHours, 'hours'
100 cacheChangingModulesFor cacheHours, 'hours'
101 }
102 }
103 }
104 }
105
6d7b0f8 @graemerocher enhanced the gradle install command to also install into GRAILS_HOME/…
graemerocher authored
106 subprojects { project ->
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
107 apply plugin: 'groovy'
108 apply plugin: 'maven'
c2c3421 @graemerocher the root project is no longer a groovy project, custom assemble task …
graemerocher authored
109 apply plugin: 'eclipse'
110 apply plugin: 'idea'
c1535be @graemerocher re-organization of dependency definitions so only the subprojects tha…
graemerocher authored
111 apply plugin: 'project-report'
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
112 apply plugin: 'signing'
b298314 @lhotari GRAILS-8052 Updated Junit to 4.9 version. Excluded transient dependen…
lhotari authored
113 //apply plugin: 'duplicates'
c434df7 @graemerocher some fixes to the tests, removed redundant IML file
graemerocher authored
114
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
115 sourceCompatibility = "1.5"
116 targetCompatibility = "1.5"
117 archivesBaseName = 'grails'
118 version = grailsVersion
4a69917 @burtbeckwith whitespace, STS warnings, etc.
burtbeckwith authored
119 group = "org.grails"
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
120
4881bcf @alkemist [build] Update build to use new cache ttl api in Gradle.
alkemist authored
121 isCiBuild = project.hasProperty("isCiBuild")
122
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
123 manifest.mainAttributes(
124 "Built-By": System.properties['user.name'],
125 "Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
126 "Implementation-Title": "Grails",
127 "Implementation-Version": grailsVersion,
128 "Implementation-Vendor": 'grails.org')
129
faafb32 @graemerocher fixed merged changes in build.gradle
graemerocher authored
130
c2c3421 @graemerocher the root project is no longer a groovy project, custom assemble task …
graemerocher authored
131 configure([compileGroovy, compileTestGroovy]) {
132 groovyOptions.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
133 groovyOptions.encoding = "UTF-8"
134 }
135
136 configure([compileJava, compileTestJava]) {
137 options.deprecation = true
138 options.debug = true
139 }
140
77b4495 @alkemist [build] update idea metadata generation to new Gradle api
alkemist authored
141 idea.module.iml.whenMerged { module ->
142 // adding slf4j-simple with scope TEST to .iml
143 module.dependencies << new org.gradle.plugins.ide.idea.model.ModuleLibrary(
144 [new org.gradle.plugins.ide.idea.model.Path("jar://\$GRADLE_USER_HOME/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-${slf4jVersion}.jar!/")], [], [], [], "TEST"
145 )
fb0aaf0 @sarmbruster injecting slf4j-simple library into generated IntelliJ idea module fi…
sarmbruster authored
146 }
e1110b5 @hansd Changed build to use a virtual repository at repo.gradle.org.
hansd authored
147
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
148 dependencies {
6f0c9bc @alkemist [build] Simplified management of Groovy jar WRT grails/groovy joint b…
alkemist authored
149 groovy groovyDependency
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
150
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
151 if (project.name != "grails-docs") {
152 // Logging
153 compile "org.slf4j:slf4j-api:$slf4jVersion"
154 compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
155
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
156 // Specs
95d9942 @graemerocher fix for GRAILS-8258 "Unit test with Async in Grails 2.0.0.RC1"
graemerocher authored
157 compile 'javax.servlet:javax.servlet-api:3.0.1'
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
158 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
159
160
09d25f0 @pledbrook Add Gradle tasks for gdoc publishing.
pledbrook authored
161 // Testing
162 testCompile "junit:junit:${junitVersion}"
163 testCompile('org.spockframework:spock-core:0.6-groovy-1.8-SNAPSHOT') {
164 transitive = false
165 }
352b29e @graemerocher add spock to test compile path
graemerocher authored
166 }
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
167 }
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
168
1442c04 @pledbrook Removed tabs from build.gradle (and trimmed whitespace from ends of l…
pledbrook authored
169 test {
170 excludes = ["**/*TestCase.class", "**/*\$*.class"]
171 }
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
172
3eef48f @alkemist Don't compile the project just to create a source jar.
alkemist authored
173 task sourcesJar(type: Jar) {
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
174 classifier = 'sources'
175 appendix = project.name[7..-1]
176 from sourceSets.main.allSource
177 }
178
179 task javadocJar(type: Jar, dependsOn:javadoc) {
180 classifier = 'javadoc'
181 appendix = project.name[7..-1]
182 from javadoc.destinationDir
183 }
184
4a69917 @burtbeckwith whitespace, STS warnings, etc.
burtbeckwith authored
185 groovydoc.doLast {
186 delete("${buildDir}/tmp")
187 }
a9878e1 @graemerocher cleanup tmp directory after groovydoc task and increase permgen to fi…
graemerocher authored
188
dcb6008 @alkemist Move the javadoc and source jars onto a new gradle configuration name…
alkemist authored
189 configurations {
190 meta
a624cc1 @alkemist Added a new configuration “published” that extends “archives” and “me…
alkemist authored
191 published.extendsFrom archives, meta
7f8c0ff @alkemist whitespace
alkemist authored
192 all*.exclude group:'commons-logging', module: 'commons-logging'
dcb6008 @alkemist Move the javadoc and source jars onto a new gradle configuration name…
alkemist authored
193 }
194
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
195 artifacts {
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
196 archives jar
4ed0c02 @graemerocher fixes signing of javadoc/source jars
graemerocher authored
197 archives sourcesJar
198 archives javadocJar
f01ceaa @graemerocher Now creating source and javadoc jar files
graemerocher authored
199 }
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
200
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
201 signing {
202 sign configurations.archives
203 }
204
a624cc1 @alkemist Added a new configuration “published” that extends “archives” and “me…
alkemist authored
205 uploadPublished {
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
206 repositories {
4f91357 @graemerocher added Realm configuration for Ivy
graemerocher authored
207 final url = project.version.endsWith("SNAPSHOT") ? "http://repo.grails.org/grails/libs-snapshots-local" :
208 "http://repo.grails.org/grails/libs-releases-local"
209
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
210 repositories {
211 mavenDeployer {
212 repository(url: url) {
213 final username = project.hasProperty("artifactoryPublishUsername") ? project.artifactoryPublishUsername : null
214 final password = project.hasProperty("artifactoryPublishPassword") ? project.artifactoryPublishPassword : null
657e2f5 @graemerocher fixed for build error
graemerocher authored
215
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
216 if(username && password) {
217 org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Artifactory Realm", "repo.grails.org", username, password);
218 }
4f91357 @graemerocher added Realm configuration for Ivy
graemerocher authored
219
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
220 authentication(userName: username, password: password)
221 }
222 }
223 project.deployer = mavenDeployer {
224 beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
225
226 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
ee7cac0 @graemerocher check for existence of property before reading
graemerocher authored
227 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
228 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
229 }
230 snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
ee7cac0 @graemerocher check for existence of property before reading
graemerocher authored
231 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
232 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
4eefc40 @graemerocher support for publishing to Sonatype OSS repo
graemerocher authored
233 }
234
235 pom.project {
236 name 'Grails'
237 packaging 'jar'
238 description 'Grails Web Application Framework'
239 delegate.url 'http://grails.org/'
240
241 scm {
242 delegate.url 'scm:git@github.com:grails/grails-core.git'
243 connection 'scm:git@github.com:grails/grails-core.git'
244 developerConnection 'scm:git@github.com:grails/grails-core.git'
245 }
246
247 licenses {
248 license {
249 name 'The Apache Software License, Version 2.0'
250 delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
251 distribution 'repo'
252 }
253 }
254
255 developers {
256 developer {
257 id 'graemerocher'
258 name 'Graeme Rocher'
259 }
260 developer {
261 id 'jeffscottbrown'
262 name 'Jeff Brown'
263 }
264 }
265 }
266 }
ee4ba5b @graemerocher Attempt 1 at Gradle to Artifactory deployment
graemerocher authored
267 }
268 }
269 }
0b4429a @alkemist Add modifyPom(Closure) utility to build scripts for POM fine tuning.
alkemist authored
270
271 /*
272 Install a method that can be used to fine tune the poms, e.g…
273
274 modifyPom { pom ->
275 pom.dependencies.removeAll(pom.dependencies.findAll { it.scope == "test" })
276 }
277
4ed630a @alkemist Added note about type of arg to modifyPom()
alkemist authored
278 Mods are run in order they are encountered in the build script.
279
280 The pom argument is of the following type:
281 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
282 */
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)
288 }
8333442 @alkemist Instead of using a separate configuration for the agent to avoid it b…
alkemist authored
289
290 // Remove any dependencies that shouldn't be included in the POM
291 modifyPom { pom ->
292 configurations.runtime.allDependencies.each { dependency ->
293 if (dependency.hasProperty("notInPom") && dependency.notInPom) {
294 pom.dependencies.removeAll { it.groupId == dependency.group && it.artifactId == dependency.name }
295 }
296 }
297 }
c9ba376 @graemerocher First steps into multi project build refactor. Moved grails-bootstrap…
graemerocher authored
298 }
299
a551f4c @alkemist Turned the clean task into a proper delete task.
alkemist authored
300 task clean(type: Delete) {
301 delete buildDir,
302 homeBinDir,
303 homeConfDir,
304 homeDistDir,
305 homeDslSupportDir,
306 homeLibDir,
fc745d6 @alkemist Reworked the assemble type targets to be more idiomatic Gradle and cl…
alkemist authored
307 homeSrcDir
89a2d32 Added single test execution. Changed output destination to be the sam…
hd authored
308 }
309
f4e132e @alkemist Add a task for showing the dependencies of all projects.
alkemist authored
310 task allDependencies(dependsOn: { subprojects*.implicitTasks*.dependencies })
311
776d3af @alkemist Self contain all of the install/dist stuff into assemble.gradle.
alkemist authored
312 // From this point on we need the subprojects to be fully configured, so force their full evaluation
313 subprojects.each { evaluationDependsOn it.path }
4e9c9f1 @graemerocher deleted bin, conf and junit style sheets and made it so they are put …
graemerocher authored
314
776d3af @alkemist Self contain all of the install/dist stuff into assemble.gradle.
alkemist authored
315 apply {
316 from 'gradle/docs.gradle' // tasks for building the documentation (e.g. user guide, javadocs)
317 from 'gradle/assemble.gradle' // tasks for creating an installation or distribution
0b0722b @lhotari Fixed findbugs task in gradle build
lhotari authored
318 from 'gradle/findbugs.gradle'
39e7d7e @pledbrook Upgrade Spring Loaded dependency to 1.0.1.
pledbrook authored
319 }
2074e70 @jeffbrown GRAILS-8270 - Include grails-datastore-* source jars in the distribution
jeffbrown authored
320
051f937 @alkemist [build] Update to latest gradle snapshot, as it's slightly faster at …
alkemist authored
321 task wrapper(type: Wrapper) {
5ba8333 @alkemist [build] update to gradle m7
alkemist authored
322 gradleVersion "1.0-milestone-7"
051f937 @alkemist [build] Update to latest gradle snapshot, as it's slightly faster at …
alkemist authored
323 }
Something went wrong with that request. Please try again.