forked from Auxilor/libreforge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
103 lines (86 loc) · 2.51 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
}
}
plugins {
java
id("java-library")
id("com.github.johnrengelman.shadow") version "7.0.0"
id("maven-publish")
}
dependencies {
implementation(project(":core"))
}
allprojects {
apply(plugin = "kotlin")
apply(plugin = "java")
apply(plugin = "maven-publish")
apply(plugin = "com.github.johnrengelman.shadow")
repositories {
mavenCentral()
mavenLocal()
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")
maven("https://nexuslite.gcnt.net/repos/other/")
}
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.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.processResources {
filesMatching(listOf("**plugin.yml")) {
expand("projectVersion" to rootProject.version)
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
tasks {
compileJava {
options.encoding = "UTF-8"
dependsOn(clean)
}
build {
dependsOn(shadowJar)
dependsOn(publishToMavenLocal)
}
}
}
group = "com.willfp"
version = findProperty("version")!!
tasks.compileJava {
options.encoding = "UTF-8"
}
tasks.build {
dependsOn("shadowJar")
dependsOn("publishToMavenLocal")
}