. + improve build system
This commit is contained in:
parent
00eb51595d
commit
e09ae6cc18
10 changed files with 117 additions and 107 deletions
65
build.gradle.kts
Normal file
65
build.gradle.kts
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue