Skip to content

Commit

Permalink
Add release task back and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Aug 5, 2024
1 parent 01f0357 commit 3585900
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
cache-read-only: true
# Disable CC due to https://github.com/gradle/gradle/issues/22779
- run: ./gradlew publish publishPlugins gitPublishCopy --no-configuration-cache
- run: ./gradlew release --no-configuration-cache
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_SECRET }}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true

POM_NAME=Shadow Gradle Plugin
POM_DESCRIPTION=Gradle version of Maven's Shade plugin.
POM_DESCRIPTION=Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
POM_INCEPTION_YEAR=2024
POM_URL=https://github.com/GradleUp/shadow
Expand Down
19 changes: 14 additions & 5 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: "com.gradle.plugin-publish"
apply plugin: "com.vanniktech.maven.publish"

group = providers.gradleProperty("GROUP")
version = providers.gradleProperty("VERSION_NAME")
group = providers.gradleProperty("GROUP").get()
version = providers.gradleProperty("VERSION_NAME").get()

gradlePlugin {
website = providers.gradleProperty("POM_URL")
Expand All @@ -12,13 +12,22 @@ gradlePlugin {
shadowPlugin {
id = 'com.gradleup.shadow'
implementationClass = 'com.github.jengelman.gradle.plugins.shadow.ShadowPlugin'
displayName = providers.gradleProperty("POM_NAME").orNull
description = providers.gradleProperty("POM_DESCRIPTION").orNull
tags.set(['onejar', 'shade', 'fatjar', 'uberjar'])
displayName = providers.gradleProperty("POM_NAME").get()
description = providers.gradleProperty("POM_DESCRIPTION").get()
tags = ['onejar', 'shade', 'fatjar', 'uberjar']
}
}
}

tasks.named('publishPlugins') {
doFirst {
if (version.endsWith("SNAPSHOT")) {
throw new GradleException('Cannot publish SNAPSHOT versions to Plugin Portal!')
}
}
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/21283")
}

tasks.register('release') {
dependsOn tasks.named('publish'), tasks.named('publishPlugins'), tasks.named('gitPublishPush')
}

0 comments on commit 3585900

Please sign in to comment.