switched to envelope for cli tool

This commit is contained in:
2022-01-16 19:39:04 +08:00
parent 139d160274
commit 764a592ee0
4 changed files with 44 additions and 5 deletions

25
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,25 @@
import java.nio.file.Path
import java.nio.file.Files
pipeline {
agent any
stages {
stage("Build") {
steps {
sh "./gradlew clean build"
junit testResults: "build/test-results/test/*.xml"
javadoc javadocDir: "build/docs/javadoc", keepAll: true
archiveArtifacts artifacts: 'build/libs/*.jar,benchmark/build/libs/*.jar,wson-cli/build/distributions/wson-cli-envelope-*.jar',
allowEmptyArchive: true,
fingerprint: true,
onlyIfSuccessful: true
}
}
stage("Publish") {
steps {
sh "./gradlew publish"
}
}
}
}

View File

@@ -8,7 +8,7 @@ pluginManagement {
} }
plugins { plugins {
id "net.woggioni.gradle.executable.jar" version "0.1" id "net.woggioni.gradle.envelope" version "0.1"
id "net.woggioni.gradle.lombok" version "0.1" id "net.woggioni.gradle.lombok" version "0.1"
id 'org.jetbrains.kotlin.jvm' version getProperty('version.kotlin') id 'org.jetbrains.kotlin.jvm' version getProperty('version.kotlin')
} }
@@ -16,7 +16,7 @@ pluginManagement {
rootProject.name = 'wson' rootProject.name = 'wson'
def includeDirs = ['antlr', 'benchmark', 'test-utils', 'cli'] def includeDirs = ['antlr', 'benchmark', 'test-utils', 'wson-cli']
includeDirs.each { includeDirs.each {
include(it) include(it)

View File

@@ -1,5 +1,6 @@
plugins { plugins {
id 'application' id 'maven-publish'
id 'net.woggioni.gradle.envelope'
id 'org.jetbrains.kotlin.jvm' id 'org.jetbrains.kotlin.jvm'
} }
@@ -10,8 +11,8 @@ dependencies {
implementation rootProject implementation rootProject
} }
application { envelopeJar {
mainClassName = 'net.woggioni.wson.cli.MainKt' mainClass = 'net.woggioni.wson.cli.MainKt'
} }
@@ -20,3 +21,16 @@ compileKotlin {
jvmTarget = '1.8' jvmTarget = '1.8'
} }
} }
publishing {
repositories {
maven {
url = "https://mvn.woggioni.net/"
}
}
publications {
myDistribution(MavenPublication) {
artifact envelopeJar
}
}
}