65 lines
1.7 KiB
Kotlin
65 lines
1.7 KiB
Kotlin
val scrowToken = providers.gradleProperty("scrowMavenToken")
|
|
.orElse(providers.environmentVariable("SCROW_MAVEN_TOKEN")).get()
|
|
|
|
plugins {
|
|
id("java")
|
|
id("io.freefair.lombok") version "9.2.0" apply false
|
|
}
|
|
|
|
group = "de.kentoj.scrow"
|
|
version = "0.2"
|
|
|
|
fun RepositoryHandler.scrowRepo() = 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<HttpHeaderAuthentication>("header")
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "java")
|
|
apply(plugin = "maven-publish")
|
|
apply(plugin = "io.freefair.lombok")
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
tasks.withType<Javadoc>().configureEach {
|
|
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:all,-missing", "-quiet")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
|
|
name = "spigotmc-repo"
|
|
}
|
|
scrowRepo()
|
|
}
|
|
|
|
dependencies {
|
|
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
|
implementation("org.jetbrains:annotations:26.0.2-1")
|
|
}
|
|
|
|
extensions.configure<PublishingExtension> {
|
|
publications {
|
|
create<MavenPublication>("KenCommandAPI") {
|
|
groupId = rootProject.group.toString()
|
|
version = rootProject.version.toString()
|
|
artifactId = project.name
|
|
from(components["java"])
|
|
}
|
|
}
|
|
repositories {
|
|
scrowRepo()
|
|
}
|
|
}
|
|
}
|