Skip to content

Commit 6a7d088

Browse files
authored
Merge branch '7.0.x' into bumpGroovy-2.5.14
2 parents 775d3c1 + 76e09c1 commit 6a7d088

File tree

9 files changed

+263
-203
lines changed

9 files changed

+263
-203
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
target-branch: 7.0.x
9+
labels:
10+
- "type: dependency-upgrade"
11+
- package-ecosystem: gradle
12+
directory: "/"
13+
schedule:
14+
interval: daily
15+
open-pull-requests-limit: 10
16+
target-branch: master
17+
labels:
18+
- "type: dependency-upgrade"

.github/release-drafter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name-template: $NEXT_PATCH_VERSION
2+
tag-template: v$NEXT_PATCH_VERSION
3+
categories:
4+
- title: 🚀 Features
5+
labels:
6+
- "type: enhancement"
7+
- "type: new feature"
8+
- "type: major"
9+
- title: 🚀 Bug Fixes/Improvements
10+
labels:
11+
- "type: improvement"
12+
- "type: bug"
13+
- "type: minor"
14+
- title: 🛠 Dependency upgrades
15+
labels:
16+
- "type: dependency-upgrade"
17+
- "dependencies"
18+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
19+
template: |
20+
## Changes
21+
22+
$CHANGES
23+
24+
## Contributors
25+
26+
$CONTRIBUTORS

