-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (49 loc) · 1.34 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apply plugin: 'application'
apply plugin: 'maven-publish'
def utf8 = 'UTF-8'
def dist = 'dist'
def java = JavaVersion.VERSION_11
mainClassName = 'qxsl.utils.ShellUtil'
repositories.mavenCentral()
dependencies {
testImplementation 'org.assertj:assertj-core:+'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:+'
testImplementation 'org.junit.jupiter:junit-jupiter-params:+'
testImplementation 'junit:junit:+'
}
compileJava {
options.encoding = utf8
sourceCompatibility = java
targetCompatibility = java
}
compileTestJava {
options.encoding = utf8
sourceCompatibility = java
targetCompatibility = java
}
test.useJUnitPlatform()
jar.manifest.attributes 'Main-Class': mainClassName
jar.from configurations.compileClasspath.collect {
it.isDirectory()? it: zipTree(it)
}
javadoc {
exclude 'elva/**'
exclude 'gaas/**'
destinationDir = file("$dist/docs")
options.links("https://docs.oracle.com/en/java/javase/$java/docs/api/")
options.header("<a href='https://github.com/autodyne/qxsl'>GitHub</a>")
options.charSet = options.encoding = utf8
}
publishing.repositories.maven {
url = "$dist/mvn"
}
publishing.publications {
qxsl(MavenPublication) {
from components.java
groupId = 'qxsl'
def ver = 'git describe'.execute().text.trim()
version = ver?.split("-", 3).take(2).join(".")
}
}
publish.dependsOn(build)
publish.mustRunAfter(build)