2021-08-25 00:06:30 -04:00
|
|
|
import io.papermc.paperweight.util.constants.*
|
|
|
|
|
2021-06-12 08:09:34 -04:00
|
|
|
plugins {
|
|
|
|
java
|
2021-08-25 00:06:30 -04:00
|
|
|
`maven-publish`
|
2021-06-12 08:09:34 -04:00
|
|
|
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
2021-10-02 21:46:57 -04:00
|
|
|
id("io.papermc.paperweight.patcher") version "1.1.12"
|
2021-06-12 08:09:34 -04:00
|
|
|
}
|
|
|
|
|
2021-06-13 00:44:00 -04:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2021-06-16 02:28:10 -04:00
|
|
|
maven("https://papermc.io/repo/repository/maven-public/") {
|
2021-08-25 00:06:30 -04:00
|
|
|
content { onlyForConfigurations(PAPERCLIP_CONFIG) }
|
2021-06-13 00:44:00 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-10-02 21:46:57 -04:00
|
|
|
remapper("net.fabricmc:tiny-remapper:0.6.0:fat")
|
2021-08-25 00:06:30 -04:00
|
|
|
decompiler("net.minecraftforge:forgeflower:1.5.498.12")
|
2021-06-20 01:16:09 -04:00
|
|
|
paperclip("io.papermc:paperclip:2.0.1")
|
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 {
|
|
|
|
languageVersion.set(JavaLanguageVersion.of(16))
|
|
|
|
}
|
|
|
|
}
|
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-06-12 08:20:45 -04:00
|
|
|
options.release.set(16)
|
|
|
|
}
|
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()
|
|
|
|
}
|
2021-06-12 08:20:45 -04:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://oss.sonatype.org/content/groups/public/")
|
|
|
|
maven("https://papermc.io/repo/repository/maven-public/")
|
|
|
|
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
|
|
|
|
maven("https://repo.aikar.co/content/groups/aikar")
|
|
|
|
maven("https://repo.md-5.net/content/repositories/releases/")
|
|
|
|
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-12 08:09:34 -04:00
|
|
|
paperweight {
|
2021-06-12 14:04:04 -04:00
|
|
|
serverProject.set(project(":ForkTest-Server"))
|
|
|
|
|
2021-10-02 21:46:57 -04:00
|
|
|
remapRepo.set("https://maven.fabricmc.net/")
|
2021-08-25 00:06:30 -04:00
|
|
|
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
|
|
|
|
2021-06-12 08:09:34 -04:00
|
|
|
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
|
|
|
withPaperPatcher {
|
|
|
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
|
|
apiOutputDir.set(layout.projectDirectory.dir("ForkTest-API"))
|
|
|
|
|
|
|
|
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
|
|
|
serverOutputDir.set(layout.projectDirectory.dir("ForkTest-Server"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-08-25 00:06:30 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// Everything below here is optional if you don't care about publishing API or dev bundles to your repository
|
|
|
|
//
|
|
|
|
|
|
|
|
tasks.generateDevelopmentBundle {
|
|
|
|
apiCoordinates.set("com.example.paperfork:forktest-api")
|
|
|
|
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
|
|
|
libraryRepositories.set(
|
|
|
|
listOf(
|
|
|
|
"https://libraries.minecraft.net/",
|
|
|
|
"https://maven.quiltmc.org/repository/release/",
|
|
|
|
"https://repo.aikar.co/content/groups/aikar",
|
|
|
|
"https://ci.emc.gs/nexus/content/groups/aikar/",
|
2021-10-02 21:46:57 -04:00
|
|
|
"https://papermc.io/repo/repository/maven-public/",
|
|
|
|
"https://repo.velocitypowered.com/snapshots/",
|
|
|
|
// "https://my.repo/", // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api')
|
2021-08-25 00:06:30 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
// Publishing API:
|
|
|
|
// ./gradlew :ForkTest-API:publish[ToMavenLocal]
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "myRepoSnapshots"
|
|
|
|
url = uri("https://my.repo/")
|
|
|
|
// See Gradle docs for how to provide credentials to PasswordCredentials
|
|
|
|
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html
|
|
|
|
credentials(PasswordCredentials::class)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
// Publishing dev bundle:
|
|
|
|
// ./gradlew publishDevBundlePublicationTo(MavenLocal|MyRepoSnapshotsRepository) -PpublishDevBundle
|
|
|
|
if (project.hasProperty("publishDevBundle")) {
|
|
|
|
publications.create<MavenPublication>("devBundle") {
|
|
|
|
artifact(tasks.generateDevelopmentBundle) {
|
|
|
|
artifactId = "dev-bundle"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|