11plugins {
22 id ' dev.architectury.loom' version ' 1.10-SNAPSHOT' apply false
33 id ' architectury-plugin' version ' 3.4-SNAPSHOT'
4- id ' com.github.johnrengelman. shadow' version ' 8.1.1 ' apply false
4+ id ' com.gradleup. shadow' version ' 9.+ ' apply false
55}
66
77architectury {
88 minecraft = project. minecraft_version
99}
1010
1111allprojects {
12+ apply plugin : ' architectury-plugin'
13+
1214 group = rootProject. maven_group
1315 version = rootProject. mod_version
16+
17+ tasks. withType(JavaCompile ). configureEach {
18+ options. encoding = " UTF-8"
19+ options. release = 21
20+ }
1421}
1522
1623subprojects {
1724 apply plugin : ' dev.architectury.loom'
18- apply plugin : ' architectury-plugin'
19- apply plugin : ' maven-publish'
25+ apply plugin : " com.gradleup.shadow"
2026
2127 base {
22- // Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
2328 archivesName = " $rootProject . archives_name -$project . name "
2429 }
2530
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.
32- }
33-
3431 dependencies {
3532 minecraft " net.minecraft:minecraft:$rootProject . minecraft_version "
3633 mappings loom. layered {
@@ -40,34 +37,9 @@ subprojects {
4037 }
4138
4239 java {
43- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
44- // if it is present.
45- // If you remove this line, sources will not be generated.
4640 withSourcesJar()
4741
4842 sourceCompatibility = JavaVersion . VERSION_21
4943 targetCompatibility = JavaVersion . VERSION_21
5044 }
51-
52- tasks. withType(JavaCompile ). configureEach {
53- it. options. release = 21
54- }
55-
56- // Configure Maven publishing.
57- publishing {
58- publications {
59- mavenJava(MavenPublication ) {
60- artifactId = base. archivesName. get()
61- from components. java
62- }
63- }
64-
65- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
66- repositories {
67- // Add repositories to publish to here.
68- // Notice: This block does NOT have the same function as the block in the top level.
69- // The repositories here will be used for publishing your artifact, not for
70- // retrieving dependencies.
71- }
72- }
7345}
0 commit comments