-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (50 loc) · 1.54 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
// 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.rgd.dataload.ObjectMapper.Manager'
String myAppName = 'object-mapper-pipeline'
project.archivesBaseName = myAppName
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.commons:commons-dbcp2:2.10.0'
implementation 'org.apache.logging.log4j:log4j-core:2.22.0'
implementation 'com.oracle.database.jdbc:ojdbc10:19.21.0.0'
implementation 'org.springframework:spring-jdbc:6.0.14'
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