diff options
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle index b6cb6c0..a8bdc34 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,10 @@ plugins { version = project.mod_version group = project.maven_group +base { + archivesName = project.archives_base_name +} + repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because @@ -14,6 +18,18 @@ repositories { // for more information about repositories. } +loom { + splitEnvironmentSourceSets() + + mods { + "modid" { + sourceSet sourceSets.main + sourceSet sourceSets.client + } + } + +} + dependencies { // To change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" @@ -22,17 +38,13 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - + // Uncomment the following line to enable the deprecated Fabric API modules. // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" } -base { - archivesName = project.archives_base_name -} - processResources { inputs.property "version", project.version @@ -42,7 +54,6 @@ processResources { } tasks.withType(JavaCompile).configureEach { - // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. it.options.release = 17 } @@ -58,7 +69,7 @@ java { jar { from("LICENSE") { - rename { "${it}_${base.archivesName.get()}"} + rename { "${it}_${project.archivesBaseName}"} } } @@ -77,4 +88,4 @@ publishing { // The repositories here will be used for publishing your artifact, not for // retrieving dependencies. } -} +}
\ No newline at end of file |
