-
-
Notifications
You must be signed in to change notification settings - Fork 5
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, add readme (#3)
- Loading branch information
1 parent
7b72389
commit 892ead3
Showing
12 changed files
with
115 additions
and
141 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: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main | ||
with: | ||
java: 8 | ||
gradle_tasks: "publish" | ||
artifact_name: "jarsplitter" | ||
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# JarSplitter | ||
|
||
Splits a jar file into data, slim and classes jars. |
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,42 +1,59 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import net.minecraftforge.gradleutils.PomUtils | ||
|
||
plugins { | ||
id 'java' | ||
id 'eclipse' | ||
id 'maven-publish' | ||
id 'org.cadixdev.licenser' version '0.6.1' | ||
id 'net.minecraftforge.gradleutils' version '2.+' | ||
id 'com.github.johnrengelman.shadow' version '2.0.4' | ||
id 'java' | ||
id 'eclipse' | ||
id 'maven-publish' | ||
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' | ||
version = gradleutils.getTagOffsetVersion() | ||
println('Version: ' + version) | ||
println "Version: $version" | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(8) | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
withSourcesJar() | ||
} | ||
|
||
repositories { | ||
maven { url = 'https://maven.minecraftforge.net/' } | ||
mavenCentral() | ||
maven gradleutils.forgeMaven | ||
} | ||
|
||
dependencies { | ||
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' | ||
implementation 'net.minecraftforge:srgutils:0.4.3' | ||
} | ||
|
||
license { | ||
header project.file('LICENSE-header.txt') | ||
include 'net/minecraftforge/jarsplitter/**/*.java' | ||
newLine false | ||
header = file('LICENSE-header.txt') | ||
newLine = false | ||
exclude '**/*.properties' | ||
} | ||
|
||
jar { | ||
manifest.attributes('Main-Class': 'net.minecraftforge.jarsplitter.ConsoleTool') | ||
manifest.attributes('Implementation-Version': project.version) | ||
tasks.named('jar', Jar).configure { | ||
manifest { | ||
attributes([ | ||
'Main-Class': 'net.minecraftforge.jarsplitter.ConsoleTool', | ||
'Implementation-Version': project.version | ||
]) | ||
} | ||
} | ||
|
||
shadowJar { | ||
classifier 'fatjar' | ||
manifest.attributes('Main-Class': 'net.minecraftforge.jarsplitter.ConsoleTool') | ||
manifest.attributes('Implementation-Version': project.version) | ||
tasks.named('shadowJar', ShadowJar).configure { | ||
archiveClassifier = 'fatjar' | ||
manifest { | ||
attributes([ | ||
'Main-Class': 'net.minecraftforge.jarsplitter.ConsoleTool', | ||
'Implementation-Version': project.version | ||
]) | ||
} | ||
} | ||
|
||
artifacts { | ||
|
@@ -45,47 +62,28 @@ artifacts { | |
archives sourcesJar | ||
} | ||
|
||
dependencies { | ||
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' | ||
implementation 'net.minecraftforge:srgutils:0.4.3' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact shadowJar | ||
|
||
pom { | ||
name = 'Jar Splitter' | ||
description = 'Splits a jar file into classes and data, used in the Forge installer' | ||
url = 'https://github.com/MinecraftForge/JarSplitter' | ||
scm { | ||
url = 'https://github.com/MinecraftForge/JarSplitter' | ||
connection = 'scm:git:git://github.com/MinecraftForge/JarSplitter.git' | ||
developerConnection = 'scm:git:[email protected]:MinecraftForge/JarSplitter.git' | ||
} | ||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/MinecraftForge/JarSplitter/issues' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'LGPLv2.1' | ||
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'LexManos' | ||
name = 'Lex Manos' | ||
} | ||
} | ||
publications.register('mavenJava', MavenPublication) { | ||
from components.java | ||
artifact shadowJar | ||
|
||
artifactId = 'jarsplitter' | ||
|
||
pom { | ||
name = 'Jar Splitter' | ||
description = 'Splits a jar file into classes and data, used in the Forge installer' | ||
url = 'https://github.com/MinecraftForge/JarSplitter' | ||
|
||
PomUtils.setGitHubDetails(pom, 'JarSplitter') | ||
|
||
license PomUtils.Licenses.LGPLv2_1 | ||
|
||
developers { | ||
developer PomUtils.Developers.LexManos | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven gradleutils.getPublishingForgeMaven() | ||
} | ||
|
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.6.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-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
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