import io.papermc.paperweight.util.constants.* plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "7.1.0" apply false id("io.papermc.paperweight.patcher") version "1.1.14" } repositories { mavenCentral() maven("https://papermc.io/repo/repository/maven-public/") { content { onlyForConfigurations(PAPERCLIP_CONFIG) } } } dependencies { remapper("net.fabricmc:tiny-remapper:0.6.0:fat") decompiler("net.minecraftforge:forgeflower:1.5.498.12") paperclip("io.papermc:paperclip:2.0.1") } allprojects { apply(plugin = "java") apply(plugin = "maven-publish") java { toolchain { languageVersion.set(JavaLanguageVersion.of(16)) } } } subprojects { tasks.withType { options.encoding = Charsets.UTF_8.name() options.release.set(16) } tasks.withType { options.encoding = Charsets.UTF_8.name() } tasks.withType { filteringCharset = Charsets.UTF_8.name() } repositories { mavenCentral() maven("https://papermc.io/repo/repository/maven-public/") } } paperweight { serverProject.set(project(":ForkTest-Server")) remapRepo.set("https://maven.fabricmc.net/") decompileRepo.set("https://files.minecraftforge.net/maven/") 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")) } } } // // 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://repo.maven.apache.org/maven2/", "https://libraries.minecraft.net/", "https://papermc.io/repo/repository/maven-public/", "https://maven.quiltmc.org/repository/release/", // "https://my.repo/", // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api') ) ) } 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("devBundle") { artifact(tasks.generateDevelopmentBundle) { artifactId = "dev-bundle" } } } }