-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
104 lines (83 loc) · 2.39 KB
/
build.gradle.kts
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
import java.nio.charset.StandardCharsets
plugins {
java
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
id("maven-publish")
}
version = env["MOD_VERSION"] ?: "${prop["majorVersion"]}.999-${env["GIT_HASH"] ?: "local"}"
allprojects {
apply(plugin = "base")
apply(plugin = "java")
version = rootProject.version
repositories {
mavenCentral {
content {
excludeGroupByRegex("org.lwjgl")
}
}
maven("https://libraries.minecraft.net")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks.withType<JavaCompile> {
options.encoding = StandardCharsets.UTF_8.name()
options.release.set(21)
}
task("listPluginVersions") {
doLast {
project.plugins.forEach {
println("$it -> ${it.javaClass.protectionDomain.codeSource.location.toURI().toString().lowercase()}")
}
}
}
}
subprojects {
apply(plugin = "maven-publish")
base {
archivesName.set("${rootProject.base.archivesName.get()}-${project.name}")
}
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/badasintended/badpackets")
name = "GitHub"
credentials {
username = env["GITHUB_ACTOR"]
password = env["GITHUB_TOKEN"]
}
}
maven {
url = uri("https://maven4.bai.lol")
name = "Badasintended"
credentials {
username = env["MAVEN_USERNAME"]
password = env["MAVEN_PASSWORD"]
}
}
}
}
}
repositories {
maven("https://maven.fabricmc.net/")
mavenCentral()
}
minecraft {
version(rootProp["minecraft"])
}
dependencies {
compileOnly("net.fabricmc:sponge-mixin:0.13.2+mixin.0.8.5")
compileOnly("io.github.llamalad7:mixinextras-common:0.3.5")
compileOnly("org.ow2.asm:asm:9.6")
decompiler("org.vineflower:vineflower:1.10.0")
}
sourceSets {
val main by getting
val testmod by creating
testmod.apply {
compileClasspath += main.compileClasspath + main.output
}
}