diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1aecc9e1..6ba4b4f2 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -26,7 +26,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: temurin + distribution: liberica java-version: '17' - name: Start MongoDB uses: supercharge/mongodb-github-action@1.11.0 @@ -36,6 +36,7 @@ jobs: uses: gradle/gradle-build-action@v3 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: arguments: build publish: @@ -49,7 +50,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: temurin + distribution: liberica java-version: '17' - name: Publish to repo.grails.org id: publish @@ -78,7 +79,7 @@ jobs: if_false: ${{ github.repository }} - name: Publish to Github Pages if: steps.docs.outcome == 'success' - uses: micronaut-projects/github-pages-deploy-action@master + uses: grails/github-pages-deploy-action@main env: TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 24578d68..ef805aba 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -115,6 +115,7 @@ jobs: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: build-root-directory: ../groovy arguments: | @@ -158,6 +159,7 @@ jobs: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: arguments: | build diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 5c5f7812..521c0f25 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -31,8 +31,8 @@ jobs: # Otherwise: - name: Export Gradle Properties if: steps.check_release_drafter.outputs.has_release_drafter == 'false' - uses: micronaut-projects/github-actions/export-gradle-properties@master - - uses: micronaut-projects/github-actions/release-notes@master + uses: grails/github-actions/export-gradle-properties@main + - uses: grails/github-actions/release-notes@main if: steps.check_release_drafter.outputs.has_release_drafter == 'false' id: release_notes with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9dae98e..361f7223 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: id: release_version run: echo ::set-output name=release_version::${GITHUB_REF:11} - name: Run pre-release - uses: micronaut-projects/github-actions/pre-release@master + uses: grails/github-actions/pre-release@main with: token: ${{ secrets.GITHUB_TOKEN }} - name: Publish to Sonatyoe OSSRH @@ -35,14 +35,27 @@ jobs: SIGNING_KEY: ${{ secrets.SIGNING_KEY }} SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} SECRING_FILE: ${{ secrets.SECRING_FILE }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: | echo $SECRING_FILE | base64 -d > secring.gpg echo "Publishing Artifacts" (set -x; ./gradlew -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon) + - name: Build Documentation + if: success() + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} + SECRING_FILE: ${{ secrets.SECRING_FILE }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: | echo "Publishing Documentation" ./gradlew docs:docs - name: Export Gradle Properties - uses: micronaut-projects/github-actions/export-gradle-properties@master + uses: grails/github-actions/export-gradle-properties@main - name: Determine docs target repository if: success() uses: haya14busa/action-cond@v1 @@ -53,7 +66,7 @@ jobs: if_false: ${{ github.repository }} - name: Publish to Github Pages if: success() - uses: micronaut-projects/github-pages-deploy-action@master + uses: grails/github-pages-deploy-action@main env: BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }} TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} @@ -67,7 +80,7 @@ jobs: VERSION: ${{ steps.release_version.outputs.release_version }} - name: Run post-release if: success() - uses: micronaut-projects/github-actions/post-release@master + uses: grails/github-actions/post-release@main with: token: ${{ secrets.GITHUB_TOKEN }} env: diff --git a/boot-plugin/build.gradle b/boot-plugin/build.gradle index 6c939fe0..5060eb94 100644 --- a/boot-plugin/build.gradle +++ b/boot-plugin/build.gradle @@ -1,5 +1,6 @@ dependencies { implementation platform("org.grails:grails-bom:$grailsVersion") + compileOnly "org.grails:grails-shell", { exclude group:'org.apache.groovy', module:'groovy' } diff --git a/build.gradle b/build.gradle index 7f456361..323db253 100644 --- a/build.gradle +++ b/build.gradle @@ -67,6 +67,16 @@ allprojects { } } // mavenLocal() // do not commit uncommented, for local testing only + if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) { + System.out.println("Adding Grails Core Repo for ${project.name}") + maven { + url = 'https://maven.pkg.github.com/grails/grails-core' + credentials { + username = 'DOES_NOT_MATTER' + password = System.getenv("GITHUB_MAVEN_PASSWORD") + } + } + } } } @@ -86,7 +96,6 @@ subprojects { Project subproject -> } dependencies { - implementation platform("org.grails:grails-bom:$grailsVersion") testImplementation "io.micrometer:micrometer-core:latest.integration" testImplementation "org.hibernate.validator:hibernate-validator" testImplementation "org.apache.groovy:groovy-test-junit5" @@ -311,8 +320,9 @@ class PublishingConvention { name = 'rx-mongodb' projectName = 'RxGORM for MongoDB' } - else if(name == 'json-templates') { - projectName = 'JSON Views Templates' + else if(name.endsWith('json-templates')) { + projectName = 'Grails Views' + projectDescription = "Provides JSON Views for MongoDB to the Grails framework." } projectArtifactId = name } diff --git a/examples/grails3-hibernate5-mongodb/build.gradle b/examples/grails3-hibernate5-mongodb/build.gradle index 11a278e9..0ce74ea6 100644 --- a/examples/grails3-hibernate5-mongodb/build.gradle +++ b/examples/grails3-hibernate5-mongodb/build.gradle @@ -5,6 +5,7 @@ plugins { group "examples" dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") implementation project(":grails-plugin") implementation "org.mongodb:mongodb-driver-sync" diff --git a/examples/grails3-mongodb-database-per-tenant/build.gradle b/examples/grails3-mongodb-database-per-tenant/build.gradle index 2652d6c1..28ff54a8 100644 --- a/examples/grails3-mongodb-database-per-tenant/build.gradle +++ b/examples/grails3-mongodb-database-per-tenant/build.gradle @@ -3,6 +3,8 @@ plugins { } dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") + implementation project(":grails-plugin") implementation "org.mongodb:mongodb-driver-sync" diff --git a/examples/grails3-mongodb/build.gradle b/examples/grails3-mongodb/build.gradle index 1c06aff3..6f9e34eb 100644 --- a/examples/grails3-mongodb/build.gradle +++ b/examples/grails3-mongodb/build.gradle @@ -5,6 +5,7 @@ plugins { group "examples" dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") implementation project(":grails-plugin") implementation "org.mongodb:mongodb-driver-sync" diff --git a/examples/gson-templates/build.gradle b/examples/gson-templates/build.gradle index 9c9d584a..6fb63f89 100644 --- a/examples/gson-templates/build.gradle +++ b/examples/gson-templates/build.gradle @@ -8,6 +8,7 @@ plugins { group = 'functional.tests' dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") implementation 'org.grails.plugins:views-json' implementation 'org.grails.plugins:views-markup' diff --git a/examples/springboot-mongodb/build.gradle b/examples/springboot-mongodb/build.gradle index 3cf9361c..2eff5f99 100644 --- a/examples/springboot-mongodb/build.gradle +++ b/examples/springboot-mongodb/build.gradle @@ -3,6 +3,8 @@ apply plugin: 'org.springframework.boot' ext['groovy.version'] = "$groovyVersion" dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") + implementation "org.springframework.boot:spring-boot-starter-web" implementation "org.mongodb:mongodb-driver-sync" implementation project(":gorm-mongodb-spring-boot") diff --git a/examples/test-data-service/build.gradle b/examples/test-data-service/build.gradle index 55b0f9ac..8c5b3517 100644 --- a/examples/test-data-service/build.gradle +++ b/examples/test-data-service/build.gradle @@ -12,6 +12,8 @@ buildscript { apply plugin: "java" dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") + implementation "org.grails:grails-plugin-codecs" implementation "org.grails:grails-plugin-datasource" implementation "org.grails.plugins:cache" diff --git a/gradle.properties b/gradle.properties index 33387f60..c9799a17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,18 @@ -projectVersion=9.0.0-SNAPSHOT +projectVersion=9.0.0-M2 asciidoctorGradleVersion=4.0.3 datastoreVersion=9.0.0-M2 gradleNexusPublishPluginVersion=1.3.0 -grailsGradlePluginVersion=7.0.0-SNAPSHOT -grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT -grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT -grailsVersion=7.0.0-SNAPSHOT -grailsViewsVersion=4.0.0-SNAPSHOT +grailsGradlePluginVersion=7.0.0-M2 +grailsVersion=7.0.0-M1 +grailsViewsVersion=4.0.0-M1 groovyVersion=4.0.24 mongodbDriverVersion=5.1.4 testcontainersMongodbVersion=1.20.1 +# for example apps only +grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT +grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT + org.gradle.caching=true org.gradle.parallel=false org.gradle.daemon=true diff --git a/grails-plugin/build.gradle b/grails-plugin/build.gradle index c8eb9d77..6378c301 100644 --- a/grails-plugin/build.gradle +++ b/grails-plugin/build.gradle @@ -18,7 +18,8 @@ dependencies { } api project(":grails-datastore-gorm-mongodb-ext"), { exclude group:'org.grails', module:'grails-datastore-gorm-mongodb' - } + exclude group:'org.grails', module:'grails-bom' + } api project(":grails-datastore-gorm-mongodb"), { exclude group:'org.springframework', module:'spring-context' exclude group:'org.springframework', module:'spring-core'