-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradle 8.4, GH Actions publishing (#4)
- Loading branch information
1 parent
059b727
commit e90dd9d
Showing
43 changed files
with
119 additions
and
287 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main | ||
with: | ||
java: 8 | ||
gradle_tasks: "publish" | ||
artifact_name: "JarCompatibilityChecker" | ||
secrets: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }} | ||
PROMOTE_ARTIFACT_USERNAME: ${{ secrets.PROMOTE_ARTIFACT_USERNAME }} | ||
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,32 +1,28 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import net.minecraftforge.gradleutils.PomUtils | ||
|
||
plugins { | ||
id 'java' | ||
id 'maven-publish' | ||
id 'com.github.johnrengelman.shadow' version '7.1.2' | ||
id 'org.cadixdev.licenser' version '0.6.1' | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
id 'net.minecraftforge.gradleutils' version '2.+' | ||
} | ||
|
||
group 'net.minecraftforge' | ||
|
||
group = 'net.minecraftforge' | ||
version = gradleutils.getTagOffsetVersion() | ||
println('Version: ' + version) | ||
java.toolchain.languageVersion = JavaLanguageVersion.of(8) | ||
|
||
ext { | ||
CHANGELOG_TAG = '0.1' | ||
} | ||
println "Version: $version" | ||
|
||
license { | ||
header project.file('LICENSE-header.txt') | ||
include 'net/minecraftforge/jarcompatibilitychecker/**/*.java' | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
withSourcesJar() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
|
||
maven { | ||
url 'https://maven.minecraftforge.net/' | ||
} | ||
maven gradleutils.forgeMaven | ||
} | ||
|
||
dependencies { | ||
|
@@ -39,7 +35,7 @@ dependencies { | |
testImplementation 'junit:junit:4.13.2' | ||
} | ||
|
||
jar { | ||
tasks.named('jar', Jar).configure { | ||
from(project.rootDir) { | ||
include 'LICENSE' | ||
} | ||
|
@@ -52,7 +48,7 @@ jar { | |
} | ||
} | ||
|
||
shadowJar { | ||
tasks.named('shadowJar', ShadowJar).configure { | ||
from(project.rootDir) { | ||
include 'LICENSE' | ||
} | ||
|
@@ -63,56 +59,44 @@ shadowJar { | |
exclude 'META-INF/versions/9/module-info.class' | ||
} | ||
|
||
assemble.dependsOn shadowJar | ||
|
||
java.withSourcesJar() | ||
tasks.named('assemble').configure { | ||
dependsOn 'shadowJar' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation | ||
} | ||
|
||
changelog { | ||
fromTag '0.1' | ||
} | ||
|
||
license { | ||
header = file('LICENSE-header.txt') | ||
newLine = false | ||
include 'net/minecraftforge/jarcompatibilitychecker/**/*.java' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = 'JAR Compatibility Checker' | ||
description = 'Reports API or binary incompatibilities between two JARs' | ||
url = 'https://github.com/MinecraftForge/JarCompatibilityChecker' | ||
|
||
scm { | ||
url = 'https://github.com/MinecraftForge/JarCompatibilityChecker' | ||
connection = 'scm:git:git://github.com/MinecraftForge/JarCompatibilityChecker.git' | ||
developerConnection = 'scm:git:[email protected]:MinecraftForge/JarCompatibilityChecker.git' | ||
} | ||
|
||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/MinecraftForge/JarCompatibilityChecker/issues' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'LGPLv2.1' | ||
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'SizableShrimp' | ||
name = 'SizableShrimp' | ||
} | ||
} | ||
publications.register('mavenJava', MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = 'JAR Compatibility Checker' | ||
description = 'Reports API or binary incompatibilities between two JARs' | ||
url = 'https://github.com/MinecraftForge/JarCompatibilityChecker' | ||
|
||
PomUtils.setGitHubDetails(pom, 'JarCompatibilityChecker') | ||
|
||
license PomUtils.Licenses.LGPLv2_1 | ||
|
||
developers { | ||
developer PomUtils.Developers.SizableShrimp | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven gradleutils.getPublishingForgeMaven() | ||
} | ||
} | ||
|
||
changelog { | ||
fromTag CHANGELOG_TAG | ||
} |
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,3 @@ | ||
org.gradle.configureondemand=true | ||
org.gradle.caching=true | ||
org.gradle.parallel=true |
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,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.