-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
100 lines (79 loc) · 2.27 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
plugins {
id 'java'
id 'xyz.wagyourtail.unimined' version '0.4.0-SNAPSHOT'
id "com.github.johnrengelman.shadow" version "7.1.2" apply false
}
minecraft {
runs.off = true
}
allprojects {
apply plugin: 'java'
apply plugin: 'xyz.wagyourtail.unimined'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
// sponge
maven { url "https://repo.spongepowered.org/maven" }
// fabric
maven { url "https://maven.fabricmc.net" }
mavenCentral()
}
dependencies {
minecraft "net.minecraft:minecraft:${rootProject.minecraft_version}"
mappings "net.fabricmc:intermediary:${rootProject.minecraft_version}:v2"
mappings "net.minecraft:minecraft:1.19.3:client-mappings"
implementation "org.spongepowered:mixin:0.8.5"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}
test {
useJUnitPlatform()
}
}
subprojects {
configurations {
common
shadowCommon
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
}
dependencies {
for (sourceSet in project(":").sourceSets) {
if (sourceSet == project(":").sourceSets.test) continue
common sourceSet.output
shadowCommon sourceSet.output
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
task createDist(type: Copy) {
from(new File(project.buildDir, "libs"))
into new File(rootProject.rootDir, "dist")
}
build.finalizedBy(createDist)
}
remapJar {
target = "mojmap"
}
task removeDist(type: Delete) {
delete new File(rootProject.rootDir, "dist")
}
clean.finalizedBy(removeDist)