-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.gradle.kts
94 lines (79 loc) · 2.31 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
}
}
plugins {
java
id("java-library")
id("io.github.goooler.shadow") version "8.1.7"
id("maven-publish")
}
allprojects {
apply(plugin = "kotlin")
apply(plugin = "java")
apply(plugin = "maven-publish")
apply(plugin = "io.github.goooler.shadow")
repositories {
mavenCentral()
maven("https://repo.auxilor.io/repository/maven-public/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://maven.citizensnpcs.co/repo")
}
dependencies {
compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
compileOnly(fileTree("lib") { include("*.jar") })
}
publishing {
repositories {
maven {
name = "auxilor"
url = uri("https://repo.auxilor.io/repository/maven-releases/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
tasks {
processResources {
filesMatching(listOf("**plugin.yml")) {
expand("projectVersion" to rootProject.version)
}
}
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 17
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
compileJava {
dependsOn(clean)
}
build {
dependsOn(shadowJar)
dependsOn(publishToMavenLocal)
}
}
java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}
group = "com.willfp"
version = findProperty("version")!!