diff --git a/build.gradle b/build.gradle index 6e5066bff1b..a63a9158373 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,15 @@ ext { isCiBuild = System.getenv('CI') + isSnapshot = projectVersion.endsWith('SNAPSHOT') + isReleaseVersion = !isSnapshot excludeUnusedTransDeps = findProperty('excludeUnusedTransDeps') } +if (isReleaseVersion) { + // This has to be applied to the root project + apply plugin: 'io.github.gradle-nexus.publish-plugin' +} + String customGroovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION') if (customGroovyVersion) { logger.lifecycle("Using custom Groovy version: $customGroovyVersion") diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index fc836be2fbc..838b6f565e4 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -25,4 +25,5 @@ repositories { dependencies { implementation platform("org.grails:grails-bom:${versions.getProperty('grailsVersion')}") implementation 'org.grails:grails-gradle-plugin' + runtimeOnly 'io.github.gradle-nexus:publish-plugin:2.0.0' } \ No newline at end of file