-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
62 lines (54 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
// create a runnable jar with jar dependencies stored in lib subdirectory
tasks.whenTaskAdded { task ->
['startScripts', 'distTar'].each { String skipTaskName ->
if (task.name.contains(skipTaskName)) {
task.enabled = false
}
}
}
apply plugin: 'java'
apply plugin: 'application'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
mainClassName = 'edu.mcw.scge.Manager'
String myAppName = 'scgeLoadPipeline'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.commons:commons-dbcp2:2.11.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.poi:poi:3.17'
implementation 'org.apache.poi:poi-ooxml:3.17'
implementation 'org.apache.poi:poi-ooxml-schemas:3.17'
implementation 'org.postgresql:postgresql:9.3-1104-jdbc4'
implementation 'org.springframework:spring-jdbc:6.0.23'
implementation 'org.apache.xmlbeans:xmlbeans:3.1.0'
implementation fileTree(dir: 'lib', include: '*.jar')
}
jar {
manifest {
attributes(
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
'Main-Class': mainClassName
)
}
}
distributions {
main {
distributionBaseName = myAppName
}
}
task createDistro(type: Copy) {
def zipFile = file('build/distributions/'+myAppName+'.zip')
def outputDir = file("build/install")
from zipTree(zipFile)
into outputDir
}
createDistro.dependsOn assembleDist