Skip to content

Commit

Permalink
Merge branch '5.0.x' into renovate/gradle-8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole authored Dec 14, 2024
2 parents aa2e3de + 7789eeb commit c3e0acf
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 137 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ jobs:
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
arguments: publish
- name: Build Docs
id: docs
if: success()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
NEXUS_PUBLISH_NEXUS_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
Expand Down
34 changes: 1 addition & 33 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@

plugins {
id "java-library"
id "org.grails.grails-gsp"
id "org.grails.grails-plugin"
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin'
}

version = project.projectVersion
group = 'org.grails.plugins'

ext.set('isSnapshot', projectVersion.endsWith('-SNAPSHOT'))
ext.set('isReleaseVersion', !isSnapshot)

ext.set('signing.keyId', project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY'))
ext.set('signing.secretKeyRingFile', project.findProperty('signing.secretKeyRingFile') ?: System.getenv('SIGNING_PASSPHRASE') ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg")
ext.set('signing.password', project.findProperty("signing.password") ?: System.getenv('SIGNING_PASSPHRASE'))




allprojects {

repositories {
Expand All @@ -32,23 +19,4 @@ allprojects {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
}

if (isReleaseVersion) {
apply plugin: "io.github.gradle-nexus.publish-plugin"

nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
}
}
2 changes: 1 addition & 1 deletion examples/redis-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {
runtimeOnly "com.h2database:h2:$h2Version"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:$xmlBindApiVersion"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineGrailVersion"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"

testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
Expand Down
11 changes: 1 addition & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
projectVersion=5.0.0-SNAPSHOT

assetPipelineGrailVersion=5.0.1
assetPipelineGrailVersion=5.0.4
asyncVersion=6.0.0-SNAPSHOT
cacheVersion=8.0.0-SNAPSHOT
commonsPool2Version=2.12.0
Expand All @@ -18,15 +18,6 @@ jredisVersion=5.2.0
scaffoldingVersion=6.0.0-SNAPSHOT
xmlBindApiVersion=4.0.2

title=Grails Redis Plugin
authors=Puneet Behl
projectDesc=This Plugin provides access to Redis and various utilities(service, annotations, etc) for caching.
projectUrl=https://github.com/grails/grails-redis
githubSlug=/grails/grails-redis
githubBranch=5.0.x
developers=Christian Oestreich, Puneet Behl


org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
Expand Down
100 changes: 14 additions & 86 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,19 @@ plugins {
id "eclipse"
id "idea"
id "org.grails.grails-plugin"
id 'signing'
id 'maven-publish'
}

version = project.projectVersion
group = "org.grails.plugins"

apply plugin: 'org.grails.grails-publish'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

def isGrailsPlugin = project.group == 'org.grails.plugins'
def pomInfo = {
delegate.name project.title
delegate.description project.projectDesc
delegate.url 'https://github.com/grails/grails-redis'

delegate.licenses {
delegate.license {
delegate.name 'Apache-2.0'
delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
delegate.distribution 'repo'
}
}

delegate.scm {
delegate.url "scm:[email protected]:${githubSlug}.git"
delegate.connection "https://github.com${githubSlug}"
delegate.developerConnection "scm:git:ssh://github.com:${githubSlug}.git"
}

if (developers) {
delegate.developers {
for (dev in developers.split(',')) {
delegate.developer {
delegate.id dev.toLowerCase().replace(' ', '')
delegate.name dev.strip()
}
}
}
}
}

dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
Expand Down Expand Up @@ -102,56 +70,16 @@ jar {
exclude "src/test/projects/**"
}

publishing {

if (isSnapshot) {
repositories {
maven {
credentials {
def u = System.getenv("ARTIFACTORY_USERNAME") ?: project.findProperty("artifactoryPublishUsername") ?: ''
def p = System.getenv("ARTIFACTORY_PASSWORD") ?: project.findProperty("artifactoryPublishPassword") ?: ''
username = u
password = p
}
url = isGrailsPlugin ?
uri('https://repo.grails.org/grails/plugins3-snapshots-local') :
uri('https://repo.grails.org/grails/libs-snapshots-local')
}
}
grailsPublish {
githubSlug = 'grails/grails-redis'
license {
name = 'Apache-2.0'
}

publications {
maven(MavenPublication) {

groupId = project.group
version = project.version

from components.java

artifact sourcesJar
artifact javadocJar

pom.withXml {

def pomNode = asNode()
pomNode.children().last() + pomInfo

// dependency management shouldn't be included
try { pomNode.dependencyManagement.replaceNode({}) } catch (Throwable ignore) {}
}
}
}
}

if (isReleaseVersion) {
afterEvaluate {
signing {
required = { isReleaseVersion && gradle.taskGraph.hasTask('publish') }
sign(publishing.publications.maven)
}
}
}

tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
title = 'Grails Redis Plugin'
desc = 'This Plugin provides access to Redis and various utilities (service, annotations, etc) for caching.'
developers = ['tednaleid': 'Ted Naleid', 'burtbeckwith': 'Burt Beckwith', 'christianoestreich': 'Christian Oestreich',
'briancoles': 'Brian Coles', 'michaelcameron': 'Michael Cameron', 'johnengelman': 'John Engelman',
'davidseiler': 'David Seiler', 'jordonsaardchit': 'Jordon Saardchit', 'florianlangenhahn': 'Florian Langenhahn',
'germansancho': 'German Sancho', 'johnmulhern': 'John Mulhern', 'shaunjurgemeyer': 'Shaun Jurgemeyer',
'puneetbehl': 'Puneet Behl']
}

0 comments on commit c3e0acf

Please sign in to comment.