Scissors/build.gradle.kts

99 lines
2.6 KiB
Text
Raw Normal View History

2021-06-12 08:09:34 -04:00
plugins {
java
2021-08-25 00:06:30 -04:00
`maven-publish`
2023-03-01 20:48:25 -05:00
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
id("io.papermc.paperweight.patcher") version "1.5.2"
2021-06-12 08:09:34 -04:00
}
2022-06-13 22:10:45 -04:00
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
2022-04-22 01:09:47 -04:00
2021-06-13 00:44:00 -04:00
repositories {
mavenCentral()
2022-04-22 01:09:47 -04:00
maven(paperMavenPublicUrl) {
content { onlyForConfigurations(configurations.paperclip.name) }
2021-06-13 00:44:00 -04:00
}
}
dependencies {
2022-11-10 18:23:17 -05:00
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
2023-03-06 01:59:08 -05:00
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
2022-04-19 19:21:18 -04:00
paperclip("io.papermc:paperclip:3.0.2")
2021-06-13 00:44:00 -04:00
}
2021-08-25 00:06:30 -04:00
allprojects {
2021-06-12 08:09:34 -04:00
apply(plugin = "java")
2021-08-25 00:06:30 -04:00
apply(plugin = "maven-publish")
2021-06-12 08:09:34 -04:00
java {
toolchain {
2021-12-02 03:00:38 -05:00
languageVersion.set(JavaLanguageVersion.of(17))
2021-06-12 08:09:34 -04:00
}
}
2021-08-25 00:06:30 -04:00
}
2021-06-12 08:09:34 -04:00
2021-08-25 00:06:30 -04:00
subprojects {
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
2021-12-02 03:00:38 -05:00
options.release.set(17)
2021-06-12 08:20:45 -04:00
}
2021-08-25 00:06:30 -04:00
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
2023-02-17 21:49:12 -05:00
tasks.withType<Test> {
minHeapSize = "2g"
2023-02-22 15:09:37 -05:00
maxHeapSize = "4g"
2023-02-17 21:49:12 -05:00
}
2021-06-12 08:20:45 -04:00
repositories {
mavenCentral()
2022-04-22 01:09:47 -04:00
maven(paperMavenPublicUrl)
2021-06-12 08:20:45 -04:00
}
}
2021-06-12 08:09:34 -04:00
paperweight {
2022-03-12 20:39:38 -05:00
serverProject.set(project(":Scissors-Server"))
2021-06-12 14:04:04 -04:00
2022-04-22 01:09:47 -04:00
remapRepo.set(paperMavenPublicUrl)
decompileRepo.set(paperMavenPublicUrl)
2021-08-25 00:06:30 -04:00
2021-06-12 08:09:34 -04:00
usePaperUpstream(providers.gradleProperty("paperRef")) {
withPaperPatcher {
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
2022-03-12 20:39:38 -05:00
apiOutputDir.set(layout.projectDirectory.dir("Scissors-API"))
2021-06-12 08:09:34 -04:00
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
2022-03-12 20:39:38 -05:00
serverOutputDir.set(layout.projectDirectory.dir("Scissors-Server"))
2021-08-25 00:06:30 -04:00
}
}
2022-07-05 18:07:53 -04:00
}
tasks.generateDevelopmentBundle {
apiCoordinates.set("me.totalfreedom.scissors:scissors-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
"https://repo.scissors.gg/repository/scissors-snapshot/",
)
)
}
allprojects {
// Publishing API:
// ./gradlew :Scissors-API:publish[ToMavenLocal]
publishing {
repositories {
maven {
name = "scissors-snapshots"
url = uri("https://repo.scissors.gg/repository/scissors-snapshot/")
credentials {
username = System.getenv("scissorsUser")
password = System.getenv("scissorsPassword")
}
}
}
}
2022-04-19 19:21:18 -04:00
}