-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
62 lines (52 loc) · 1.44 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
apply plugin: 'java'
apply plugin: 'idea'
group = 'org.azatsh.dbpasswordchange'
version = "${version}"
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
ext {
lombokVersion = '1.18.8'
packageDir = "${projectDir}/package"
extractedPackageDir = "${projectDir}/package/${project.name}-v${version}"
}
dependencies {
compileOnly("org.projectlombok:lombok:${lombokVersion}")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
// jdbc drivers must be provided at runtime
runtime 'com.oracle.database.jdbc:ojdbc8:19.8.0.0'
compile("org.slf4j:slf4j-api:1.7.30")
compile("org.apache.logging.log4j:log4j-slf4j-impl:2.13.3")
}
jar {
manifest {
attributes(
'Main-Class': 'org.azatsh.dbpasswordchange.Main'
)
}
}
clean {
delete "${packageDir}"
}
build {
doLast {
copy {
from jar // application itself
from configurations.runtime // dependencies
into "${extractedPackageDir}/libs"
}
copy {
from "${projectDir}/src/main/files" // scripts, configs, etc.
from "${projectDir}/LICENSE"
into "${extractedPackageDir}"
}
}
}
// task to build and package release to a zip
task buildPackage(type: Zip) {
dependsOn build
archiveFileName = "${project.name}-v${version}.zip"
destinationDirectory = file("${packageDir}")
from "${extractedPackageDir}"
}