.github/workflows/gradle.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- '[7-9]+.[0-9]+.x'
7+
pull_request:
8+
branches:
9+
- master
10+
- '[7-9]+.[0-9]+.x'
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
java: ['8', '11']
17+
env:
18+
WORKSPACE: ${{ github.workspace }}
19+
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/cache@v2
23+
with:
24+
path: ~/.gradle/caches
25+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
26+
restore-keys: |
27+
${{ runner.os }}-gradle-
28+
- name: Set up JDK
29+
uses: actions/setup-java@v1
30+
with:
31+
java-version: ${{ matrix.java }}
32+
- name: Optional setup step
33+
run: |
34+
[ -f ./setup.sh ] && ./setup.sh || true
35+
- name: Run Tests
36+
run: |
37+
./gradlew --no-daemon --refresh-dependencies clean check
38+
- name: Publish Test Report
39+
uses: scacap/action-surefire-report@v1
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
report_paths: '**/build/test-results/test/TEST-*.xml'
43+
- name: Run Assemble
44+
if: success() && github.event_name == 'push' && matrix.java == '8'
45+
run: ./gradlew assemble
46+
- name: Publish to repo.grails.org
47+
if: success() && github.event_name == 'push' && matrix.java == '8'
48+
env:
49+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
50+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
51+
run: |
52+
./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
53+
- name: Extract branch name
54+
if: success() && github.event_name == 'push' && matrix.java == '8'
55+
id: extract_branch
56+
run: echo ::set-output name=value::${GITHUB_REF:11}
57+
- name: Create Snapshot Message for the Workflow Dispatch
58+
if: success() && github.event_name == 'push' && matrix.java == '8'
59+
id: dispatch_message
60+
run: echo ::set-output name=value::{\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}
61+
- name: Invoke the Java CI workflow in GORM Hibernate5
62+
if: success() && github.event_name == 'push' && matrix.java == '8'
63+
uses: benc-uk/[email protected]
64+
with:
65+
workflow: Java CI
66+
repo: grails/gorm-hibernate5
67+
ref: ${{ steps.extract_branch.outputs.value }}
68+
token: ${{ secrets.GH_TOKEN }}
69+
inputs: ${{ steps.dispatch_message.outputs.value }}
70+
- name: Invoke the Java CI workflow in GORM MongoDB
71+
if: success() && github.event_name == 'push' && matrix.java == '8'
72+
uses: benc-uk/[email protected]
73+
with:
74+
workflow: Java CI
75+
repo: grails/gorm-mongodb
76+
ref: ${{ steps.extract_branch.outputs.value }}
77+
token: ${{ secrets.GH_TOKEN }}
78+
inputs: ${{ steps.dispatch_message.outputs.value }}
79+
- name: Invoke the Java CI workflow in GORM Neo4j
80+
if: success() && github.event_name == 'push' && matrix.java == '8'
81+
uses: benc-uk/[email protected]
82+
with:
83+
workflow: Java CI
84+
repo: grails/gorm-neo4j
85+
ref: ${{ steps.extract_branch.outputs.value }}
86+
token: ${{ secrets.GH_TOKEN }}
87+
inputs: ${{ steps.dispatch_message.outputs.value }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Changelog
2+
on:
3+
issues:
4+
types: [closed,reopened]
5+
push:
6+
branches:
7+
- master
8+
- '[7-9]+.[0-9]+.x'
9+
jobs:
10+
release_notes:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Check if it has release drafter config file
15+
id: check_release_drafter
16+
run: |
17+
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
18+
echo ::set-output name=has_release_drafter::${has_release_drafter}
19+
20+
# If it has release drafter:
21+
- uses: release-drafter/release-drafter@v5
22+
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
25+
# Otherwise:
26+
- name: Export Gradle Properties
27+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
28+
uses: micronaut-projects/github-actions/export-gradle-properties@master
29+
- uses: micronaut-projects/github-actions/release-notes@master
30+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
31+
id: release_notes
32+
with:
33+
token: ${{ secrets.GH_TOKEN }}
34+
- uses: ncipollo/release-action@v1
35+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
36+
with:
37+
allowUpdates: true
38+
commit: ${{ steps.release_notes.outputs.current_branch }}
39+
draft: true
40+
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
41+
tag: v${{ steps.release_notes.outputs.next_version }}
42+
bodyFile: CHANGELOG.md
43+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: ['8']
11+
env:
12+
GIT_USER_NAME: puneetbehl
13+
GIT_USER_EMAIL: [email protected]
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
token: ${{ secrets.GH_TOKEN }}
19+
- uses: gradle/wrapper-validation-action@v1
20+
- name: Set up JDK
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: ${{ matrix.java }}
24+
- name: Extract Target Branch
25+
id: extract_branch
26+
run: |
27+
echo "Determining Target Branch"
28+
TARGET_BRANCH=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'`
29+
echo $TARGET_BRANCH
30+
echo ::set-output name=value::${TARGET_BRANCH}
31+
- name: Set the current release version
32+
id: release_version
33+
run: echo ::set-output name=release_version::${GITHUB_REF:11}
34+
- name: Run pre-release
35+
uses: micronaut-projects/github-actions/pre-release@master
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Publish to Sonatype OSSRH
39+
env:
40+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
41+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
42+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
43+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
44+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
45+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
46+
run: |
47+
echo $SECRING_FILE | base64 -d > secring.gpg
48+
echo "Publishing Artifacts"
49+
(set -x; ./gradlew -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
50+
(set -x; ./gradlew assemble --no-daemon)
51+
- name: Export Gradle Properties
52+
uses: micronaut-projects/github-actions/export-gradle-properties@master
53+
- name: Run post-release
54+
if: success()
55+
uses: micronaut-projects/github-actions/post-release@master
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
env:
59+
SNAPSHOT_SUFFIX: .BUILD-SNAPSHOT
60+
- name: Create Message for the GORM Documentation Release
61+
if: success()
62+
id: gorm_docs_release_message
63+
run: |
64+
echo ::set-output name=value::{\"gorm_version\":\"$RELEASE_VERSION\"}
65+
env:
66+
RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }}
67+
- name: Invoke gorm-docs release workflow
68+
if: success()
69+
id: gorm_docs
70+
uses: benc-uk/[email protected]
71+
with:
72+
workflow: Release
73+
repo: grails/gorm-docs
74+
ref: ${{ steps.extract_branch.outputs.value }}
75+
token: ${{ secrets.GH_TOKEN }}
76+
inputs: ${{ steps.gorm_docs_release_message.outputs.value }}

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ cache:
66
- $HOME/.gradle/caches/
77
- $HOME/.gradle/wrapper/
88
language: groovy
9+
branches:
10+
only:
11+
- 6.1.x
912
jdk:
1013
- openjdk8
1114
- openjdk11

build.gradle

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,21 @@
11
buildscript {
22
repositories {
3-
mavenLocal()
43
maven { url "https://repo.grails.org/grails/core" }
5-
jcenter()
4+
maven { url "https://plugins.gradle.org/m2/" }
65
}
76
dependencies {
8-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5"
97
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0"
8+
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
109
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
11-
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0"
1210
classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
1311
}
1412
}
1513

1614
project.ext {
1715
isTravisBuild = System.getenv().get("TRAVIS") == 'true'
18-
19-
projectMajorVersion = "7"
20-
projectMinorVersion = "0"
21-
projectPatchVersion = "9"
22-
// releaseType = "RELEASE"
23-
// releaseType = "M2"
24-
// releaseType = "RC1"
25-
releaseType = "BUILD-SNAPSHOT"
26-
2716
// overall project version
28-
projectVersion = "${projectMajorVersion}.${projectMinorVersion}.${projectPatchVersion}"
29-
releaseVersion = "${projectVersion}.${releaseType}"
3017
isCiBuild = project.hasProperty("isCiBuild")
31-
isBuildSnapshot = releaseType == "BUILD-SNAPSHOT"
18+
isBuildSnapshot = version.endsWith("-SNAPSHOT")
3219

3320
nexusUsername = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
3421
nexusPassword = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
@@ -44,20 +31,18 @@ configurations {
4431
all*.exclude group: "commons-logging"
4532
}
4633

47-
version = "${projectVersion}.${releaseType}"
34+
version = project.projectVersion
4835
group = "org.grails"
4936

5037
apply plugin: 'idea'
5138
apply plugin: 'project-report'
52-
apply plugin: 'io.codearte.nexus-staging'
5339

5440
ext {
5541
isCiBuild = project.hasProperty("isCiBuild")
5642
}
5743

5844
allprojects {
5945
repositories {
60-
mavenLocal()
6146
maven { url "https://repo.grails.org/grails/core" }
6247
if(isBuildSnapshot) {
6348
maven { url "https://repo.grails.org/grails/libs-snapshots-local" }
@@ -82,14 +67,14 @@ subprojects {
8267
configurations {
8368
documentation
8469
}
85-
version = "${projectVersion}.${releaseType}"
70+
version = project.projectVersion
8671
group = "org.grails"
8772

8873
afterEvaluate { project ->
8974
if (isGroovyProject(project)) {
9075
def hasSnapshotVersion = project.version.endsWith("-SNAPSHOT")
9176
if(isBuildSnapshot != hasSnapshotVersion) {
92-
throw new StopExecutionException("${project.name} has version \"${project.version}\" which is${isBuildSnapshot ? 'n\'t' : ''} a snapshot version. Current release type is ${releaseType}")
77+
throw new StopExecutionException("${project.name} has version \"${project.version}\" which is${isBuildSnapshot ? 'n\'t' : ''} a snapshot version.")
9378
}
9479
}
9580
}
@@ -101,7 +86,6 @@ subprojects {
10186
apply plugin: 'groovy'
10287
apply plugin: "io.github.groovylang.groovydoc"
10388
apply plugin: 'eclipse'
104-
apply from:"${rootProject.rootDir}/gradle/publishing.gradle"
10589
apply plugin: 'idea'
10690
apply plugin: 'provided-base'
10791
apply plugin: 'optional-base'
@@ -124,7 +108,7 @@ subprojects {
124108
if (isStandardGroovyMavenProject) {
125109
documentation "org.fusesource.jansi:jansi:1.18"
126110
documentation "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
127-
documentation 'info.picocli:picocli:4.5.2'
111+
documentation 'info.picocli:picocli:4.6.1'
128112
compile group: 'org.codehaus.groovy', name: 'groovy', version: groovyVersion
129113

130114
testCompile group: 'org.codehaus.groovy', name: 'groovy-test', version: groovyVersion
@@ -256,6 +240,7 @@ dependencies {
256240

257241
task install(dependsOn: subprojects*.tasks*.withType(PublishToMavenLocal))
258242

243+
apply from: 'https://raw.githubusercontent.com/grails/grails-common-build/1.0.x/common-publishing.gradle'
259244

260245
task test(dependsOn: getTasksByName("test", true)) {
261246
doLast {

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ javaAnnotationApiVersion=1.3.2
1010
elVersion=3.0.0
1111
commonsValidatorVersion=1.6
1212
hibernateVersion=5.4.10
13+
projectVersion=7.0.9.BUILD-SNAPSHOT
1314
servletApiVersion=4.0.1
1415
springVersion=5.1.11.RELEASE
1516
caffeineVersion=2.6.2
@@ -18,4 +19,4 @@ grailsAsyncVersion=3.3.2
1819
slf4jVersion=1.7.29
1920
junitVersion=4.12
2021
javassistVersion=3.21.0-GA
21-
groovyVersion=2.5.14
22+
groovyVersion=2.5.14

0 commit comments

Comments
 (0)