val scrowToken = providers.gradleProperty("scrowMavenToken") .orElse(providers.environmentVariable("SCROW_MAVEN_TOKEN")).get() plugins { id("java") id("java-library") id("maven-publish") id("io.freefair.lombok") version "9.2.0" } group = "de.kentoj" version = "2.0.1" fun scrowRepo(handler: RepositoryHandler) = handler.maven { name = "scrow" url = uri("http://forge.kentoj.de/api/packages/scrow/maven") isAllowInsecureProtocol = true credentials(HttpHeaderCredentials::class) { name = "Authorization" value = "token $scrowToken" } authentication { create("header") } } repositories { mavenCentral() maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") { name = "spigotmc-repo" } scrowRepo(this) } dependencies { // https://mvnrepository.com/artifact/org.jetbrains/annotations implementation("org.jetbrains:annotations:26.0.2-1") api("de.kentoj:kencommandapi-core:2.0.1") api("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT") implementation("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT") } publishing { publications { create("KenCommandAPIBukkit") { groupId = project.group.toString() artifactId = "kencommandapi-bukkit" version = project.version.toString() from(components["java"]) } } repositories { scrowRepo(this) } }