-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add Simple Renamer example. #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| plugins { | ||||||
| id 'java' | ||||||
| id 'idea' | ||||||
| id 'eclipse' | ||||||
| id 'maven-publish' | ||||||
| id 'net.minecraftforge.gradle' version '[7.0,8.0)' | ||||||
| id 'net.minecraftforge.renamer' version '1.0.1' | ||||||
| } | ||||||
|
|
||||||
| version = '0' | ||||||
| group = 'com.example' | ||||||
| base.archivesName = 'test' | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| java.toolchain.languageVersion = JavaLanguageVersion.of(21) | ||||||
|
|
||||||
| minecraft { | ||||||
| mappings channel: 'official', version: '1.21.10' | ||||||
|
Comment on lines
+14
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.20.1 please, to avoid noobs being confused thinking that modern versions need reobf |
||||||
| } | ||||||
|
|
||||||
| repositories { | ||||||
| maven minecraft.mavenizer | ||||||
| maven fg.forgeMaven | ||||||
| maven fg.minecraftLibsMaven | ||||||
| } | ||||||
|
|
||||||
| dependencies { | ||||||
| implementation minecraft.dependency('net.minecraftforge:forge:1.21.10-60.0.17') | ||||||
| } | ||||||
|
|
||||||
| renamer.classes(jar) { | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
To avoid eager configuration of the Jar task There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does one register multiple reobf jar tasks for different inputs? tasks.register('reobfJar', RenameJar) {
// ?
}Is |
||||||
| // This is generated by mavenizer, this is `net.minecraft:mappings_{channel}:{minecraft}-{mcp}:map2srg@tsrg.gz` | ||||||
| // I intend to both publish these as public artifacts on the Forge maven, and expose a FG helper to make you not need to find the MCP version | ||||||
| // Parchment is official mappings, just with parameters, so you can use official. | ||||||
| mappings('net.minecraft:mappings_official:1.21.10-20251007.101210:map2srg@tsrg.gz') | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where can users find the MCP timestamp found in this artifact string? |
||||||
| } | ||||||
|
|
||||||
| publishing { | ||||||
| repositories { | ||||||
| maven { url = layout.projectDirectory.dir('repo').asFile.toURI() } | ||||||
| } | ||||||
|
|
||||||
| publications.register('mavenJava', MavenPublication) { | ||||||
| from components.java // Publish the normal jar | ||||||
| artifact renameJar // Publish the renamed jar in addition | ||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| org.gradle.caching=true | ||
| org.gradle.parallel=true | ||
| org.gradle.configureondemand=true | ||
|
|
||
| org.gradle.configuration-cache=true | ||
| org.gradle.configuration-cache.parallel=true | ||
| org.gradle.configuration-cache.problems=warn | ||
|
|
||
| net.minecraftforge.gradle.merge-source-sets=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To match the mods.toml version