Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 326 lines (279 sloc) 10.568 kb
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
1 import org.apache.tools.ant.filters.ReplaceTokens
2
3 buildscript {
4 repositories {
5 maven { url "http://repo.grails.org/grails/core" }
6 //mavenRepo(urls: 'http://evgeny-goldin.org/artifactory/repo/')
7 }
8 dependencies {
9 classpath "commons-io:commons-io:2.1"
10 //classpath "com.goldin.plugins:gradle:0.1-RC3" // http://evgeny-goldin.com/wiki/Gradle-duplicates-plugin
11 }
12 }
13
14 apply plugin: 'idea'
15
16 ext {
cc51604 Jeff Scott Brown version 2.1.6
jeffbrown authored
17 grailsVersion = '2.1.6'
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
18 isBuildSnapshot = grailsVersion.endsWith(".BUILD-SNAPSHOT")
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"
b93afe2 graemerocher update datastore version to 1.1.7 RELEASE
graemerocher authored
27 datastoreVersion = "1.1.7.RELEASE"
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
28 gantVersion = "1.9.6"
29 gdocEngineVersion = "1.0.1"
2a7930a graemerocher Revert "upgrade to Groovy 1.8.9"
graemerocher authored
30 groovyVersion = "1.8.8"
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher 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"
2878bfd graemerocher upgrade to spring loaded 1.1.3
graemerocher authored
38 springLoadedVersion = "1.1.3"
93a447b Lari Hotari GRAILS-10183 prepare for Java 7u40 change by adding -Djdk.reflect.allowG...
lhotari authored
39 springLoadedCommonOptions = "-noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true"
4c1c0d4 Jeff Scott Brown Upgrade to Spring 3.1.4
jeffbrown authored
40 springVersion = "3.1.4.RELEASE"
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
41 springWebflowVersion= "2.0.8.RELEASE"
42 hibernateVersion = "3.6.10.Final"
43 ehcacheVersion = "2.4.6"
44 junitVersion = "4.10"
6dfab1a graemerocher Changes to support fix for GRAILS-9637 "Grails Unit Tests using the new ...
graemerocher authored
45 concurrentlinkedhashmapVersion = "1.3.1"
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
46 }
47
48 version = grailsVersion
49
50 // directories created during the build which are related
51 // to turning the workspace root into a GRAILS_HOME
52 ext {
53 homeDistDir = file("dist")
54 homeBinDir = file("bin")
55 homeConfDir = file("conf")
56 homeDslSupportDir = file("dsl-support")
57 homeLibDir = file("lib")
58 homeSrcDir = file("src")
59 }
60
61 // Groovy is added as a dependency to both the 'groovy' and 'compile'
62 // configurations, so place the dependency in a shared variable. The
63 // 'compile' is required so that Groovy appears as a dependency in the
64 // artifacts' POMs.
65 ext.jointBuildGroovyJarProperty = System.getProperty('groovy.jar')
66 ext.groovyDependency = null
67 if (jointBuildGroovyJarProperty) {
68 jointBuildGroovyJar = file(jointBuildGroovyJarProperty)
69 if (jointBuildGroovyJar.exists()) {
70 groovyDependency = dependencies.create(files(jointBuildGroovyJar))
71 } else {
72 throw new GradleException("The groovy.jar system property points to ${jointBuildGroovyJar.absolutePath} which does not exist.")
73 }
74 } else {
75 groovyDependency = dependencies.create("org.codehaus.groovy:groovy-all:${groovyVersion}") {
76 exclude module:"commons-cli"
77 exclude module:"ant"
78 }
79 }
80
81 allprojects {
82 repositories {
83 maven { url "http://repo.grails.org/grails/core" }
84 }
85
86 configurations {
87 all {
88 resolutionStrategy {
0863912 graemerocher only use mavenLocal() for non-CI builds
graemerocher authored
89 def cacheHours = isCiBuild ? 1 : 24
90 cacheDynamicVersionsFor cacheHours, 'hours'
91 cacheChangingModulesFor cacheHours, 'hours'
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
92 }
93 }
94 }
95 }
96
97
98 idea {
99 project {
100 jdkName "1.6"
101 ipr {
102 withXml { provider ->
103 def node = provider.asNode()
104 node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
105 }
106 }
107 }
108 }
109 subprojects { project ->
110 apply plugin: 'groovy'
111 apply plugin: 'maven'
112 apply plugin: 'eclipse'
113 apply plugin: 'idea'
114 apply plugin: 'project-report'
115 apply plugin: 'signing'
116 //apply plugin: 'duplicates'
117
118 sourceCompatibility = "1.5"
119 targetCompatibility = "1.5"
120 archivesBaseName = 'grails'
121 version = grailsVersion
122 group = "org.grails"
123
124 ext.isCiBuild = project.hasProperty("isCiBuild")
125
126 manifest.mainAttributes(
127 "Built-By": System.properties['user.name'],
128 "Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
129 "Implementation-Title": "Grails",
130 "Implementation-Version": grailsVersion,
131 "Implementation-Vendor": 'grails.org')
132
133
134 configure([compileGroovy, compileTestGroovy]) {
135 groovyOptions.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
136 groovyOptions.encoding = "UTF-8"
bba64ea Jeff Scott Brown gradle useAnt=true
jeffbrown authored
137 groovyOptions.useAnt = true
138 options.useAnt = true
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
139 }
140
141 configure([compileJava, compileTestJava]) {
142 options.deprecation = true
143 options.debug = true
144 }
145
146 idea {
147 module.iml.whenMerged { module ->
148 // adding slf4j-simple with scope TEST to .iml
149 module.dependencies << new org.gradle.plugins.ide.idea.model.ModuleLibrary(
150 [new org.gradle.plugins.ide.idea.model.Path("jar://\$GRADLE_USER_HOME/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-${slf4jVersion}.jar!/")], [], [], [], "TEST"
151 )
152 }
153 }
154
0863912 graemerocher only use mavenLocal() for non-CI builds
graemerocher authored
155 repositories {
156 if(!isCiBuild) {
157 mavenLocal()
158 }
159 }
160
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
161 dependencies {
162 groovy groovyDependency
163
164 if (project.name != "grails-docs") {
165 // Logging
166 compile "org.slf4j:slf4j-api:$slf4jVersion"
167 compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
168
169 // Specs
170 compile 'javax.servlet:javax.servlet-api:3.0.1'
171 compile 'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final'
172
173
174 // Testing
175 testCompile "junit:junit:${junitVersion}"
176 testCompile('org.spockframework:spock-core:0.6-groovy-1.8-SNAPSHOT') {
177 transitive = false
178 }
179 }
180 }
181
182 test {
183 excludes = ["**/*TestCase.class", "**/*\$*.class"]
184 }
185
186 task sourcesJar(type: Jar) {
187 classifier = 'sources'
188 appendix = project.name[7..-1]
189 from sourceSets.main.allSource
190 }
191
192 task javadocJar(type: Jar, dependsOn:javadoc) {
193 classifier = 'javadoc'
194 appendix = project.name[7..-1]
195 from javadoc.destinationDir
196 }
197
198 groovydoc.doLast {
199 delete("${buildDir}/tmp")
200 }
201
202 configurations {
203 meta
204 published.extendsFrom archives, meta
205 all*.exclude group:'commons-logging', module: 'commons-logging'
206 }
207
208 artifacts {
209 archives jar
210 archives sourcesJar
211 archives javadocJar
212 }
213
214 signing {
215 sign configurations.archives
216 required { !isBuildSnapshot && gradle.taskGraph.hasTask(uploadPublished) }
217 }
218
219 uploadPublished {
220 repositories {
221 repositories {
222 project.ext.deployer = mavenDeployer {
223 beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
224
225 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
226 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
227 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
228 }
229 snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
230 authentication(userName: project.hasProperty("sonatypeUsername") ? project.sonatypeUsername : null,
231 password: project.hasProperty("sonatypePassword") ? project.sonatypePassword : null)
232 }
233
234 pom.project {
235 name 'Grails'
236 packaging 'jar'
237 description 'Grails Web Application Framework'
238 delegate.url 'http://grails.org/'
239
240 scm {
241 delegate.url 'scm:git@github.com:grails/grails-core.git'
242 connection 'scm:git@github.com:grails/grails-core.git'
243 developerConnection 'scm:git@github.com:grails/grails-core.git'
244 }
245
246 licenses {
247 license {
248 name 'The Apache Software License, Version 2.0'
249 delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
250 distribution 'repo'
251 }
252 }
253
254 developers {
255 developer {
256 id 'graemerocher'
257 name 'Graeme Rocher'
258 }
259 developer {
260 id 'jeffscottbrown'
261 name 'Jeff Brown'
262 }
263 }
264 }
265 }
266 }
267 }
268 }
269
270 /*
271 Install a method that can be used to fine tune the poms, e.g…
272
273 modifyPom { pom ->
274 pom.dependencies.removeAll(pom.dependencies.findAll { it.scope == "test" })
275 }
276
277 Mods are run in order they are encountered in the build script.
278
279 The pom argument is of the following type:
280 http://maven.apache.org/ref/2.2.1/maven-model/apidocs/org/apache/maven/model/Model.html
281 */
282 ext {
283 poms = [project.install.repositories.mavenInstaller.pom, project.deployer.pom]
284 pomModifications = []
285 modifyPom = { Closure modification -> project.pomModifications << modification }
286 poms*.whenConfigured {
287 pomModifications*.call(it)
288 }
289 }
290
291 // Remove any dependencies that shouldn't be included in the POM
292 modifyPom { pom ->
293 configurations.runtime.allDependencies.each { dependency ->
294 if (dependency.hasProperty("notInPom") && dependency.notInPom) {
295 pom.dependencies.removeAll { it.groupId == dependency.group && it.artifactId == dependency.name }
296 }
297 }
298 }
299 }
300
301 task clean(type: Delete) {
302 delete buildDir,
303 homeBinDir,
304 homeConfDir,
305 homeDistDir,
306 homeDslSupportDir,
307 homeLibDir,
308 homeSrcDir
309 }
310
311 task allDependencies(dependsOn: { subprojects*.implicitTasks*.dependencies })
312
313 // From this point on we need the subprojects to be fully configured, so force their full evaluation
314 subprojects.each { evaluationDependsOn it.path }
315
316 apply {
317 from 'gradle/docs.gradle' // tasks for building the documentation (e.g. user guide, javadocs)
318 from 'gradle/assemble.gradle' // tasks for creating an installation or distribution
319 from 'gradle/findbugs.gradle'
320 }
321
322 task wrapper(type: Wrapper) {
85df8d5 Jeff Scott Brown Use Gradle 1.1
jeffbrown authored
323 gradleVersion = '1.1'
6373be7 Jeff Scott Brown update wrapper task to 1.1-rc-1
jeffbrown authored
324 jarFile = 'gradle/wrapper/gradle-wrapper.jar'
7995c9f graemerocher ignoring test temporarily, as due to infrastructure issues it is not abl...
graemerocher authored
325 }
Something went wrong with that request. Please try again.