-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
112 lines (94 loc) · 2.28 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
plugins {
id 'base'
id 'architectury-plugin' version '3.4-SNAPSHOT'
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "io.github.juuxel.loom-quiltflower" version "1.7.2" apply false
id "com.github.johnrengelman.shadow" version "7.0.0" apply false
id "com.matthewprenger.cursegradle" version "1.4.0" apply false
}
architectury {
minecraft = project.minecraft_version
}
allprojects {
ext.ENV = System.getenv()
repositories {
maven {
url "https://maven.saps.dev/minecraft"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}
}
}
version = "${mod_version}-build.${ENV.GITHUB_RUN_NUMBER ?: 9999}"
group = project.maven_group
base.archivesBaseName = project.archives_base_name
subprojects {
apply plugin: "java"
apply plugin: "dev.architectury.loom"
apply plugin: 'architectury-plugin'
apply plugin: "io.github.juuxel.loom-quiltflower"
apply plugin: "maven-publish"
apply from: "https://files.latmod.com/public/markdown-git-changelog.gradle"
version = rootProject.version
group = rootProject.group
base.archivesBaseName = rootProject.base.archivesBaseName
loom {
silentMojangMappingsLicense()
}
compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
sourceCompatibility = targetCompatibility = '17'
withSourcesJar()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
}
}
}
subprojects {
if (project.path != ':common') {
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "com.matthewprenger.cursegradle"
configurations {
bundle {
canBeResolved(true)
canBeConsumed(false)
}
}
jar {
archiveClassifier.set "dev"
}
shadowJar {
archiveClassifier.set "dev-shadow"
configurations = [
project.configurations.bundle
]
}
remapJar {
dependsOn shadowJar
inputFile.set shadowJar.archiveFile
archiveBaseName.set "${rootProject.archives_base_name}-${project.name}"
archiveClassifier.set null
}
}
}
task collectJars(type: Copy) {
subprojects {
if (project.path != ":common") {
def remapJar = project.tasks.named('remapJar')
dependsOn remapJar
from remapJar
}
}
into(buildDir.toPath().resolve("libs"))
}
assemble {
dependsOn(collectJars)
}