Skip to content

Commit ec009a5

Browse files
committed
Update 6.1.x branch build publishing
1 parent 432561f commit ec009a5

File tree

10 files changed

+268
-175
lines changed

10 files changed

+268
-175
lines changed

build.gradle

Lines changed: 44 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,31 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
8+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
99
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0"
1010
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
1111
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0"
1212
classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
1313
}
1414
}
1515

16-
17-
1816
project.ext {
19-
springVersion = "4.3.18.RELEASE"
20-
springBootVersion = "1.5.14.RELEASE"
21-
grailsVersion = "3.2.11"
22-
grails2Version = '2.5.6'
23-
slf4jVersion = "1.7.22"
24-
junitVersion = "4.12"
25-
javassistVersion = "3.21.0-GA"
26-
groovyVersion = System.getProperty('groovyVersion') ?: '2.4.11'
2717
isTravisBuild = System.getenv().get("TRAVIS") == 'true'
2818

2919
projectMajorVersion = "6"
3020
projectMinorVersion = "1"
3121
projectPatchVersion = "13"
3222
//releaseType = "RELEASE"
3323
// releaseType = "M2"
34-
// releaseType = "RC2"
24+
// releaseType = "RC1"
3525
releaseType = "BUILD-SNAPSHOT"
3626

3727
// overall project version
3828
projectVersion = "${projectMajorVersion}.${projectMinorVersion}.${projectPatchVersion}"
39-
40-
// plugin versions
41-
hibernateValidatorVersion = "5.0.3.Final"
42-
hibernateVersion = "4.3.11"
43-
hibernate5Version = "5.1.3"
44-
45-
def defaultPluginVersion = releaseType == 'RELEASE' ? projectVersion : "${projectVersion}.${releaseType}"
46-
hibernatePluginVersion = defaultPluginVersion
47-
mongodbPluginVersion = defaultPluginVersion
48-
neo4jPluginVersion = defaultPluginVersion
49-
cassandraPluginVersion = defaultPluginVersion
50-
redisPluginVersion = defaultPluginVersion
51-
52-
29+
releaseVersion = "${projectVersion}.${releaseType}"
5330
isCiBuild = project.hasProperty("isCiBuild")
5431
isBuildSnapshot = releaseType == "BUILD-SNAPSHOT"
5532

56-
servletApiVersion = "3.0.1"
57-
5833
nexusUsername = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
5934
nexusPassword = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
6035
}
@@ -77,7 +52,6 @@ configurations {
7752
version = "${projectVersion}.${releaseType}"
7853
group = "org.grails"
7954

80-
8155
apply plugin: 'idea'
8256
apply plugin: 'project-report'
8357
apply plugin: 'io.codearte.nexus-staging'
@@ -99,7 +73,9 @@ allprojects {
9973
all {
10074
resolutionStrategy {
10175
force "org.codehaus.groovy:groovy:$groovyVersion"
76+
force "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
10277
force "org.codehaus.groovy:groovy-xml:$groovyVersion"
78+
force "org.codehaus.groovy:groovy-templates:$groovyVersion"
10379
}
10480
}
10581
}
@@ -142,59 +118,18 @@ subprojects {
142118
}
143119

144120

145-
ext {
146-
pomInfo = {
147-
delegate.name 'Grails GORM'
148-
delegate.description 'GORM - Grails Data Access Framework'
149-
delegate.url 'http://grails.org/'
150-
151-
delegate.licenses {
152-
delegate.license {
153-
delegate.name 'The Apache Software License, Version 2.0'
154-
delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
155-
delegate.distribution 'repo'
156-
}
157-
}
158-
159-
delegate.scm {
160-
delegate.url 'scm:[email protected]:grails/grails-data-mapping.git'
161-
delegate.connection 'scm:[email protected]:grails/grails-data-mapping.git'
162-
delegate.developerConnection 'scm:[email protected]:grails/grails-data-mapping.git'
163-
}
164-
165-
166-
delegate.developers {
167-
delegate.developer {
168-
delegate.id 'graemerocher'
169-
delegate.name 'Graeme Rocher'
170-
}
171-
delegate.developer {
172-
delegate.id 'jeffscottbrown'
173-
delegate.name 'Jeff Brown'
174-
}
175-
delegate.developer {
176-
delegate.id 'burtbeckwith'
177-
delegate.name 'Burt Beckwith'
178-
}
179-
}
180-
181-
}
182-
}
183-
184-
185121
def isStandardGroovyMavenProject = isGroovyProject(project)
186122

187123
if (isStandardGroovyMavenProject) {
188124
apply plugin: 'groovy'
189125
apply plugin: "io.github.groovylang.groovydoc"
190126
apply plugin: 'eclipse'
191-
apply plugin: 'com.bmuschko.nexus'
192-
apply plugin: 'maven-publish'
127+
apply from:"${rootProject.rootDir}/gradle/publishing.gradle"
193128
apply plugin: 'idea'
194129
apply plugin: 'provided-base'
195130
apply plugin: 'optional-base'
196-
sourceCompatibility = "1.7"
197-
targetCompatibility = "1.7"
131+
sourceCompatibility = "1.8"
132+
targetCompatibility = "1.8"
198133
}
199134

200135
def isGormDatasource = project.name.startsWith("grails-datastore-gorm-") &&
@@ -207,8 +142,12 @@ subprojects {
207142

208143

209144
dependencies {
145+
compile "javax.annotation:javax.annotation-api:$javaAnnotationApiVersion"
146+
210147
if (isStandardGroovyMavenProject) {
211148
documentation "org.fusesource.jansi:jansi:1.11"
149+
documentation "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
150+
documentation 'info.picocli:picocli:3.8.0'
212151
compile group: 'org.codehaus.groovy', name: 'groovy', version: groovyVersion
213152

214153
testCompile group: 'org.codehaus.groovy', name: 'groovy-test', version: groovyVersion
@@ -285,11 +224,11 @@ subprojects {
285224
}
286225
}
287226
test.doFirst {
288-
def tckClassesDir = project(":grails-datastore-gorm-tck").sourceSets.main.output.classesDir
227+
File tckClassesDir = project(":grails-datastore-gorm-tck").sourceSets.main.output.classesDirs.files.first()
289228
def thisProjectsTests = // surely there is a less hardcoded way to do this
290229
copy {
291230
from tckClassesDir
292-
into sourceSets.test.output.classesDir
231+
into sourceSets.test.output.classesDirs.files.first()
293232
include "**/*.class"
294233
exclude { details ->
295234
// Do not copy across any TCK class (or nested classes of that class)
@@ -325,57 +264,6 @@ subprojects {
325264
classpath += configurations.documentation
326265
jvmArgs "-Xmx512M"
327266
}
328-
329-
modifyPom {
330-
delegate.project {
331-
def updatePom = pomInfo.clone()
332-
updatePom.delegate = delegate
333-
updatePom()
334-
}
335-
}
336-
337-
publishing {
338-
339-
repositories {
340-
maven {
341-
credentials {
342-
def u = System.getenv("ARTIFACTORY_USERNAME") ?: project.hasProperty("artifactoryPublishUsername") ? project.artifactoryPublishUsername : ''
343-
def p = System.getenv("ARTIFACTORY_PASSWORD") ?: project.hasProperty("artifactoryPublishPassword") ? project.artifactoryPublishPassword : ''
344-
username = u
345-
password = p
346-
}
347-
if(isBuildSnapshot) {
348-
url "https://repo.grails.org/grails/libs-snapshots-local"
349-
}
350-
else {
351-
url "https://repo.grails.org/grails/libs-releases-local"
352-
}
353-
354-
}
355-
}
356-
357-
publications {
358-
maven(MavenPublication) {
359-
from components.java
360-
361-
artifact sourcesJar {
362-
classifier "sources"
363-
}
364-
artifact javadocJar {
365-
classifier "javadoc"
366-
}
367-
368-
pom.withXml {
369-
def xml = asNode()
370-
def dependency = xml.dependencies.find { dep -> dep.artifactId == 'slf4j-simple' }
371-
dependency?.optional = true
372-
xml.children().last() + pomInfo
373-
}
374-
375-
}
376-
}
377-
}
378-
379267
}
380268
}
381269

@@ -392,32 +280,33 @@ dependencies {
392280
task install(dependsOn: subprojects*.tasks*.withType(PublishToMavenLocal))
393281

394282

395-
task test(dependsOn: getTasksByName("test", true)) << {
396-
def reportsDir = "${buildDir}/reports"
397-
398-
// Aggregate the test results
399-
ant.taskdef(
400-
name: 'junitreport2',
401-
classname: "org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator",
402-
classpath: configurations.build.asPath
403-
)
404-
405-
def testReportsDir = new File("${reportsDir}/tests")
406-
if (testReportsDir.exists()) {
407-
testReportsDir.deleteDir()
408-
}
409-
testReportsDir.mkdirs()
410-
411-
ant.junitreport2(todir: testReportsDir) {
412-
subprojects.each {
413-
def testResultsDir = "${it.buildDir}/test-results"
414-
if (new File(testResultsDir).exists()) {
415-
fileset(dir: testResultsDir) {
416-
include(name: "TEST-*.xml")
417-
}
418-
}
419-
}
420-
report(todir: testReportsDir)
421-
}
422-
423-
}
283+
task test(dependsOn: getTasksByName("test", true)) {
284+
doLast {
285+
def reportsDir = "${buildDir}/reports"
286+
287+
// Aggregate the test results
288+
ant.taskdef(
289+
name: 'junitreport2',
290+
classname: "org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator",
291+
classpath: configurations.build.asPath
292+
)
293+
294+
def testReportsDir = new File("${reportsDir}/tests")
295+
if (testReportsDir.exists()) {
296+
testReportsDir.deleteDir()
297+
}
298+
testReportsDir.mkdirs()
299+
300+
ant.junitreport2(todir: testReportsDir) {
301+
subprojects.each {
302+
def testResultsDir = "${it.buildDir}/test-results"
303+
if (new File(testResultsDir).exists()) {
304+
fileset(dir: testResultsDir) {
305+
include(name: "TEST-*.xml")
306+
}
307+
}
308+
}
309+
report(todir: testReportsDir)
310+
}
311+
}
312+
}

gradle.properties

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
title=Grails GORM
2+
projectDesc=GORM - Grails Data Access Framework
3+
projectUrl=http://gorm.grails.org/
4+
githubSlug=grails/grails-data-mapping
5+
developers=Graeme Rocher,Jeff Brown,Burt Beckwith,James Kleeh
6+
hibernateValidatorVersion=5.0.3.Final
7+
jpaVersion=2.2
8+
jtaVersion=1.1
9+
javaAnnotationApiVersion=1.3.2
10+
elVersion=3.0.0
11+
commonsValidatorVersion=1.6
12+
hibernateVersion=4.3.11
13+
hibernate5Version=5.1.3
14+
servletApiVersion=4.0.1
15+
springVersion=4.3.18.RELEASE
16+
springBootVersion=1.5.14.RELEASE
17+
caffeineVersion=2.6.2
18+
grailsVersion=3.2.11
19+
grails2Version=2.5.6
20+
grailsAsyncVersion=3.3.2
21+
slf4jVersion=1.7.22
22+
junitVersion=4.12
23+
javassistVersion=3.21.0-GA
24+
groovyVersion=2.4.11

0 commit comments

Comments
 (0)