Skip to content

Commit 9f61b78

Browse files
committed
Updating Build
1 parent 710fff4 commit 9f61b78

File tree

13 files changed

+212
-132
lines changed

13 files changed

+212
-132
lines changed

.github/workflows/gradle.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,53 @@ jobs:
1515
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
1616
SIGNING_KEYRING: ${{ secrets.SECRING_FILE }}
1717
steps:
18-
- uses: actions/checkout@v4
19-
- name: Setup up node
18+
- name: "📥 Checkout the repository"
19+
uses: actions/checkout@v4
20+
- name: "🧱 Setup up node"
2021
uses: actions/setup-node@v3
2122
with:
2223
node-version: '20.5.1'
23-
- run: npm install
24-
- run: npx gulp grailsRelease
25-
- name: Set up JDK
24+
- name: "Pull node dependencies"
25+
run: npm install
26+
- name: "Package node dependencies"
27+
run: npx gulp grailsRelease
28+
- name: "☕️ Setup JDK"
2629
uses: actions/setup-java@v4
2730
with:
2831
distribution: 'liberica'
2932
java-version: '17'
30-
- name: Setup Gradle
31-
uses: gradle/gradle-build-action@v3
32-
- name: Run build with Gradle Wrapper
33-
run: ./gradlew build -Dgeb.env=chromeHeadless
34-
working-directory: plugin
33+
- name: "🐘 Setup Gradle"
34+
uses: gradle/actions/setup-gradle@v4
35+
- name: "🔨 Run Base Tests"
36+
run: ./gradlew check --continue
3537
publish:
3638
if: github.event_name == 'push'
37-
needs: ['build']
39+
needs: build
3840
runs-on: ubuntu-latest
41+
permissions:
42+
contents: read
3943
steps:
40-
- uses: actions/checkout@v4
41-
- name: Setup up node
44+
- name: "📥 Checkout the repository"
45+
uses: actions/checkout@v4
46+
- name: "🧱 Setup up node"
4247
uses: actions/setup-node@v3
4348
with:
4449
node-version: '20.5.1'
45-
- run: npm install
46-
- run: npx gulp grailsRelease
47-
- name: Set up JDK
50+
- name: "Pull node dependencies"
51+
run: npm install
52+
- name: "Package node dependencies"
53+
run: npx gulp grailsRelease
54+
- name: "☕️ Setup JDK"
4855
uses: actions/setup-java@v4
4956
with:
5057
distribution: 'liberica'
5158
java-version: '17'
52-
- name: Setup Gradle
53-
uses: gradle/gradle-build-action@v3
54-
- name: Publish Artifacts (repo.grails.org)
55-
id: publish
59+
- name: "🐘 Setup Gradle"
60+
uses: gradle/actions/setup-gradle@v4
61+
- name: "📤 Publish to Snapshot (repo.grails.org)"
5662
env:
57-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
58-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
59-
working-directory: plugin
60-
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
63+
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
64+
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
65+
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
66+
working-directory: ./plugin
67+
run: ../gradlew publish

