This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (70 loc) · 2.06 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
/*
* Copyright (c) 2022, The ProxyFox Group
*
* This Source Code is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.shadow)
alias(libs.plugins.licenser)
}
tasks {
jar {
archiveClassifier.set("nodeps")
}
shadowJar {
archiveClassifier.set("")
}
register<Copy>("poolRelease") {
group = "build"
for (proj in subprojects) {
val shadowJar = proj.tasks.findByPath("shadowJar")
if (shadowJar != null) {
from(shadowJar)
}
}
// Explicitly pull in Patch
from(project(":modules:patch").tasks.jar)
into(project.buildDir.resolve("pool"))
}
}
allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.quiltmc.gradle.licenser")
license {
rule(file("${rootProject.projectDir}/HEADER"))
include("**/*.kt")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven("https://libraries.minecraft.net/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.quiltmc.org/repository/release/")
maven("https://maven.quiltmc.org/repository/snapshot/")
maven("https://maven.fabricmc.net/")
maven("https://jitpack.io")
}
dependencies {
testImplementation(rootProject.libs.bundles.test)
}
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = java.targetCompatibility.majorVersion
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
findByName("shadowJar")?.let {
build {
dependsOn(it)
}
}
test {
useTestNG()
}
}
}