-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
131 lines (116 loc) · 3.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
plugins {
id 'java'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id "org.mikeneck.graalvm-native-image" version "1.4.1"
id 'signing'
}
java {
withJavadocJar()
withSourcesJar()
}
sourceCompatibility = '11'
repositories {
mavenCentral()
}
jar {
manifest {
attributes 'Main-Class': 'io.github.panghy.lionrock.cli.LionrockShell'
}
}
import org.mikeneck.graalvm.BuildTypeSelector
nativeImage {
graalVmHome = System.getProperty('java.home')
mainClass = "io.github.panghy.lionrock.cli.LionrockShell"
buildType { BuildTypeSelector build ->
build.executable {
main = 'io.github.panghy.lionrock.cli.LionrockShell'
}
}
executableName = 'lionrock-cli'
outputDirectory = file("$buildDir/bin")
arguments {
add '--no-fallback'
add '--report-unsupported-elements-at-runtime'
add '--allow-incomplete-classpath'
add '--initialize-at-build-time=ch.qos.logback.classic.Logger'
add '--initialize-at-build-time=ch.qos.logback.classic.Level'
add '--initialize-at-build-time=ch.qos.logback.core.status.InfoStatus'
add '--initialize-at-build-time=ch.qos.logback.core.spi.AppenderAttachableImpl'
add '--initialize-at-build-time=ch.qos.logback.core.status.StatusBase'
add '--initialize-at-build-time=org.slf4j.MDC'
add '--initialize-at-build-time=ch.qos.logback.core.CoreConstants'
add '--initialize-at-build-time=org.slf4j.LoggerFactory'
add '--initialize-at-build-time=org.slf4j.impl.StaticLoggerBinder'
}
}
generateNativeImageConfig {
enabled = true
byRunningApplicationWithoutArguments()
}
dependencies {
implementation 'io.grpc:grpc-stub:1.44.1'
implementation 'io.grpc:grpc-okhttp:1.44.1'
implementation project(':lionrock-foundationdb-client')
implementation 'org.foundationdb:fdb-java:6.3.23'
implementation 'info.picocli:picocli-shell-jline3:4.6.3'
implementation 'org.jline:jline-terminal-jansi:3.21.0'
implementation 'org.fusesource.jansi:jansi:2.4.0'
implementation 'org.jline:jline-terminal:3.21.0'
implementation 'ch.qos.logback:logback-classic:1.2.10'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
test {
useJUnitPlatform()
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
pom {
name = "lionrock-cli"
description = "Lionrock CLI Client"
url = "https://github.com/panghy/lionrock"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "panghy"
name = "Clement Pang"
}
}
scm {
url = "https://github.com/panghy/lionrock"
}
}
}
}
repositories {
maven {
name = "OSSRH"
if (project.version.endsWith('-SNAPSHOT')) {
url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
} else {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
signing {
useGpgCmd()
sign publishing.publications.shadow
}