|
|
@ -6,8 +6,8 @@ plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
group 'org.inksnow.husk'
|
|
|
|
group 'net.william278'
|
|
|
|
version "2.0.5${versionMetadata()}"
|
|
|
|
version "2.0.4${versionMetadata()}"
|
|
|
|
defaultTasks 'licenseFormat', 'build'
|
|
|
|
defaultTasks 'licenseFormat', 'build'
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
repositories {
|
|
|
@ -16,18 +16,18 @@ repositories {
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
dependencies {
|
|
|
|
implementation 'org.json:json:20230227'
|
|
|
|
implementation 'org.json:json:20230227'
|
|
|
|
compileOnly 'net.kyori:adventure-api:4.16.0'
|
|
|
|
compileOnly 'net.kyori:adventure-api:4.13.1'
|
|
|
|
compileOnly 'org.jetbrains:annotations:24.0.1'
|
|
|
|
compileOnly 'org.jetbrains:annotations:24.0.1'
|
|
|
|
|
|
|
|
|
|
|
|
testImplementation 'net.kyori:adventure-platform-bukkit:4.3.2'
|
|
|
|
testImplementation 'net.kyori:adventure-platform-bukkit:4.3.0'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
|
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
|
|
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
tasks {
|
|
|
|
compileJava {
|
|
|
|
compileJava {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
options.release.set(8)
|
|
|
|
options.release.set(11)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
jar {
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
manifest {
|
|
|
@ -65,19 +65,36 @@ test {
|
|
|
|
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
repositories {
|
|
|
|
|
|
|
|
if (System.getenv("RELEASES_MAVEN_USERNAME") != null) {
|
|
|
|
maven {
|
|
|
|
maven {
|
|
|
|
name = 'husk-release'
|
|
|
|
name = "william278-releases"
|
|
|
|
url = findProperty("repository.huskrelease.url")
|
|
|
|
url = "https://repo.william278.net/releases"
|
|
|
|
credentials {
|
|
|
|
credentials {
|
|
|
|
username = findProperty("repository.huskrelease.username")
|
|
|
|
username = System.getenv("RELEASES_MAVEN_USERNAME")
|
|
|
|
password = findProperty("repository.huskrelease.password")
|
|
|
|
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 {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
groupId = 'org.inksnow.husk'
|
|
|
|
groupId = 'net.william278'
|
|
|
|
artifactId = 'desertwell'
|
|
|
|
artifactId = 'desertwell'
|
|
|
|
version = "$rootProject.version"
|
|
|
|
version = "$rootProject.version"
|
|
|
|
artifact shadowJar
|
|
|
|
artifact shadowJar
|
|
|
@ -86,13 +103,10 @@ publishing {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings('GrMethodMayBeStatic')
|
|
|
|
@SuppressWarnings('GrMethodMayBeStatic')
|
|
|
|
def versionMetadata() {
|
|
|
|
def versionMetadata() {
|
|
|
|
if (grgit == null) {
|
|
|
|
|
|
|
|
return '-' + System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get if there is a tag for this commit
|
|
|
|
// Get if there is a tag for this commit
|
|
|
|
def tag = grgit.tag.list().find { it.commit.id == grgit.head().id }
|
|
|
|
def tag = grgit.tag.list().find { it.commit.id == grgit.head().id }
|
|
|
|
if (tag != null) {
|
|
|
|
if (tag != null) {
|
|
|
@ -100,5 +114,8 @@ def versionMetadata() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Otherwise, get the last commit hash and if it's a clean head
|
|
|
|
// Otherwise, get the last commit hash and if it's a clean head
|
|
|
|
|
|
|
|
if (grgit == null) {
|
|
|
|
|
|
|
|
return '-' + System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown'
|
|
|
|
|
|
|
|
}
|
|
|
|
return '-' + grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev')
|
|
|
|
return '-' + grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev')
|
|
|
|
}
|
|
|
|
}
|