-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
78 lines (64 loc) · 1.88 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
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
id("com.diffplug.spotless") version "6.22.0" apply false
id("com.matthewprenger.cursegradle") version "1.4.0" apply false
id("com.modrinth.minotaur") version "2.8.4" apply false
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
}
architectury {
minecraft = rootProject.minecraft_version
}
subprojects {
apply(plugin: "dev.architectury.loom")
apply(plugin: "com.diffplug.spotless")
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
mappings(loom.officialMojangMappings())
}
base {
archivesName.set("$rootProject.name-$name")
}
/////////////
// Spotless
spotless {
java {
target("src/main/java/**/*.java")
endWithNewline()
indentWithSpaces()
removeUnusedImports()
toggleOffOn()
eclipse().configFile(rootProject.file("codeformat/codeformat.xml"))
importOrderFile(rootProject.file("codeformat/ae2.importorder"))
}
format("json") {
target("src/main/resources/**/*.json")
prettier().config(parser: "json")
}
}
}
allprojects {
apply(plugin: "java")
apply(plugin: "architectury-plugin")
group = "me.ramidzkh"
version = System.getenv("APPBOT_VERSION") ?: "0.0.0"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
}
def copyOutputs = tasks.register('copyOutputs', Copy) {
from(project(":fabric").remapJar)
from(project(":forge").remapJar)
into(project.distsDirectory)
}
build {
dependsOn(copyOutputs)
}