2021-08-25 04:06:30 +00:00
|
|
|
import io.papermc.paperweight.util.constants.*
|
|
|
|
|
2021-06-12 12:09:34 +00:00
|
|
|
plugins {
|
|
|
|
java
|
2021-08-25 04:06:30 +00:00
|
|
|
`maven-publish`
|
2022-01-27 20:24:04 +00:00
|
|
|
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
2022-03-13 10:52:24 +00:00
|
|
|
id("io.papermc.paperweight.patcher") version "1.2.0"
|
2021-06-12 12:09:34 +00:00
|
|
|
}
|
|
|
|
|
2022-04-11 06:39:25 +00:00
|
|
|
val spigotDecompiler: Configuration by configurations.creating
|
|
|
|
|
2021-06-13 04:44:00 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-07-05 22:33:45 +00:00
|
|
|
maven("https://repo.papermc.io/repository/maven-public/") {
|
2022-04-11 06:39:25 +00:00
|
|
|
content {
|
|
|
|
onlyForConfigurations(
|
|
|
|
configurations.paperclip.name,
|
|
|
|
spigotDecompiler.name,
|
|
|
|
)
|
|
|
|
}
|
2021-06-13 04:44:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-01-27 20:24:04 +00:00
|
|
|
remapper("net.fabricmc:tiny-remapper:0.8.1:fat")
|
2021-12-02 08:00:38 +00:00
|
|
|
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
2022-04-11 06:39:25 +00:00
|
|
|
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
2022-03-20 12:32:37 +00:00
|
|
|
paperclip("io.papermc:paperclip:2.0.1")
|
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 {
|
2021-12-02 08:00:38 +00:00
|
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
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()
|
2021-12-02 08:00:38 +00:00
|
|
|
options.release.set(17)
|
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()
|
|
|
|
}
|
2021-06-12 12:20:45 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-07-05 22:33:45 +00:00
|
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
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
|
|
|
|
2021-10-03 01:46:57 +00:00
|
|
|
remapRepo.set("https://maven.fabricmc.net/")
|
2021-08-25 04:06:30 +00:00
|
|
|
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
|
|
|
|
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"))
|
2021-08-25 04:06:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-05 22:33:45 +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/",
|
|
|
|
"https://repo.papermc.io/repository/maven-public/",
|
|
|
|
"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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|