11plugins {
2- id ' fabric-loom' version ' 1.7-SNAPSHOT'
3- id ' maven-publish'
2+ id ' dev.architectury.loom' version ' 1.6-SNAPSHOT' apply false
3+ id ' architectury-plugin' version ' 3.4-SNAPSHOT'
4+ id ' com.github.johnrengelman.shadow' version ' 8.1.1' apply false
45}
56
6- version = project. mod_version
7- group = project. maven_group
8-
9- base {
10- archivesName = project. archives_base_name
7+ architectury {
8+ minecraft = project. minecraft_version
119}
1210
13- repositories {
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.
19- maven { url " https://maven.shedaniel.me/" }
20- maven { url " https://maven.terraformersmc.com/releases/" }
21- maven {
22- name = " Terraformers"
23- url = " https://maven.terraformersmc.com/"
24- }
25- exclusiveContent {
26- forRepository {
27- maven {
28- name = " Modrinth"
29- url = " https://api.modrinth.com/maven"
30- }
31- }
32- filter {
33- includeGroup " maven.modrinth"
34- }
35- }
11+ allprojects {
12+ group = rootProject. maven_group
13+ version = rootProject. mod_version
3614}
3715
38- loom {
39- splitEnvironmentSourceSets()
16+ subprojects {
17+ apply plugin : ' dev.architectury.loom'
18+ apply plugin : ' architectury-plugin'
19+ apply plugin : ' maven-publish'
4020
41- mods {
42- " too-many-entities" {
43- sourceSet sourceSets. main
44- sourceSet sourceSets. client
45- }
21+ base {
22+ // Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
23+ archivesName = " $rootProject . archives_name -$project . name "
4624 }
4725
48- }
49-
50- dependencies {
51- // To change the versions see the gradle.properties file
52- minecraft " com.mojang:minecraft:${ project.minecraft_version} "
53- mappings " net.fabricmc:yarn:${ project.yarn_mappings} :v2"
54- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
55-
56- // Fabric API. This is technically optional, but you probably want it anyway.
57- modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
58-
59- // Cloth config
60- modApi(" me.shedaniel.cloth:cloth-config-fabric:${ project.clothconfig_version} " ) {
61- exclude(group : " net.fabricmc.fabric-api" )
26+ repositories {
27+ // Add repositories to retrieve artifacts from in here.
28+ // You should only use this when depending on other mods because
29+ // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
30+ // See https://docs.gradle.org/current/userguide/declaring_repositories.html
31+ // for more information about repositories.
6232 }
63- include " me.shedaniel.cloth:cloth-config-fabric:${ project.clothconfig_version} "
6433
65- // Mod menu
66- modImplementation( " com.terraformersmc:modmenu: ${ project.modmenu_version } " ) {
67- exclude( group : " net.fabricm.fabric-api " )
34+ dependencies {
35+ minecraft " net.minecraft:minecraft: $r ootProject . minecraft_version "
36+ mappings " net.fabricmc:yarn: $r ootProject . yarn_mappings :v2 "
6837 }
6938
70- // Entity Culling
71- modImplementation " maven.modrinth:entityculling:${ project.entityculling_version} "
72- }
73-
74- processResources {
75- inputs. property " version" , project. version
39+ java {
40+ // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
41+ // if it is present.
42+ // If you remove this line, sources will not be generated.
43+ withSourcesJar()
7644
77- filesMatching( " fabric.mod.json " ) {
78- expand " version " : project . version
45+ sourceCompatibility = JavaVersion . VERSION_17
46+ targetCompatibility = JavaVersion . VERSION_17
7947 }
80- }
81-
82- tasks. withType(JavaCompile ). configureEach {
83- it. options. release = project. java_version as Integer
84- }
85-
86- java {
87- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
88- // if it is present.
89- // If you remove this line, sources will not be generated.
90- withSourcesJar()
91-
92- sourceCompatibility = JavaVersion . VERSION_21
93- targetCompatibility = JavaVersion . VERSION_21
94- }
9548
96- jar {
97- from(" LICENSE" ) {
98- rename { " ${ it} _${ project.base.archivesName.get()} " }
49+ tasks. withType(JavaCompile ). configureEach {
50+ it. options. release = 17
9951 }
100- }
10152
102- // configure the maven publication
103- publishing {
104- publications {
105- create(" mavenJava" , MavenPublication ) {
106- artifactId = project. archives_base_name
107- from components. java
53+ // Configure Maven publishing.
54+ publishing {
55+ publications {
56+ mavenJava(MavenPublication ) {
57+ artifactId = base. archivesName. get()
58+ from components. java
59+ }
10860 }
109- }
11061
111- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
112- repositories {
113- // Add repositories to publish to here.
114- // Notice: This block does NOT have the same function as the block in the top level.
115- // The repositories here will be used for publishing your artifact, not for
116- // retrieving dependencies.
62+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
63+ repositories {
64+ // Add repositories to publish to here.
65+ // Notice: This block does NOT have the same function as the block in the top level.
66+ // The repositories here will be used for publishing your artifact, not for
67+ // retrieving dependencies.
68+ }
11769 }
118- }
70+ }
0 commit comments