forked from connection-lost/LockettePro
-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle.kts
80 lines (70 loc) · 2.23 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
import java.net.URI
plugins {
id("java")
id("maven-publish")
}
group = "me.crafter.mc"
version = "2.15"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") //papermc
maven("https://jitpack.io") //vault
maven("https://maven.enginehub.org/repo/") //world guard
maven("https://repo.dmulloy2.net/repository/public/" ) //protocol lib
maven("https://maven.playpro.com") //core protect
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
compileOnly("com.comphenix.protocol:ProtocolLib:5.1.0")
compileOnly("net.coreprotect:coreprotect:22.4")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = project.group.toString()
artifactId = rootProject.name.lowercase()
version = project.version.toString()
}
}
repositories {
maven {
name = "GithubPackage"
url =
URI(System.getenv("GITHUB_MAVEN_URL") ?: "https://github.com/")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "NyaaCatCILocal"
//local maven repository
url = uri("file://${System.getenv("MAVEN_DIR")}")
}
}
}
tasks {
compileJava {
options.compilerArgs.add("-Xlint:deprecation")
options.encoding = "UTF-8"
}
processResources {
filesMatching("**/plugin.yml") {
expand("version" to project.version)
}
}
// Custom tasks for publishing to specific repositories
register("publishToGithubPackage") {
dependsOn("publishMavenJavaPublicationToGithubPackageRepository")
// auto generated task: publish<PublicationName>PublicationTo<RepositoryName>Repository
}
register("publishToNyaaCatCILocal") {
dependsOn("publishMavenJavaPublicationToNyaaCatCILocalRepository")
}
}