plugins { id("java") id("maven-publish") id("com.github.johnrengelman.shadow") } group = "de.oliver" description = "Library for plugin configuration" repositories { mavenCentral() maven("https://repo.papermc.io/repository/maven-public/") maven("https://repo.fancyinnovations.com/releases") } dependencies { compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT") compileOnly("de.oliver.FancyAnalytics:logger:0.0.8") compileOnly("org.jetbrains:annotations:26.0.2") testImplementation("org.junit.jupiter:junit-jupiter-api:5.12.2") testImplementation("org.junit.jupiter:junit-jupiter-engine:5.12.2") testImplementation("org.junit.platform:junit-platform-console-standalone:1.12.2") } tasks { publishing { repositories { maven { name = "fancyinnovationsReleases" url = uri("https://repo.fancyinnovations.com/releases") credentials(PasswordCredentials::class) authentication { isAllowInsecureProtocol = true create("basic") } } maven { name = "fancyinnovationsSnapshots" url = uri("https://repo.fancyinnovations.com/snapshots") credentials(PasswordCredentials::class) authentication { isAllowInsecureProtocol = true create("basic") } } } publications { create("maven") { groupId = "de.oliver" artifactId = "config" version = getCFGVersion() from(project.components["java"]) } } } compileJava { options.encoding = Charsets.UTF_8.name() options.release.set(17) //TODO change to 21, once 1.19.4 support is dropped } java { withSourcesJar() withJavadocJar() } javadoc { options.encoding = Charsets.UTF_8.name() } processResources { filteringCharset = Charsets.UTF_8.name() } test { useJUnitPlatform() } } java { toolchain.languageVersion.set(JavaLanguageVersion.of(17)) //TODO change to 21, once 1.19.4 support is dropped } fun getCFGVersion(): String { return file("VERSION").readText() }