diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 50ffab4..9b46a5f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,10 +2,10 @@ name: "Java CI" on: push: branches: - - '[4-9]+(\.[0-9]+)?\.x' + - '[6-9]+.x' pull_request: branches: - - '[4-9]+(\.[0-9]+)?\.x' + - '[6-9]+.x' workflow_dispatch: jobs: test_project: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 254bf96..9aa1619 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }} NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }} - SIGNING_KEY: ${{ secrets.SIGNING_KEY_ID }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} run: > ./gradlew diff --git a/gradle.properties b/gradle.properties index d90795d..a8a4216 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,11 @@ asciidoctorGradlePluginVersion=4.0.4 grailsGradlePluginVersion=6.2.4 version=0.1 + +# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs +# https://github.com/grails/grails-gradle-plugin/issues/222 +slf4jPreventExclusion=true + org.gradle.caching=true org.gradle.daemon=true org.gradle.parallel=true diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 71cdfee..6ad2854 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -6,7 +6,7 @@ ext.set('signing.password', findProperty('signing.password') ?: System.getenv('S def javaComponent = components.named('java') publishing { publications { - register('grailsMailPlugin', MavenPublication) { + register('grailsPlugin', MavenPublication) { from javaComponent.get() versionMapping { usage('java-api') { fromResolutionOf('runtimeClasspath') } @@ -89,16 +89,16 @@ publishing { repositories { maven { credentials { - username = findProperty('artifactoryPublishUsername') ?: '' - password = findProperty('artifactoryPublishPassword') ?: '' + username = System.getenv('MAVEN_PUBLISH_USERNAME') + password = System.getenv('MAVEN_PUBLISH_PASSWORD') } - url = uri('https://repo.grails.org/grails/plugins3-snapshots-local') + url = uri(System.getenv('MAVEN_PUBLISH_URL') ?: '') } } } } -def mavenPublication = extensions.findByType(PublishingExtension).publications.named('grailsMailPlugin') +def mavenPublication = extensions.findByType(PublishingExtension).publications.named('grailsPlugin') tasks.withType(Sign).configureEach { onlyIf { isReleaseVersion } } @@ -111,15 +111,12 @@ afterEvaluate { if (isReleaseVersion) { nexusPublishing { - String sonatypeUsername = findProperty('sonatypeUsername') ?: '' - String sonatypePassword = findProperty('sonatypePassword') ?: '' - String sonatypeStagingProfileId = findProperty('sonatypeStagingProfileId') ?: '' repositories { sonatype { - nexusUrl = uri('https://s01.oss.sonatype.org/service/local/') - username = sonatypeUsername - password = sonatypePassword - stagingProfileId = sonatypeStagingProfileId + nexusUrl = uri(System.getenv('NEXUS_PUBLISH_URL') ?: '') + username = System.getenv('NEXUS_PUBLISH_USERNAME') + password = System.getenv('NEXUS_PUBLISH_PASSWORD') + stagingProfileId = System.getenv('NEXUS_PUBLISH_STAGING_PROFILE_ID') } } } diff --git a/settings.gradle b/settings.gradle index 213ff21..61b83f9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,25 +1,28 @@ plugins { - id 'com.gradle.develocity' version '3.17.1' - id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0' + id 'com.gradle.develocity' version '4.0.2' + id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.3' } -def isCI = System.getenv('CI') == 'true' +def isCI = System.getenv().containsKey('CI') +def isLocal = !isCI develocity { server = 'https://ge.grails.org' buildScan { - publishing.onlyIf { isCI } - uploadInBackground = !isCI + tag('grails-plugins') + tag('grails-cache-redis') + publishing.onlyIf { it.authenticated } + uploadInBackground = isLocal } } buildCache { - local { enabled = !isCI } + local { enabled = isLocal } remote(develocity.buildCache) { enabled = true - push = isCI && System.getenv('DEVELOCITY_ACCESS_KEY') + push = isCI } } -rootProject.name = "cache-redis" +rootProject.name = 'grails-cache-redis' include 'functional-tests' \ No newline at end of file