11plugins {
22 id " maven-publish"
3- id " architectury-plugin " version " 3.4-SNAPSHOT "
4- id " dev.architectury. loom" version " 1.3 -SNAPSHOT" apply( false )
5- id " com.github.johnrengelman.shadow " version " 7 .0.0 " apply( false )
3+ id " idea "
4+ id " fabric- loom" version " 1.7 -SNAPSHOT" apply false
5+ id " net.neoforged.moddev.legacyforge " version " 2 .0.58-beta " apply false
66}
77
8- architectury {
9- minecraft = rootProject. minecraft_version
10- }
11-
12- def isCI = System . getenv(" GITHUB_ACTION" )
13- def isRELEASE = System . getenv(" GITHUB_RELEASE" )
8+ def isGITHU_ACTION = System . getenv(" GITHUB_ACTION" )
149def gitHash () {
1510 String hash = System . getenv(" GITHUB_SHA" )
1611 if (hash != null ) return hash. substring(0 ,8 )
1712 return " "
1813}
1914
2015subprojects {
21- apply plugin : " dev.architectury.loom"
22- java. toolchain. languageVersion = JavaLanguageVersion . of(17 )
23-
24- loom {
25- silentMojangMappingsLicense()
26- }
27-
28- dependencies {
29- minecraft " com.mojang:minecraft:${ rootProject.minecraft_version} "
30- // The following line declares the mojmap mappings, you may use other mappings as well
31- mappings loom. layered() {
32- officialMojangMappings()
33- parchment(" org.parchmentmc.data:parchment-${ rootProject.minecraft_version} :${ rootProject.mappings_version} @zip" )
34- }
35-
36- // The following line declares the yarn mappings you may select this one as well.
37- // mappings "net.fabricmc:yarn:1.17.1+build.32:v2"
38- }
39-
40-
41- }
42-
43- allprojects {
4416 apply plugin : " maven-publish"
4517 apply plugin : " java"
46- apply plugin : " architectury-plugin"
47-
48-
49-
18+ apply plugin : " idea"
5019 group = rootProject. maven_group
51-
20+ version = " ${ project.mod_version} -${ rootProject.minecraft_version} "
21+ java. toolchain. languageVersion = JavaLanguageVersion . of(17 )
5222 apply from : ' https://raw.githubusercontent.com/GregTech-Intergalactical/GradleSripts/main/repositories.gradle'
5323
5424 java {
@@ -59,46 +29,8 @@ allprojects {
5929 it. options. encoding = ' UTF-8'
6030 }
6131
62- if (isCI ) {
32+ if (isGITHU_ACTION ) {
6333 version = version + " -" + gitHash()
34+ println (" In CI mode" )
6435 }
65- }
66-
67- subprojects {
68- if (! project. path. contains(" common" )){
69- apply plugin : " com.github.johnrengelman.shadow"
70-
71- configurations {
72- common
73- shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
74- compileClasspath. extendsFrom common
75- runtimeClasspath. extendsFrom common
76- if (project. path. contains(" forge" )){
77- developmentForge. extendsFrom common
78- } else {
79- developmentFabric. extendsFrom common
80- }
81- }
82-
83- shadowJar {
84- configurations = [project. configurations. shadowCommon]
85- archiveClassifier. set " dev-shadow"
86- }
87-
88- remapJar {
89- input. set shadowJar. archiveFile
90- dependsOn shadowJar
91- archiveClassifier. set null
92- }
93-
94- jar {
95- archiveClassifier. set " dev"
96- }
97-
98- components. java {
99- withVariantsFromConfiguration(project. configurations. shadowRuntimeElements) {
100- skip()
101- }
102- }
103- }
104- }
36+ }
0 commit comments