-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (60 loc) · 1.74 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
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '8.1.0'
}
group 'kr.jmlab'
version '0.1.2'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'kr.jmlab:openai-java-client:0.1.4'
implementation 'commons-cli:commons-cli:1.5.0'
implementation 'org.slf4j:slf4j-simple:1.7.36'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
testImplementation 'org.mockito:mockito-junit-jupiter:5.1.1'
testImplementation 'org.junit-pioneer:junit-pioneer:2.0.0'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
jar {
finalizedBy shadowJar
manifest {
attributes 'Main-Class': application.mainClass
}
}
application {
mainClass = 'kr.jm.gpt.CliGenie'
applicationDefaultJvmArgs = ['-Xms32m', '-Xmx128m']
}
task install(type: CreateStartScripts) {
dependsOn('copyLibs')
applicationName = 'cg'
mainClass = application.mainClass
defaultJvmOpts = application.applicationDefaultJvmArgs
outputDir = file('bin')
classpath = files("cli-genie-${version}-all.jar")
doLast {
unixScript.text = unixScript.text.replace("\$0", outputDir.toString() + '/cli-genie')
windowsScript.text = windowsScript.text.replaceFirst("%~dp0", outputDir.toString() + '/cli-genie')
}
}
task copyLibs(type: Copy) {
dependsOn('installShadowDist')
from(new File('build/libs')) { include '**' }
into new File(buildDir, '../lib')
}
clean {
dependsOn('cleanCopyLibs', 'cleanInstall')
}
test {
useJUnitPlatform()
}