.github/workflows/release.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
env:
6+
GIT_USER_NAME: 'grails-build'
7+
GIT_USER_EMAIL: '[email protected]'
8+
jobs:
9+
publish:
10+
permissions:
11+
contents: write # to create release
12+
issues: write # to modify milestones
13+
runs-on: ubuntu-latest
14+
outputs:
15+
release_version: ${{ steps.release_version.outputs.value }}
16+
target_branch: ${{ steps.extract_branch.outputs.value }}
17+
steps:
18+
- name: "📥 Checkout the repository"
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.GH_TOKEN }}
22+
- name: "🧱 Setup up node"
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '20.5.1'
26+
- name: "Pull node dependencies"
27+
run: npm install
28+
- name: "Package node dependencies"
29+
run: npx gulp grailsRelease
30+
- name: "☕️ Setup JDK"
31+
uses: actions/setup-java@v4
32+
with:
33+
distribution: 'liberica'
34+
java-version: '17'
35+
- name: "🐘 Setup Gradle"
36+
uses: gradle/actions/setup-gradle@v4
37+
- name: "📝 Store the target branch"
38+
id: extract_branch
39+
run: |
40+
echo "Determining Target Branch"
41+
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
42+
echo $TARGET_BRANCH
43+
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
44+
- name: "📝Set the current release version"
45+
id: release_version
46+
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
47+
- name: "⚙️ Run pre-release"
48+
uses: micronaut-projects/github-actions/pre-release@master
49+
with:
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
- name: "🧩 Run Assemble"
52+
if: success()
53+
id: assemble
54+
run: ./gradlew assemble
55+
- name: "🔐 Generate secring file"
56+
env:
57+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
58+
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
59+
- name: "🚀 Publish to Sonatype OSSRH"
60+
id: publish
61+
env:
62+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
63+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
64+
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
65+
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
66+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
67+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
68+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
69+
working-directory: ./plugin
70+
run: >
71+
../gradlew
72+
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
73+
publishToSonatype
74+
closeSonatypeStagingRepository
75+
release:
76+
needs: publish
77+
runs-on: ubuntu-latest
78+
permissions:
79+
contents: read
80+
steps:
81+
- name: "📥 Checkout repository"
82+
uses: actions/checkout@v4
83+
- name: "☕️ Setup JDK"
84+
uses: actions/setup-java@v4
85+
with:
86+
distribution: liberica
87+
java-version: 17
88+
- name: "📥 Checkout repository"
89+
uses: actions/checkout@v4
90+
with:
91+
token: ${{ secrets.GH_TOKEN }}
92+
ref: v${{ needs.publish.outputs.release_version }}
93+
- name: "🐘 Setup Gradle"
94+
uses: gradle/actions/setup-gradle@v4
95+
- name: "🏆Nexus Staging Close And Release"
96+
env:
97+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
98+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
99+
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
100+
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
101+
working-directory: ./plugin
102+
run: >
103+
../gradlew
104+
findSonatypeStagingRepository
105+
releaseSonatypeStagingRepository
106+
- name: "⚙️Run post-release"
107+
if: success()
108+
uses: micronaut-projects/github-actions/post-release@master
109+
with:
110+
token: ${{ secrets.GITHUB_TOKEN }}
111+
env:
112+
SNAPSHOT_SUFFIX: -SNAPSHOT

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Java CI](https://github.com/gpc/grails-web-console/actions/workflows/gradle.yml/badge.svg)](https://github.com/gpc/grails-web-console/actions/workflows/gradle.yml)
1+
[![Java CI](https://github.com/grails-plugins/grails-web-console/actions/workflows/gradle.yml/badge.svg)](https://github.com/grails-plugins/grails-web-console/actions/workflows/gradle.yml)
22

33
# Grails Web Console
44

@@ -27,7 +27,7 @@ repositories {
2727
}
2828
2929
dependencies {
30-
runtimeOnly 'com.github.gpc:grails-web-console:7.0.0-SNAPSHOT'
30+
runtimeOnly 'com.github.grails-plugins:grails-web-console:7.0.0-SNAPSHOT'
3131
}
3232
```
3333

@@ -74,7 +74,7 @@ The following implicit variables are available:
7474
* `session` - the current [HTTP session](http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.html)
7575
* `out` - the output [PrintStream](http://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html)
7676

77-
See [Script Examples](https://github.com/gpc/grails-web-console/wiki/Script-Examples) for example usage.
77+
See [Script Examples](https://github.com/grails-plugins/grails-web-console/wiki/Script-Examples) for example usage.
7878

7979
## Keyboard Shortcuts
8080

app/build.gradle

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id "groovy"
33
id "org.grails.grails-web"
44
id "org.grails.grails-gsp"
5-
id "com.github.erdi.webdriver-binaries"
65
id "war"
76
id "idea"
87
id "com.bertramlabs.asset-pipeline"
@@ -12,20 +11,6 @@ plugins {
1211

1312
group = "grails.app"
1413

15-
repositories {
16-
maven { url "https://repo.grails.org/grails/core" }
17-
}
18-
19-
configurations {
20-
all {
21-
resolutionStrategy.eachDependency { DependencyResolveDetails details->
22-
if (details.requested.group == 'org.seleniumhq.selenium') {
23-
details.useVersion('4.19.1')
24-
}
25-
}
26-
}
27-
}
28-
2914
dependencies {
3015
implementation("org.grails:grails-core")
3116
implementation("org.grails:grails-logging")
@@ -46,22 +31,15 @@ dependencies {
4631
implementation("org.springframework.boot:spring-boot-starter-tomcat")
4732
implementation("org.springframework.boot:spring-boot-starter-validation")
4833
console("org.grails:grails-console")
49-
runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:5.0.1")
34+
runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:${assetPipelineVersion}")
5035
runtimeOnly("com.h2database:h2")
5136
runtimeOnly("org.apache.tomcat:tomcat-jdbc")
5237
runtimeOnly("org.fusesource.jansi:jansi:1.18")
53-
testImplementation("io.micronaut:micronaut-inject-groovy")
5438
testImplementation("org.grails:grails-gorm-testing-support")
5539
testImplementation("org.grails:grails-web-testing-support")
56-
testImplementation("org.grails.plugins:geb")
57-
testImplementation("org.seleniumhq.selenium:selenium-api:4.19.1")
58-
testImplementation("org.seleniumhq.selenium:selenium-remote-driver:4.19.1")
59-
testImplementation("org.seleniumhq.selenium:selenium-support:4.19.1")
40+
41+
integrationTestImplementation testFixtures("org.grails.plugins:geb:${gebVersion}")
6042
testImplementation("org.spockframework:spock-core")
61-
testRuntimeOnly("org.seleniumhq.selenium:selenium-chrome-driver:4.19.1")
62-
testRuntimeOnly("org.seleniumhq.selenium:selenium-firefox-driver:4.19.1")
63-
testRuntimeOnly("org.seleniumhq.selenium:selenium-safari-driver:4.19.1")
64-
testImplementation("io.micronaut:micronaut-http-client")
6543

6644
implementation project(':plugin')
6745

@@ -71,22 +49,10 @@ application {
7149
mainClass.set("grails.app.Application")
7250
}
7351

74-
java {
75-
sourceCompatibility = JavaVersion.toVersion("17")
76-
}
77-
7852
tasks.withType(Test) {
7953
useJUnitPlatform()
80-
systemProperty "geb.env", System.getProperty('geb.env')
81-
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
82-
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
83-
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
84-
}
85-
webdriverBinaries {
86-
chromedriver '122.0.6260.0'
87-
geckodriver '0.33.0'
88-
edgedriver '110.0.1587.57'
8954
}
55+
9056
assets {
9157
minifyJs = true
9258
minifyCss = true

build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
allprojects {
2+
repositories {
3+
mavenCentral()
4+
maven { url "https://repo.grails.org/grails/core" }
5+
}
6+
}
7+
8+
version project.projectVersion
9+
10+
subprojects { project ->
11+
version project.projectVersion
12+
13+
apply plugin: "groovy"
14+
15+
project.compileJava.options.release = 17
16+
}

buildSrc/build.gradle

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/gradle.properties renamed to gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
projectVersion=7.0.0-SNAPSHOT
2+
13
grailsVersion=7.0.0-SNAPSHOT
24
grailsGradlePluginVersion=7.0.0-SNAPSHOT
5+
gebVersion=5.0.0-SNAPSHOT
6+
assetPipelineVersion=5.0.1
37
version=7.0.0-SNAPSHOT
48
org.gradle.caching=true
59
org.gradle.daemon=true

0 commit comments

Comments
 (0)