Create ansible gradle project to copy reobf artifacts into ansible for deployment

This commit is contained in:
AngrySoundTech
2024-05-09 18:07:02 -04:00
parent 0bba48a30a
commit 0c07571c16
71 changed files with 271 additions and 80 deletions

View File

@@ -1,5 +1,4 @@
import com.gradle.enterprise.gradleplugin.GradleEnterpriseExtension
import xyz.jpenilla.runpaper.task.RunServer
plugins {
id("io.papermc.paperweight.userdev") version "1.5.10" apply false
@@ -18,13 +17,8 @@ project.extensions.configure<GradleEnterpriseExtension> {
}
allprojects {
group = "net.civmc"
// TODO: We probably don't want to apply these to every project
apply(plugin = "java-library")
apply(plugin = "maven-publish")
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
@@ -36,74 +30,4 @@ allprojects {
maven("https://jitpack.io")
}
pluginManager.withPlugin("java-library") {
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")
}
}
}
}
}