Scissors/build.gradle.kts

109 lines
3.1 KiB
Plaintext
Raw Normal View History

2021-06-12 12:09:34 +00:00
plugins {
java
2021-08-25 04:06:30 +00:00
`maven-publish`
2023-04-29 02:43:33 +00:00
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
2024-05-05 17:09:38 +00:00
id("io.papermc.paperweight.patcher") version "1.7.0"
2021-06-12 12:09:34 +00:00
}
2022-06-14 02:10:45 +00:00
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
2022-04-22 05:09:47 +00:00
2021-06-13 04:44:00 +00:00
repositories {
mavenCentral()
2022-04-22 05:09:47 +00:00
maven(paperMavenPublicUrl) {
content { onlyForConfigurations(configurations.paperclip.name) }
2021-06-13 04:44:00 +00:00
}
}
dependencies {
2024-05-05 17:09:38 +00:00
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
decompiler("net.minecraftforge:forgeflower:2.0.674.2")
paperclip("io.papermc:paperclip:3.0.4-SNAPSHOT")
2021-06-13 04:44:00 +00:00
}
2021-08-25 04:06:30 +00:00
allprojects {
2021-06-12 12:09:34 +00:00
apply(plugin = "java")
2021-08-25 04:06:30 +00:00
apply(plugin = "maven-publish")
2021-06-12 12:09:34 +00:00
java {
toolchain {
2024-05-01 21:02:00 +00:00
languageVersion.set(JavaLanguageVersion.of(21))
2021-06-12 12:09:34 +00:00
}
}
2021-08-25 04:06:30 +00:00
}
2021-06-12 12:09:34 +00:00
2021-08-25 04:06:30 +00:00
subprojects {
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
2024-05-01 21:02:00 +00:00
options.release.set(21)
2021-06-12 12:20:45 +00:00
}
2021-08-25 04:06:30 +00:00
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
2023-02-18 02:49:12 +00:00
tasks.withType<Test> {
minHeapSize = "2g"
2023-02-22 20:09:37 +00:00
maxHeapSize = "4g"
2023-02-18 02:49:12 +00:00
}
2021-06-12 12:20:45 +00:00
repositories {
mavenCentral()
2022-04-22 05:09:47 +00:00
maven(paperMavenPublicUrl)
2024-05-01 21:02:00 +00:00
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // TODO - Adventure snapshot
2021-06-12 12:20:45 +00:00
}
}
2021-06-12 12:09:34 +00:00
paperweight {
2022-03-13 01:39:38 +00:00
serverProject.set(project(":Scissors-Server"))
2021-06-12 18:04:04 +00:00
2022-04-22 05:09:47 +00:00
remapRepo.set(paperMavenPublicUrl)
decompileRepo.set(paperMavenPublicUrl)
2021-08-25 04:06:30 +00:00
2021-06-12 12:09:34 +00:00
usePaperUpstream(providers.gradleProperty("paperRef")) {
withPaperPatcher {
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
2022-03-13 01:39:38 +00:00
apiOutputDir.set(layout.projectDirectory.dir("Scissors-API"))
2021-06-12 12:09:34 +00:00
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
2022-03-13 01:39:38 +00:00
serverOutputDir.set(layout.projectDirectory.dir("Scissors-Server"))
2023-12-10 19:12:22 +00:00
patchTasks {
register("generatedApi") {
isBareDirectory.set(true)
upstreamDirPath.set("paper-api-generator/generated")
patchDir.set(layout.projectDirectory.dir("patches/generatedApi"))
outputDir.set(layout.projectDirectory.dir("paper-api-generator/generated"))
}
}
2021-08-25 04:06:30 +00:00
}
}
2022-07-05 22:07:53 +00: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 23:21:18 +00:00
}