11import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22
33plugins {
4- id ' fabric-loom' version ' 1.10-SNAPSHOT'
5- id ' maven-publish'
6- id " org.jetbrains.kotlin.jvm" version " 2.1.10 "
4+ id ' fabric-loom' version ' 1.10-SNAPSHOT'
5+ id ' maven-publish'
6+ id " org.jetbrains.kotlin.jvm" version " 2.1.20 "
77}
88
99version = project. mod_version
1010group = project. maven_group
1111
1212base {
13- archivesName = project. archives_base_name
13+ archivesName = project. archives_base_name
1414}
1515
1616repositories {
17- // Add repositories to retrieve artifacts from in here.
18- // You should only use this when depending on other mods because
19- // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
20- // See https://docs.gradle.org/current/userguide/declaring_repositories.html
21- // for more information about repositories.
2217}
2318
2419fabricApi {
25- configureDataGeneration {
26- client = true
27- }
20+ configureDataGeneration {
21+ client = true
22+ }
2823}
2924
3025dependencies {
31- // To change the versions see the gradle.properties file
32- minecraft " net.minecraft:minecraft:${ project.minecraft_version} "
33- mappings " net.fabricmc:yarn:${ project.yarn_mappings} :v2"
34- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
35-
36- // Fabric API. This is technically optional, but you probably want it anyway.
37- modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
38- modImplementation " net.fabricmc:fabric-language-kotlin:${ project.fabric_kotlin_version} "
26+ // To change the versions see the gradle.properties file
27+ minecraft " net.minecraft:minecraft:${ project.minecraft_version} "
28+ mappings " net.fabricmc:yarn:${ project.yarn_mappings} :v2"
29+ modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
30+
31+ // Fabric API. This is technically optional, but you probably want it anyway.
32+ modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
33+ modImplementation " net.fabricmc:fabric-language-kotlin:${ project.fabric_kotlin_version} "
3934}
4035
4136processResources {
42- inputs. property " version" , project. version
37+ inputs. property " version" , project. version
4338
44- filesMatching(" fabric.mod.json" ) {
45- expand " version" : inputs. properties. version
46- }
39+ filesMatching(" fabric.mod.json" ) {
40+ expand " version" : inputs. properties. version
41+ }
4742}
4843
4944tasks. withType(JavaCompile ). configureEach {
50- it. options. release = 21
45+ it. options. release = 21
5146}
5247
5348tasks. withType(KotlinCompile ). configureEach {
54- kotlinOptions {
55- jvmTarget = 21
56- }
49+ kotlinOptions {
50+ jvmTarget = 21
51+ }
5752}
5853
5954java {
60- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
61- // if it is present.
62- // If you remove this line, sources will not be generated.
63- withSourcesJar()
55+ // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
56+ // if it is present.
57+ // If you remove this line, sources will not be generated.
58+ withSourcesJar()
6459
65- sourceCompatibility = JavaVersion . VERSION_21
66- targetCompatibility = JavaVersion . VERSION_21
60+ sourceCompatibility = JavaVersion . VERSION_21
61+ targetCompatibility = JavaVersion . VERSION_21
6762}
6863
6964jar {
70- inputs. property " archivesName" , project. base. archivesName
65+ inputs. property " archivesName" , project. base. archivesName
7166
72- from(" LICENSE" ) {
73- rename { " ${ it} _${ inputs.properties.archivesName} " }
74- }
67+ from(" LICENSE" ) {
68+ rename { " ${ it} _${ inputs.properties.archivesName} " }
69+ }
7570}
7671
7772// configure the maven publication
7873publishing {
79- publications {
80- create(" mavenJava" , MavenPublication ) {
81- artifactId = project. archives_base_name
82- from components. java
83- }
84- }
85-
86- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
87- repositories {
88- // Add repositories to publish to here.
89- // Notice: This block does NOT have the same function as the block in the top level.
90- // The repositories here will be used for publishing your artifact, not for
91- // retrieving dependencies.
92- }
74+ publications {
75+ create(" mavenJava" , MavenPublication ) {
76+ artifactId = project. archives_base_name
77+ from components. java
78+ }
79+ }
80+
81+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
82+ repositories {
83+ // Add repositories to publish to here.
84+ // Notice: This block does NOT have the same function as the block in the top level.
85+ // The repositories here will be used for publishing your artifact, not for
86+ // retrieving dependencies.
87+ }
9388}
0 commit comments