Skip to content

Commit 5d07748

Browse files
authored
Merge pull request #10 from grails-plugins/matrei/try-fix-publishing
Try fix publishing
2 parents 1b2dfc0 + cd40d68 commit 5d07748

File tree

5 files changed

+28
-23
lines changed

5 files changed

+28
-23
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "Java CI"
22
on:
33
push:
44
branches:
5-
- '[4-9]+(\.[0-9]+)?\.x'
5+
- '[6-9]+.x'
66
pull_request:
77
branches:
8-
- '[4-9]+(\.[0-9]+)?\.x'
8+
- '[6-9]+.x'
99
workflow_dispatch:
1010
jobs:
1111
test_project:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
4040
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
4141
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
42-
SIGNING_KEY: ${{ secrets.SIGNING_KEY_ID }}
42+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
4343
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
4444
run: >
4545
./gradlew

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ asciidoctorGradlePluginVersion=4.0.4
55

66
grailsGradlePluginVersion=6.2.4
77
version=0.1
8+
9+
# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
10+
# https://github.com/grails/grails-gradle-plugin/issues/222
11+
slf4jPreventExclusion=true
12+
813
org.gradle.caching=true
914
org.gradle.daemon=true
1015
org.gradle.parallel=true

gradle/publishing.gradle

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ext.set('signing.password', findProperty('signing.password') ?: System.getenv('S
66
def javaComponent = components.named('java')
77
publishing {
88
publications {
9-
register('grailsMailPlugin', MavenPublication) {
9+
register('grailsPlugin', MavenPublication) {
1010
from javaComponent.get()
1111
versionMapping {
1212
usage('java-api') { fromResolutionOf('runtimeClasspath') }
@@ -89,16 +89,16 @@ publishing {
8989
repositories {
9090
maven {
9191
credentials {
92-
username = findProperty('artifactoryPublishUsername') ?: ''
93-
password = findProperty('artifactoryPublishPassword') ?: ''
92+
username = System.getenv('MAVEN_PUBLISH_USERNAME')
93+
password = System.getenv('MAVEN_PUBLISH_PASSWORD')
9494
}
95-
url = uri('https://repo.grails.org/grails/plugins3-snapshots-local')
95+
url = uri(System.getenv('MAVEN_PUBLISH_URL') ?: '')
9696
}
9797
}
9898
}
9999
}
100100

101-
def mavenPublication = extensions.findByType(PublishingExtension).publications.named('grailsMailPlugin')
101+
def mavenPublication = extensions.findByType(PublishingExtension).publications.named('grailsPlugin')
102102
tasks.withType(Sign).configureEach {
103103
onlyIf { isReleaseVersion }
104104
}
@@ -111,15 +111,12 @@ afterEvaluate {
111111

112112
if (isReleaseVersion) {
113113
nexusPublishing {
114-
String sonatypeUsername = findProperty('sonatypeUsername') ?: ''
115-
String sonatypePassword = findProperty('sonatypePassword') ?: ''
116-
String sonatypeStagingProfileId = findProperty('sonatypeStagingProfileId') ?: ''
117114
repositories {
118115
sonatype {
119-
nexusUrl = uri('https://s01.oss.sonatype.org/service/local/')
120-
username = sonatypeUsername
121-
password = sonatypePassword
122-
stagingProfileId = sonatypeStagingProfileId
116+
nexusUrl = uri(System.getenv('NEXUS_PUBLISH_URL') ?: '')
117+
username = System.getenv('NEXUS_PUBLISH_USERNAME')
118+
password = System.getenv('NEXUS_PUBLISH_PASSWORD')
119+
stagingProfileId = System.getenv('NEXUS_PUBLISH_STAGING_PROFILE_ID')
123120
}
124121
}
125122
}

settings.gradle

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
plugins {
2-
id 'com.gradle.develocity' version '3.17.1'
3-
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0'
2+
id 'com.gradle.develocity' version '4.0.2'
3+
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.3'
44
}
55

6-
def isCI = System.getenv('CI') == 'true'
6+
def isCI = System.getenv().containsKey('CI')
7+
def isLocal = !isCI
78

89
develocity {
910
server = 'https://ge.grails.org'
1011
buildScan {
11-
publishing.onlyIf { isCI }
12-
uploadInBackground = !isCI
12+
tag('grails-plugins')
13+
tag('grails-cache-redis')
14+
publishing.onlyIf { it.authenticated }
15+
uploadInBackground = isLocal
1316
}
1417
}
1518

1619
buildCache {
17-
local { enabled = !isCI }
20+
local { enabled = isLocal }
1821
remote(develocity.buildCache) {
1922
enabled = true
20-
push = isCI && System.getenv('DEVELOCITY_ACCESS_KEY')
23+
push = isCI
2124
}
2225
}
2326

24-
rootProject.name = "cache-redis"
27+
rootProject.name = 'grails-cache-redis'
2528
include 'functional-tests'

0 commit comments

Comments
 (0)