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:
parent
abd5578be4
commit
e8c73ead90
20
Jenkinsfile
vendored
Normal file
20
Jenkinsfile
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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") }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user