Add Jenkinsfile for CI and update build.gradle.kts

Introduce a Jenkinsfile to automate the build, archive, and notification stages in a pipeline. Additionally, modify build.gradle.kts to standardize the shadowJar output filename and remove versioning details from the filename.
This commit is contained in:
Teriuihi 2024-08-09 23:04:01 +02:00
parent abd5578be4
commit e8c73ead90
2 changed files with 21 additions and 8 deletions

20
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,20 @@
pipeline {
agent any
stages {
stage('Gradle') {
steps {
sh 'bash gradlew shadowJar -x test'
}
}
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
}
}
}
}

View File

@ -7,7 +7,6 @@ plugins {
allprojects {
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
group = "com.alttd.proxydiscordlink"
version = "1.0.1-BETA-$build"
description = "A velocity plugin to link Discord and Minecraft accounts."
apply(plugin = "java")
@ -54,14 +53,8 @@ dependencies {
tasks {
shadowJar {
archiveFileName.set("${project.name}-${project.version}.jar")
// exclude("net.kyori.adventure")
// exclude("net.kyori.examination")
minimize {
//exclude(dependency("net.kyori:.*:.*"))
}
archiveFileName.set("discordLink.jar")
listOf(
// "net.kyori",
"net.dv8tion.jda"
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
}