-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): update build configurations (#547)
Fixes Signing and Publishing of the artifacts.
- Loading branch information
1 parent
8b01700
commit 9137f43
Showing
5 changed files
with
109 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,37 +10,39 @@ version = projectVersion | |
ext.set('grailsVersion', libs.versions.grails.asProvider().get()) | ||
ext.set('isSnapshot', version.endsWith('-SNAPSHOT')) | ||
ext.set('isReleaseVersion', !isSnapshot) | ||
ext.set('signing.keyId', findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY')) | ||
ext.set('signing.password', findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')) | ||
ext.set('signing.secretKeyRingFile', findProperty('signing.secretKeyRingFile') ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg") | ||
ext.set('pomInfo', { | ||
delegate.url 'https://views.grails.org/latest/' | ||
delegate.licenses { | ||
delegate.license { | ||
delegate.name 'The Apache Software License, Version 2.0' | ||
delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
|
||
allprojects { | ||
|
||
ext.set('signing.keyId', findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY')) | ||
ext.set('signing.password', findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')) | ||
ext.set('signing.secretKeyRingFile', findProperty('signing.secretKeyRingFile') ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg") | ||
ext.set('pomInfo', { | ||
delegate.url 'https://views.grails.org/latest/' | ||
delegate.licenses { | ||
delegate.license { | ||
delegate.name 'The Apache Software License, Version 2.0' | ||
delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
} | ||
delegate.scm { | ||
delegate.url 'https://github.com/grails/grails-views/' | ||
delegate.connection 'scm:git:git://github.com/grails/grails-views' | ||
delegate.developerConnection 'scm:git:ssh://github.com:grails/grails-views' | ||
} | ||
delegate.developers { | ||
delegate.developer { | ||
delegate.id 'graemerocher' | ||
delegate.name 'Graeme Rocher' | ||
delegate.email '[email protected]' | ||
delegate.scm { | ||
delegate.url 'https://github.com/grails/grails-views/' | ||
delegate.connection 'scm:git:git://github.com/grails/grails-views' | ||
delegate.developerConnection 'scm:git:ssh://github.com:grails/grails-views' | ||
} | ||
delegate.developer { | ||
delegate.id 'puneetbehl' | ||
delegate.name 'Puneet Behl' | ||
delegate.email '[email protected]' | ||
delegate.developers { | ||
delegate.developer { | ||
delegate.id 'graemerocher' | ||
delegate.name 'Graeme Rocher' | ||
delegate.email '[email protected]' | ||
} | ||
delegate.developer { | ||
delegate.id 'puneetbehl' | ||
delegate.name 'Puneet Behl' | ||
delegate.email '[email protected]' | ||
} | ||
} | ||
} | ||
}) | ||
}) | ||
|
||
allprojects { | ||
version = rootProject.version | ||
repositories { | ||
mavenLocal() // Used by Groovy Joint workflow github action after building Groovy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,55 @@ | ||
plugins { | ||
id 'java-gradle-plugin' | ||
id 'groovy' | ||
id 'maven-publish' | ||
id 'signing' | ||
id 'java-gradle-plugin' | ||
id 'groovy' | ||
id 'maven-publish' | ||
id 'signing' | ||
} | ||
|
||
group = 'org.grails.plugins' | ||
ext.set('projectDesc', 'Grails Views Gradle Plugin') | ||
|
||
dependencies { | ||
implementation libs.grails.bootstrap | ||
implementation libs.grails.gradle.plugin | ||
implementation libs.groovy.core | ||
implementation libs.spring.boot.gradle.plugin | ||
implementation libs.grails.bootstrap | ||
implementation libs.grails.gradle.plugin | ||
implementation libs.groovy.core | ||
implementation libs.spring.boot.gradle.plugin | ||
|
||
// This is a workaround for grails-bootstrap exposing a | ||
// different version of groovy-xml than the one used by Gradle. | ||
// This causes issues with the Groovy compiler. | ||
compileOnly "org.codehaus.groovy:groovy-xml:$GroovySystem.version" | ||
// This is a workaround for grails-bootstrap exposing a | ||
// different version of groovy-xml than the one used by Gradle. | ||
// This causes issues with the Groovy compiler. | ||
compileOnly "org.codehaus.groovy:groovy-xml:$GroovySystem.version" | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create('viewsJson') { | ||
id = 'org.grails.plugins.views-json' | ||
implementationClass = 'grails.views.gradle.json.GrailsJsonViewsPlugin' | ||
displayName = 'Grails Json Views Gradle Plugin' | ||
description = 'The Gradle plugin for Json Views' | ||
} | ||
create('viewsMarkup') { | ||
id = 'org.grails.plugins.views-markup' | ||
implementationClass = 'grails.views.gradle.markup.GrailsMarkupViewsPlugin' | ||
displayName = 'Grails Markup Views Gradle Plugin' | ||
description = 'The Gradle plugin for Markup Views' | ||
} | ||
} | ||
plugins { | ||
create('viewsJson') { | ||
id = 'org.grails.plugins.views-json' | ||
implementationClass = 'grails.views.gradle.json.GrailsJsonViewsPlugin' | ||
displayName = 'Grails Json Views Gradle Plugin' | ||
description = 'The Gradle plugin for Json Views' | ||
} | ||
create('viewsMarkup') { | ||
id = 'org.grails.plugins.views-markup' | ||
implementationClass = 'grails.views.gradle.markup.GrailsMarkupViewsPlugin' | ||
displayName = 'Grails Markup Views Gradle Plugin' | ||
description = 'The Gradle plugin for Markup Views' | ||
} | ||
} | ||
} | ||
|
||
// Signing and publishing for this project is handled | ||
// Publishing for this project is handled | ||
// separately as it is using the java-gradle-plugin | ||
afterEvaluate { | ||
def publications = extensions.findByType(PublishingExtension).publications | ||
signing { | ||
required = { isReleaseVersion && gradle.taskGraph.hasTask('publish') } | ||
sign(publications.withType(MavenPublication)) | ||
} | ||
// Modify the 'pluginMaven' publication that is already | ||
// set up by the java-gradle-plugin for the java components | ||
publications.named('pluginMaven', MavenPublication) { | ||
artifactId = project.name | ||
versionMapping { | ||
usage('java-api') { fromResolutionOf('runtimeClasspath') } | ||
usage('java-runtime') { fromResolutionResult() } | ||
} | ||
pom { | ||
name = 'Grails Views' | ||
description = 'Provides additional view technologies to the Grails framework, including JSON and Markup views.' | ||
} | ||
} | ||
// Add our pom info to all publications | ||
// (e.g. also to the plugin marker poms) | ||
publications.withType(MavenPublication).each { | ||
it.pom.withXml { | ||
asNode().children().last() + pomInfo | ||
} | ||
} | ||
publishing.publications.each { MavenPublication publication -> | ||
if (publication.name != "pluginMaven") { | ||
publication.pom.withXml { | ||
def xml = asNode() | ||
xml.children().last() + pomInfo | ||
} | ||
} | ||
} | ||
} | ||
|
||
apply from: rootProject.layout.projectDirectory.file('gradle/java-config.gradle') | ||
apply from: rootProject.layout.projectDirectory.file('gradle/api-docs-config.gradle') | ||
apply from: rootProject.layout.projectDirectory.file('gradle/api-docs-config.gradle') | ||
apply from: rootProject.layout.projectDirectory.file('gradle/publishing.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters