-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: Initial work for multiloader support
- Loading branch information
1 parent
bdbd17b
commit 7a52034
Showing
50 changed files
with
665 additions
and
457 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 was deleted.
Oops, something went wrong.
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,79 @@ | ||
|
||
plugins { | ||
id("java") | ||
} | ||
|
||
val MINECRAFT_VERSION by extra { "1.20.4" } | ||
val NEOFORGE_VERSION by extra { "20.4.219" } | ||
val FABRIC_LOADER_VERSION by extra { "0.15.6" } | ||
val FABRIC_API_VERSION by extra { "0.96.0+1.20.4" } | ||
|
||
// https://semver.org/ | ||
val MOD_VERSION by extra { "2.0.0" } | ||
|
||
allprojects { | ||
apply(plugin = "java") | ||
apply(plugin = "maven-publish") | ||
} | ||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
subprojects { | ||
repositories { | ||
maven(url = "https://maven.flashyreese.me/releases") | ||
maven(url = "https://maven.flashyreese.me/snapshots") | ||
} | ||
|
||
apply(plugin = "maven-publish") | ||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
|
||
|
||
fun createVersionString(): String { | ||
val builder = StringBuilder() | ||
|
||
val isReleaseBuild = project.hasProperty("build.release") | ||
val buildId = System.getenv("GITHUB_RUN_NUMBER") | ||
|
||
if (isReleaseBuild) { | ||
builder.append(MOD_VERSION) | ||
} else { | ||
builder.append(MOD_VERSION.substringBefore('-')) | ||
builder.append("-snapshot") | ||
} | ||
|
||
builder.append("+mc").append(MINECRAFT_VERSION) | ||
|
||
if (!isReleaseBuild) { | ||
if (buildId != null) { | ||
builder.append("-build.${buildId}") | ||
} else { | ||
builder.append("-local") | ||
} | ||
} | ||
|
||
return builder.toString() | ||
} | ||
|
||
tasks.processResources { | ||
filesMatching("META-INF/mods.toml") { | ||
expand(mapOf("version" to createVersionString())) | ||
} | ||
} | ||
|
||
version = createVersionString() | ||
group = "me.flashyreese.mods" | ||
|
||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
options.release.set(17) | ||
} | ||
|
||
// Disables Gradle's custom module metadata from being published to maven. The | ||
// metadata includes mapped dependencies which are not reasonably consumable by | ||
// other mod developers. | ||
tasks.withType<GenerateModuleMetadata>().configureEach { | ||
enabled = false | ||
} | ||
} |
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,70 @@ | ||
import net.fabricmc.loom.task.AbstractRemapJarTask | ||
|
||
plugins { | ||
id("java") | ||
id("idea") | ||
id("fabric-loom") version "1.6.5" | ||
} | ||
|
||
val MINECRAFT_VERSION: String by rootProject.extra | ||
val FABRIC_LOADER_VERSION: String by rootProject.extra | ||
val FABRIC_API_VERSION: String by rootProject.extra | ||
|
||
dependencies { | ||
"minecraft"(group = "com.mojang", name = "minecraft", version = MINECRAFT_VERSION) | ||
"mappings"(loom.officialMojangMappings()) | ||
compileOnly("io.github.llamalad7:mixinextras-common:0.3.5") | ||
annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5") | ||
compileOnly("net.fabricmc:sponge-mixin:0.13.2+mixin.0.8.5") | ||
|
||
implementation(group = "net.caffeinemc.mods", name = "sodium-common-1.20.4", version = "0.6.0-snapshot+mc1.20.4-local") | ||
modImplementation(group = "net.caffeinemc.mods", name = "sodium-common-1.20.4", version = "0.6.0-snapshot+mc1.20.4-local") | ||
//modImplementation(group = "net.caffeinemc.mods", name = "sodium", version = "0.6.0-snapshot+mc1.20.4-local") | ||
} | ||
|
||
tasks.withType<AbstractRemapJarTask>().forEach { | ||
it.targetNamespace = "named" | ||
} | ||
|
||
|
||
loom { | ||
mixin { | ||
defaultRefmapName = "reeses-sodium-options.refmap.json" | ||
} | ||
|
||
mods { | ||
val main by creating { // to match the default mod generated for Forge | ||
sourceSet("main") | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "FlashyReeseReleases" | ||
url = uri("https://maven.flashyreese.me/releases") | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
} | ||
} | ||
maven { | ||
name = "FlashyReeseSnapshots" | ||
url = uri("https://maven.flashyreese.me/snapshots") | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
} | ||
} | ||
maven { | ||
url = uri("file://" + System.getenv("local_maven")) | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ium_options/client/gui/Dim2iExtended.java → ...ium_options/client/gui/Dim2iExtended.java
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
2 changes: 1 addition & 1 deletion
2
.../client/gui/FlatButtonWidgetExtended.java → .../client/gui/FlatButtonWidgetExtended.java
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
2 changes: 1 addition & 1 deletion
2
...um_options/client/gui/OptionExtended.java → ...um_options/client/gui/OptionExtended.java
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.