Skip to content

Commit dcf0b92

Browse files
authored
build: apply grails-publish in the root project (#1881)
gradle-nexus/publish-plugin#81
1 parent df9899a commit dcf0b92

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

build.gradle

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ ext {
55
excludeUnusedTransDeps = findProperty('excludeUnusedTransDeps')
66
}
77

8-
if (isReleaseVersion) {
9-
// This has to be applied to the root project
10-
apply plugin: 'io.github.gradle-nexus.publish-plugin'
11-
}
12-
138
String customGroovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION')
149
if (customGroovyVersion) {
1510
logger.lifecycle("Using custom Groovy version: $customGroovyVersion")
@@ -53,4 +48,28 @@ allprojects {
5348
}
5449
}
5550

51+
if (isReleaseVersion) {
52+
// This has to be applied to the root project
53+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
54+
def publishedProjects = [
55+
'grails-datastore-async',
56+
'grails-datastore-core',
57+
'grails-datastore-gorm',
58+
'grails-datastore-gorm-async',
59+
//'grails-datastore-gorm-rx',
60+
'grails-datastore-gorm-support',
61+
'grails-datastore-gorm-tck',
62+
'grails-datastore-gorm-test',
63+
'grails-datastore-gorm-validation',
64+
'grails-datastore-web',
65+
'grails-gorm-testing-support',
66+
]
67+
subprojects {
68+
if (name in publishedProjects) {
69+
// This has to be applied here
70+
apply plugin: 'org.grails.grails-publish'
71+
}
72+
}
73+
}
74+
5675
apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')

gradle/publish-config.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import org.grails.gradle.plugin.publishing.GrailsPublishExtension
22

3-
apply plugin: 'org.grails.grails-publish'
4-
53
extensions.configure(GrailsPublishExtension) {
64
// Explicit `it` is required here
75
it.githubSlug = 'grails/grails-data-mapping'

0 commit comments

Comments
 (0)