11plugins {
2- id ' net.fabricmc.fabric-loom-remap' version " ${ loom_version} "
3- id ' maven-publish'
2+ id ' net.fabricmc.fabric-loom-remap' version " ${ loom_version} "
3+ id ' maven-publish'
44}
55
66version = project. mod_version
77group = project. maven_group
88
99base {
10- archivesName = project. archives_base_name
10+ archivesName = project. archives_base_name
1111}
1212
1313repositories {
14- // Add repositories to retrieve artifacts from in here.
15- // You should only use this when depending on other mods because
16- // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
17- // See https://docs.gradle.org/current/userguide/declaring_repositories.html
18- // for more information about repositories.
14+ maven {
15+ url = " https://maven.caffeinemc.net/releases"
16+ name = " CaffeineMC"
17+ }
18+ maven {
19+ url = " https://api.modrinth.com/maven"
20+ name = " Modrinth Maven"
21+ }
1922}
2023
2124loom {
22- splitEnvironmentSourceSets()
25+ splitEnvironmentSourceSets()
2326
24- mods {
25- " basicstorage" {
26- sourceSet sourceSets. main
27- sourceSet sourceSets. client
28- }
29- }
27+ mods {
28+ " basicstorage" {
29+ sourceSet sourceSets. main
30+ sourceSet sourceSets. client
31+ }
32+ }
3033
3134}
3235
3336fabricApi {
34- configureDataGeneration()
37+ configureDataGeneration()
3538}
3639
3740dependencies {
38- // To change the versions see the gradle.properties file
39- minecraft " com.mojang:minecraft:${ project.minecraft_version} "
40- mappings loom. officialMojangMappings()
41- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
42-
43- // Fabric API. This is technically optional, but you probably want it anyway.
44- modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
45-
41+ // To change the versions see the gradle.properties file
42+ minecraft " com.mojang:minecraft:${ project.minecraft_version} "
43+ mappings loom. officialMojangMappings()
44+ modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
45+
46+ // Fabric API. This is technically optional, but you probably want it anyway.
47+ modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
48+
49+ // Sodium Integration
50+ modCompileOnly(" net.caffeinemc:sodium-fabric:${ project.sodium_version} " ) {
51+ transitive = false
52+ }
4653}
4754
4855processResources {
49- inputs. property " version" , project. version
56+ inputs. property " version" , project. version
5057
51- filesMatching(" fabric.mod.json" ) {
52- expand " version" : inputs. properties. version
53- }
58+ filesMatching(" fabric.mod.json" ) {
59+ expand " version" : inputs. properties. version
60+ }
5461}
5562
5663tasks. withType(JavaCompile ). configureEach {
57- it. options. release = 21
64+ it. options. release = 21
5865}
5966
6067java {
61- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
62- // if it is present.
63- // If you remove this line, sources will not be generated.
64- withSourcesJar()
68+ // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
69+ // if it is present.
70+ // If you remove this line, sources will not be generated.
71+ withSourcesJar()
6572
66- sourceCompatibility = JavaVersion . VERSION_21
67- targetCompatibility = JavaVersion . VERSION_21
73+ sourceCompatibility = JavaVersion . VERSION_21
74+ targetCompatibility = JavaVersion . VERSION_21
6875}
6976
7077jar {
71- inputs. property " archivesName" , project. base. archivesName
78+ inputs. property " archivesName" , project. base. archivesName
7279
73- from(" LICENSE" ) {
74- rename { " ${ it} _${ inputs.properties.archivesName} " }
75- }
80+ from(" LICENSE" ) {
81+ rename { " ${ it} _${ inputs.properties.archivesName} " }
82+ }
7683}
7784
7885// configure the maven publication
7986publishing {
80- publications {
81- create(" mavenJava" , MavenPublication ) {
82- artifactId = project. archives_base_name
83- from components. java
84- }
85- }
86-
87- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
88- repositories {
89- // Add repositories to publish to here.
90- // Notice: This block does NOT have the same function as the block in the top level.
91- // The repositories here will be used for publishing your artifact, not for
92- // retrieving dependencies.
93- }
87+ publications {
88+ create(" mavenJava" , MavenPublication ) {
89+ artifactId = project. archives_base_name
90+ from components. java
91+ }
92+ }
93+
94+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
95+ repositories {
96+ // Add repositories to publish to here.
97+ // Notice: This block does NOT have the same function as the block in the top level.
98+ // The repositories here will be used for publishing your artifact, not for
99+ // retrieving dependencies.
100+ }
94101}
0 commit comments