Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep 5.0.0-M1 #67

Open
wants to merge 19 commits into
base: 5.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
test_project:
name: "Test Project"
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
Expand All @@ -24,8 +24,8 @@ jobs:
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ matrix.java }}
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
Expand All @@ -34,7 +34,7 @@ jobs:
run: ./gradlew check
publish_snapshot:
name: "Build Project and Publish Snapshot release"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: github.event_name == 'push'
steps:
- name: "📥 Checkout repository"
Expand All @@ -53,12 +53,11 @@ jobs:
- name: "📤 Publish Snapshot version to Artifactory (repo.grails.org)"
if: success()
env:
ORG_GRADLE_PROJECT_artifactoryPublishUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
ORG_GRADLE_PROJECT_artifactoryPublishPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: >
./gradlew
-Dorg.gradle.internal.publish.checksums.insecure=true
publish
GRADLE_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
run: ./gradlew publish
- name: "📖 Generate Snapshot Documentation"
if: success()
run: ./gradlew docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: "📝 Update Release Draft"
uses: release-drafter/release-drafter@v6
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ env:
GIT_USER_EMAIL: ${{ vars.GIT_USER_EMAIL }}
jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
Expand All @@ -32,9 +32,12 @@ jobs:
- name: "📤 Publish artifacts to Sonatype"
id: publish_to_sonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GRAILS_PUBLISH_RELEASE: 'true'
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
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_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
run: >
Expand Down
1 change: 1 addition & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java=17.0.13-librca
104 changes: 65 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,61 +1,83 @@
plugins {
id 'groovy'
id 'java-library'
id 'io.github.gradle-nexus.publish-plugin'
id 'maven-publish'
id 'org.asciidoctor.jvm.convert' version '4.0.2'
id 'signing'
buildscript {
repositories {
maven { url = 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath platform("org.grails:grails-bom:$grailsVersion")
classpath "org.asciidoctor.jvm.convert:org.asciidoctor.jvm.convert.gradle.plugin:$asciidoctorGradlePluginVersion"
classpath "org.grails:grails-gradle-plugin"
}
}

version = projectVersion
group = 'org.grails.plugins'
ext.set('grailsVersion', libs.versions.grails.get())
ext.set('isReleaseVersion', !version.toString().endsWith('-SNAPSHOT'))
ext.set('isSnapshot', !isReleaseVersion)

apply plugin: 'org.grails.grails-plugin' // Needs to be applied after grailsVersion has been set
apply plugin: 'groovy'
apply plugin: 'java-library'
apply plugin: 'org.asciidoctor.jvm.convert'
apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.grails-publish'

repositories {
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
mavenCentral()
}

dependencies {

implementation(platform(libs.grails.bom))
implementation(platform("org.grails:grails-bom:$grailsVersion"))

compileOnly libs.servlet.api // Provided by the servlet container
compileOnly libs.grails.core // Provided as this is a Grails plugin
compileOnly libs.groovy.core // Used in public api, but Groovy is always provided

compileOnlyApi libs.javamail.api // Used in public api

api libs.spring.context // Used in public api
api libs.spring.contextSupport // Used in public api
api 'org.springframework:spring-context' // Used in public api
api 'org.springframework:spring-context-support' // Used in public api

// These two libraries are used in public api, but not in a way
// that is meant to be consumed by users of the plugin.
// Therefore they are set to implementation to not expose unnecessarily
// to the compileClasspath of plugin users.
implementation libs.grails.gsp.core
implementation libs.grails.webCommon
implementation 'org.grails:grails-gsp'
implementation 'org.grails:grails-web-common'

implementation 'org.grails:grails-web-taglib'
implementation 'org.grails:grails-web-url-mappings'
implementation 'org.eclipse.angus:jakarta.mail' // Needs to be implementation (not runtimeOnly), as SMTPMessage is used in MailMessageBuilder
implementation 'org.springframework:spring-beans'
implementation 'org.springframework.boot:spring-boot-autoconfigure'

implementation libs.grails.gsp.webTaglib
implementation libs.grails.webUrlmappings
implementation libs.javamail.impl // Needs to be implementation (not runtimeOnly), as SMTPMessage is used in MailMessageBuilder
implementation libs.spring.beans
implementation libs.springboot.autoconfigure
compileOnlyApi 'jakarta.mail:jakarta.mail-api' // Used in public api

testImplementation libs.servlet.api
testImplementation libs.grails.testingSupport.core
testImplementation libs.spock.core
compileOnly 'jakarta.servlet:jakarta.servlet-api' // Provided by the servlet container
compileOnly 'org.grails:grails-core' // Provided as this is a Grails plugin
compileOnly 'org.apache.groovy:groovy' // Used in public api, but Groovy is always provided

integrationTestImplementation libs.greenmail
integrationTestImplementation libs.groovy.xml
integrationTestImplementation libs.spring.web
testImplementation 'jakarta.servlet:jakarta.servlet-api'
testImplementation 'org.grails:grails-testing-support'
testImplementation 'org.spockframework:spock-core'

integrationTestRuntimeOnly libs.springboot.starterTomcat
integrationTestRuntimeOnly libs.grails.testingSupport.web
integrationTestImplementation "com.icegreen:greenmail:$greenmailVersion"
integrationTestImplementation 'org.apache.groovy:groovy-xml'
integrationTestImplementation 'org.springframework:spring-web'

integrationTestRuntimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
integrationTestRuntimeOnly 'org.grails:grails-web-testing-support'
}

grailsPublish {
githubSlug = 'gpc/grails-mail'
license {
name = 'Apache-2.0'
}
title = 'Grails Mail Plugin'
desc = 'Provides Mail support to a running Grails application'
developers = [
candrews: 'Craig Andrews',
ldaley: 'Luke Daley',
pledbrook: 'Peter Ledbrook',
jeffscottbrown: 'Jeff Brown',
graemerocher: 'Graeme Rocher',
marcpalmer: 'Marc Palmer',
sbglasius: 'Søren Berg Glasius',
matrei: 'Mattias Reichel'
]
}

tasks.withType(Test).configureEach {
Expand All @@ -65,7 +87,11 @@ tasks.withType(Test).configureEach {
}
}

apply from: layout.projectDirectory.file('gradle/java-config.gradle')
apply from: layout.projectDirectory.file('gradle/grails-plugin-config.gradle')
compileJava.options.release = javaVersion.toInteger()

// Exclude artifacts used for testing from the production jar
tasks.named('jar', Jar) {
exclude('_testemails', 'messages*.properties')
}

apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')
apply from: layout.projectDirectory.file('gradle/publishing.gradle')
8 changes: 0 additions & 8 deletions buildSrc/build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions buildSrc/settings.gradle

This file was deleted.

5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
projectVersion=5.0.0-SNAPSHOT
grailsVersion=7.0.0-M1
javaVersion=17

asciidoctorGradlePluginVersion=4.0.4
greenmailVersion=2.1.2

# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
# https://github.com/grails/grails-gradle-plugin/issues/222
Expand Down
7 changes: 0 additions & 7 deletions gradle/buildsrc.libs.versions.toml

This file was deleted.

6 changes: 3 additions & 3 deletions gradle/documentation-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies {
add('groovydocConfiguration', localGroovy(), {
because 'groovydoc needs to run with the same version as Gradle'
})
add('guideConfiguration', libs.grails.docs)
add('guideConfiguration', libs.groovy.templates)
add('guideConfiguration', libs.slf4j.nop) // Get rid of logs during guide generation
add('guideConfiguration', 'org.grails:grails-docs')
add('guideConfiguration', 'org.apache.groovy:groovy-templates')
add('guideConfiguration', 'org.slf4j:slf4j-nop') // Get rid of logs during guide generation
}

tasks.withType(Groovydoc).configureEach {
Expand Down
8 changes: 0 additions & 8 deletions gradle/grails-plugin-config.gradle

This file was deleted.

5 changes: 0 additions & 5 deletions gradle/java-config.gradle

This file was deleted.

29 changes: 0 additions & 29 deletions gradle/libs.versions.toml

This file was deleted.

Loading
Loading