-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
103 lines (88 loc) · 2.61 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
import org.jetbrains.gradle.ext.Gradle
plugins {
id "java"
id "maven-publish"
id "band.kessoku.scripts" apply false
id "dev.architectury.loom" apply false
alias libs.plugins.architectury
alias libs.plugins.shadow apply false
alias libs.plugins.spotless
alias libs.plugins.idea.ext
}
architectury {
minecraft = libs.versions.minecraft.get()
}
idea {
project {
settings {
runConfigurations {
"Run Client"(Gradle) {
taskNames = ["runClient"]
}
"Spotless"(Gradle) {
taskNames = ["spotlessApply"]
}
}
}
}
}
subprojects {
apply plugin: "band.kessoku.scripts"
apply plugin: "dev.architectury.loom"
apply plugin: "architectury-plugin"
apply plugin: "com.diffplug.spotless"
apply plugin: "maven-publish"
assemble.dependsOn spotlessApply
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
mappings(variantOf(libs.yarn) { classifier("v2") })
mappings(libs.yarn.patch)
})
implementation("com.google.auto.service:auto-service-annotations:1.1.1")
annotationProcessor("com.google.auto.service:auto-service:1.1.1")
//Test mod
testImplementation(project(":base-common"))
testImplementation(project(":entrypoint-common"))
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER"))
importOrder('java|javax', '', 'net.minecraft', 'net.fabricmc|net.neoforged')
removeUnusedImports()
indentWithSpaces()
trimTrailingWhitespace()
}
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = base.archivesName.get()
from components.java
}
}
repositories {
maven {
name = "KessokuLib"
url = "https://maven.cloudsmith.io/kessokuteatime/kessokulib/"
credentials {
username = "tex-true"
password = System.getenv("CLOUDSMITH_MAVEN_TOKEN")
}
}
}
}
}
allprojects {
apply plugin: "com.diffplug.spotless"
group = "band.kessoku.lib"
}