diff --git a/build.gradle.kts b/build.gradle.kts index 3022b4e..a7fab4b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ architectury { } subprojects { + apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "forgified-fabric-loom") apply(plugin = "com.github.johnrengelman.shadow") dependencies { @@ -59,13 +60,7 @@ allprojects { } withType(ProcessResources::class) { val modVersionPair: Pair = "mod_version" to (rootProject.version as String) - filesMatching("fabric.mod.json") { expand(modVersionPair) } - from(sourceSets.main.get().resources.srcDirs) { - include("META-INF/mods.toml") - expand(mutableMapOf(modVersionPair)) - } - from(sourceSets.main.get().resources.srcDirs) { exclude("META-INF/mods.toml") } - inputs.property("mod_version" , rootProject.version) + expand(mutableMapOf(modVersionPair)) } } } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 090fdc2..c22517d 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,5 +1,12 @@ architectury { common() } -dependencies { mappings(loom.officialMojangMappings()) }; loom { silentMojangMappingsLicense() } +dependencies { + mappings(loom.officialMojangMappings()) +} +loom { + silentMojangMappingsLicense() + mixinConfig("sharplapis-mixins.json") + refmapName = "sharplapis-common-refmap.json" +} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..b3910b6 --- /dev/null +++ b/fabric/src/main/resources/fabric.mod.json @@ -0,0 +1,45 @@ +{ + "schemaVersion": 1, + "id": "snowygui", + "version": "${mod_version}", + + "name": "SnowyGui", + "description": "A cross-platform mod offering a useful interface.", + "authors": [ + "Username404" + ], + "contact": { + "sources": "https://gits.username404.fr/Username404-59/SnowyGUI" + }, + + "license": "MPL-2.0", + "icon": "icon.png", + + "environment": "client", + "entrypoints": { + "client": [ + "fr.username404.snowygui.main.SharpLapis" + ], + "modmenu": [ + "fr.username404.snowygui.main.ModMenuSupport" + ] + }, + "mixins": [ + "snowygui-mixins.json" + ], + "depends": { + "fabricloader": ">=0.9.3+build.207", + "fabric-resource-loader-v0": "*", + "minecraft": ">=1.16.2" + }, + "recommends": { + "fabric": "*", + "modmenu": ">=1.15.0" + }, + "breaks": { + "modmenu": "<1.15.0" + }, + "suggests": { + "flamingo": "*" + } +} \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..d3df281 --- /dev/null +++ b/forge/src/main/resources/META-INF/mods.toml @@ -0,0 +1,28 @@ +modLoader = "javafml" +loaderVersion = "[1.7.0,)" +issueTrackerURL = "https://gits.username404.fr/Username404-59/SnowyGUI/issues" +license = "MPL-2.0" + +[[mods]] +modId = "snowygui" +version = "${mod_version}" +displayName = "SnowyGUI" +authors = "Username404" +description = ''' +A cross-platform mod offering a useful interface. +''' +logoFile = "icon.png" + +[[dependencies.snowygui]] +modId = "forge" +mandatory = true +versionRange = "[33,)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.snowygui]] +modId = "minecraft" +mandatory = true +versionRange = "[1.16.2,)" +ordering = "NONE" +side = "BOTH" \ No newline at end of file