forked from public-mirrors/DesertWell
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
2.6 KiB
Groovy
105 lines
2.6 KiB
Groovy
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
id 'org.cadixdev.licenser' version '0.6.1'
|
|
id 'maven-publish'
|
|
id 'java'
|
|
}
|
|
|
|
group 'net.william278'
|
|
version '2.0.4'
|
|
defaultTasks 'licenseFormat', 'build'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.json:json:20230227'
|
|
compileOnly 'net.kyori:adventure-api:4.13.1'
|
|
compileOnly 'org.jetbrains:annotations:24.0.1'
|
|
|
|
testImplementation 'net.kyori:adventure-platform-bukkit:4.3.0'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
|
|
}
|
|
|
|
tasks {
|
|
compileJava {
|
|
options.encoding = 'UTF-8'
|
|
options.release.set(11)
|
|
}
|
|
jar {
|
|
manifest {
|
|
attributes('Automatic-Module-Name': 'net.william278.desertwell')
|
|
}
|
|
}
|
|
}
|
|
|
|
license {
|
|
header = rootProject.file('HEADER')
|
|
include '**/*.java'
|
|
newLine = true
|
|
}
|
|
|
|
logger.lifecycle("Building DesertWell ${version} by William278")
|
|
version rootProject.version
|
|
archivesBaseName = "${rootProject.name}"
|
|
|
|
jar.dependsOn shadowJar
|
|
clean.delete "$rootDir/target"
|
|
|
|
javadoc {
|
|
options.encoding = 'UTF-8'
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
if (System.getenv("RELEASES_MAVEN_USERNAME") != null) {
|
|
maven {
|
|
name = "william278-releases"
|
|
url = "https://repo.william278.net/releases"
|
|
credentials {
|
|
username = System.getenv("RELEASES_MAVEN_USERNAME")
|
|
password = System.getenv("RELEASES_MAVEN_PASSWORD")
|
|
}
|
|
authentication {
|
|
basic(BasicAuthentication)
|
|
}
|
|
}
|
|
}
|
|
if (System.getenv("SNAPSHOTS_MAVEN_USERNAME") != null) {
|
|
maven {
|
|
name = "william278-snapshots"
|
|
url = "https://repo.william278.net/snapshots"
|
|
credentials {
|
|
username = System.getenv("SNAPSHOTS_MAVEN_USERNAME")
|
|
password = System.getenv("SNAPSHOTS_MAVEN_PASSWORD")
|
|
}
|
|
authentication {
|
|
basic(BasicAuthentication)
|
|
}
|
|
}
|
|
}
|
|
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
groupId = 'net.william278'
|
|
artifactId = 'desertwell'
|
|
version = "$rootProject.version"
|
|
artifact shadowJar
|
|
artifact javadocJar
|
|
artifact sourcesJar
|
|
}
|
|
}
|
|
}
|
|
} |