From 337493236e3b794c8a2e51af0e4aa3b96b87ae1f Mon Sep 17 00:00:00 2001 From: Len <40720638+destro174@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:05:05 +0100 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 20 ++++++++++++++++++++ build.gradle.kts | 6 +++--- plugin/build.gradle.kts | 3 +++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..54966ac --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,20 @@ +pipeline { + agent any + stages { + stage('Gradle') { + steps { + sh './gradlew build' + } + } + stage('Archive') { + steps { + archiveArtifacts artifacts: 'build/libs/', followSymlinks: false + } + } + stage('discord') { + steps { + discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook + } + } + } +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 84ecb69..8fe2d9e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } allprojects { group = "com.alttd.cometskyblock" - version = System.getenv("BUILD_NUMBER") ?: gitCommit() + version = "Build-" + (System.getenv("BUILD_NUMBER") ?: gitCommit()) description = "Next generation Skyblock Adventure" } @@ -42,7 +42,7 @@ tasks { } } listOf( - "org.spongepowered.configurate" + "xyz.destro.utheo.comet" ).forEach { relocate(it, "${rootProject.group}.lib.${it.substringAfterLast(".")}") } } @@ -85,7 +85,7 @@ fun gitCommit(): String { commandLine = "git rev-parse --short HEAD".split(" ") standardOutput = os } - return String(os.toByteArray()).trim() + return "git-" + String(os.toByteArray()).trim() } fun download(link: String, path: String) { diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index c914498..f59ce09 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -6,6 +6,9 @@ plugins { dependencies { implementation(project(":api")) // API compileOnly("com.alttd:Comet-API:1.20.4-R0.1-SNAPSHOT") + + compileOnly("org.projectlombok:lombok:1.18.24") + annotationProcessor("org.projectlombok:lombok:1.18.24") } tasks {