mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Create ansible gradle project to copy reobf artifacts into ansible for deployment
This commit is contained in:
73
plugins/build.gradle.kts
Normal file
73
plugins/build.gradle.kts
Normal file
@@ -0,0 +1,73 @@
|
||||
import xyz.jpenilla.runpaper.task.RunServer
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java-library")
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
configure<JavaPluginExtension> {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType<ProcessResources> {
|
||||
filteringCharset = "UTF-8"
|
||||
}
|
||||
|
||||
configure<PublishingExtension> {
|
||||
val githubActor = System.getenv("GITHUB_ACTOR")
|
||||
val githubToken = System.getenv("GITHUB_TOKEN")
|
||||
|
||||
repositories {
|
||||
if (githubActor != null && githubToken != null) {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/CivMC/Civ")
|
||||
credentials {
|
||||
username = githubActor
|
||||
password = githubToken
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<RunServer> {
|
||||
minecraftVersion("1.18")
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("io.papermc.paperweight.userdev") {
|
||||
tasks.withType<ProcessResources> {
|
||||
filesMatching("plugin.yml") {
|
||||
expand(project.properties)
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
named("build") {
|
||||
dependsOn("reobfJar")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("com.github.johnrengelman.shadow") {
|
||||
tasks {
|
||||
named("build") {
|
||||
dependsOn("shadowJar")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user