This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
forked from GradleUp/shadow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into bugfix/classifier-dropped-from-published-jar
- Loading branch information
Showing
46 changed files
with
1,342 additions
and
1,197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Main | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- trunk | ||
push: | ||
branches: | ||
- trunk | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 21 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Execute Gradle build | ||
run: ./gradlew build | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'Goooler/shadow' && github.ref == 'refs/heads/trunk' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 21 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Execute Gradle publish | ||
# Disable CC due to https://github.com/gradle/gradle/issues/22779 | ||
run: ./gradlew publish --no-configuration-cache | ||
env: | ||
ORG_GRADLE_PROJECT_gradle.publish.key: ${{ secrets.GRADLE_PUBLISH_KEY }} | ||
ORG_GRADLE_PROJECT_gradle.publish.secret: ${{ secrets.GRADLE_PUBLISH_SECRET }} | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=2g | ||
GROUP=io.github.goooler.shadow | ||
POM_ARTIFACT_ID=shadow-gradle-plugin | ||
VERSION_NAME=8.1.4-SNAPSHOT | ||
|
||
POM_NAME=Shadow Gradle Plugin | ||
POM_DESCRIPTION=A fork of https://github.com/johnrengelman/shadow | ||
POM_INCEPTION_YEAR=2023 | ||
POM_URL=https://github.com/https://github.com/Goooler/shadow | ||
|
||
POM_LICENSE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENSE_DIST=repo | ||
|
||
POM_SCM_URL=https://github.com/https://github.com/Goooler/shadow | ||
POM_SCM_CONNECTION=scm:git:git://github.com/Goooler/shadow.git | ||
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/Goooler/shadow.git | ||
|
||
POM_DEVELOPER_ID=Gooooler | ||
POM_DEVELOPER_NAME=Zongle Wang | ||
POM_DEVELOPER_URL=https://github.com/Goooler | ||
|
||
SONATYPE_HOST=S01 | ||
|
||
|
||
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx4g -XX:MaxMetaspaceSize=2g | ||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
org.gradle.unsafe.configuration-cache=true | ||
org.gradle.configuration-cache=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,24 @@ | ||
apply plugin: "com.gradle.plugin-publish" | ||
apply plugin: "com.vanniktech.maven.publish" | ||
|
||
group = 'com.github.johnrengelman' | ||
|
||
if (System.env.CIRCLE_TAG && System.env.CIRCLE_TAG =~ /^\d\.\d\.\d$/) { | ||
version = System.env.CIRCLE_TAG | ||
} else { | ||
version = file('src/main/resources/shadow-version.txt').text.trim() | ||
if (!version.endsWith("-SNAPSHOT")) { | ||
version = version + "-SNAPSHOT" | ||
} | ||
} | ||
group = providers.gradleProperty("GROUP") | ||
version = providers.gradleProperty("VERSION_NAME") | ||
|
||
gradlePlugin { | ||
website = 'https://github.com/johnrengelman/shadow' | ||
vcsUrl = 'https://github.com/johnrengelman/shadow' | ||
website = providers.gradleProperty("POM_URL") | ||
vcsUrl = providers.gradleProperty("POM_URL") | ||
|
||
plugins { | ||
shadowPlugin { | ||
id = 'com.github.johnrengelman.shadow' | ||
id = 'io.github.goooler.shadow' | ||
implementationClass = 'com.github.jengelman.gradle.plugins.shadow.ShadowPlugin' | ||
displayName = 'Shadow Plugin' | ||
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." | ||
displayName = providers.gradleProperty("POM_NAME").orNull | ||
description = providers.gradleProperty("POM_DESCRIPTION").orNull | ||
tags.set(['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") | ||
} | ||
|
||
signing { | ||
if (System.env.CI == 'true') { | ||
def encodedSigningKey = findProperty("signingKey") | ||
def signingKey = encodedSigningKey ? new String(encodedSigningKey.decodeBase64()) : null | ||
def signingPassword = findProperty("signingPassword") as String | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
} | ||
// See https://github.com/johnrengelman/shadow/pull/831#discussion_r1119012328 | ||
required = false && gradle.taskGraph.hasTask("artifactoryPublish") | ||
sign(publishing.publications) | ||
} | ||
|
||
tasks.withType(Sign).configureEach { | ||
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13470") | ||
} | ||
|
||
tasks.register('release') { | ||
dependsOn tasks.named('assemble'), tasks.named('publishPlugins'), tasks.named('gitPublishPush') | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.