generated from GregTech-Intergalactical/ExampleMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
176 lines (153 loc) · 5.04 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import org.gradle.api.tasks.compile.JavaCompile
plugins {
id "maven-publish"
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply(false)
id "com.github.johnrengelman.shadow" version "7.0.0" apply(false)
}
architectury {
minecraft = rootProject.minecraft_version
}
//Print out JVM information so that we know what version is running. Extreamly useful for people to know when helping you.
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
allprojects {
apply plugin: "maven-publish"
apply plugin: "java"
apply plugin: "architectury-plugin"
group = rootProject.maven_group
repositories {
maven {
url = uri("https://storage.googleapis.com/devan-maven/")
}
maven { url = 'https://maven.minecraftforge.net' }
maven {
name = 'parchment'
url = 'https://maven.parchmentmc.org'
}
maven { url 'https://dvs1.progwml6.com/files/maven' }
//Needed for intellij
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven { url "https://maven.shedaniel.me" }
maven {
url "https://maven.terraformersmc.com"
content {
includeGroup "com.terraformersmc"
}
}
maven {
// Shedaniel's maven (Architectury API)
url = "https://maven.architectury.dev"
content {
includeGroup "dev.architectury"
}
}
maven {
url = 'https://maven.blamejared.com'
name = 'BlameJared Maven'
}
maven { url = "https://mvn.devos.one/snapshots/" }
maven {
// saps.dev Maven (KubeJS and Rhino)
url = "https://maven.saps.dev/minecraft"
content {
includeGroup "dev.latvian.mods"
}
}
maven {
name = "Fuzs Mod Resources"
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
}
//GT and Felt.
maven {
url "https://repo.repsy.io/mvn/trinsdar/gregtech-intergalactical/"
}
maven {
url "https://repo.repsy.io/mvn/distant/feltmc"
}
maven {
url = uri("https://ueaj.dev/maven")
}
maven { url 'https://jitpack.io' }
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
}
}
subprojects {
apply plugin: "dev.architectury.loom"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
if (!project.path.contains("common")){
apply plugin: "com.github.johnrengelman.shadow"
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
if (project.path.contains("forge")){
developmentForge.extendsFrom common
} else{
developmentFabric.extendsFrom common
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
}
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.mappings_version}@zip")
}
// The following line declares the yarn mappings you may select this one as well.
// mappings "net.fabricmc:yarn:1.17.1+build.32:v2"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "examplemod-" + project.name
artifact(sourcesJar) {
builtBy remapSourcesJar
}
afterEvaluate {
artifact remapJar
}
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
}