mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-04 23:53:20 +01:00
80 lines
1.8 KiB
Kotlin
80 lines
1.8 KiB
Kotlin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
plugins {
|
|
`java-library`
|
|
`maven-publish`
|
|
id("com.gradleup.shadow") version "9.3.1"
|
|
}
|
|
|
|
group = "at.helpch"
|
|
version = "1.0.3-DEV-${System.getProperty("BUILD_NUMBER")}"
|
|
|
|
description = "An awesome placeholder provider!"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
|
|
maven {
|
|
url = uri("https://repo.codemc.io/repository/hytale/")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.yaml:snakeyaml:2.5")
|
|
|
|
compileOnly("com.hypixel.hytale:Server:2026.01.17-4b0f30090")
|
|
compileOnlyApi("org.jetbrains:annotations:23.0.0")
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
|
|
disableAutoTargetJvm()
|
|
}
|
|
|
|
val javaComponent: SoftwareComponent = components["java"]
|
|
|
|
tasks {
|
|
processResources {
|
|
eachFile { expand("version" to project.version) }
|
|
}
|
|
|
|
withType<ShadowJar> {
|
|
archiveClassifier.set("hytale")
|
|
|
|
relocate("org.yaml.snakeyaml", "at.helpch.placeholderapi.libs.yaml")
|
|
|
|
exclude("META-INF/versions/**")
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
artifactId = "placeholderapi-hytale"
|
|
from(javaComponent)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
if ("-DEV" in version.toString()) {
|
|
url = uri("https://repo.extendedclip.com/snapshots")
|
|
} else {
|
|
url = uri("https://repo.extendedclip.com/releases")
|
|
}
|
|
|
|
credentials {
|
|
username = System.getenv("JENKINS_USER")
|
|
password = System.getenv("JENKINS_PASS")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publish.get().setDependsOn(listOf(build.get()))
|
|
} |