This repository has been archived by the owner on Mar 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (49 loc) · 1.45 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
plugins {
id 'java'
}
group 'io.ballerina'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
flatDir {
dirs "${rootProject.projectDir}/libs"
}
}
dependencies {
implementation project(":shell-core")
implementation(group: 'info.picocli', name: 'picocli', version: '4.5.2')
annotationProcessor 'info.picocli:picocli-codegen:4.5.2'
implementation(group: 'org.jline', name: 'jline', version: '3.11.0')
testImplementation('org.testng:testng:6.14.3') {
because("To test the core functionality")
}
testImplementation(group: 'com.google.code.gson', name: 'gson', version: '2.8.6') {
because("To load test cases")
}
}
compileJava {
doFirst {
options.compilerArgs += [
"-Aproject=${project.group}/${project.name}",
'--module-path', classpath.asPath,
]
classpath = files()
}
}
def mainCliClass = 'io.ballerina.shell.cli.ReplShellLauncher'
task run(type: JavaExec) {
main = mainCliClass
standardInput = System.in
classpath = sourceSets.main.runtimeClasspath
}
task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest { attributes 'Main-Class': mainCliClass }
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
test {
systemProperty "ballerina.home", "${rootProject.projectDir}/home"
useTestNG()
}
ext.moduleName = 'io.ballerina.shell.cli'