-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
43 lines (39 loc) · 1.16 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
// For building a single jar with everything in
plugins {
id "com.github.johnrengelman.shadow" version "1.2.3"
}
// What we are
def pkg = 'com.quanticate.opensource.pdftkbox'
def ver = "0.2-SNAPSHOT"
// Powered by Apache PDFBox and Commons CLI
apply plugin:'java'
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.4'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
}
// Build an all-in-one jar
shadowJar {
def program = 'PDFtkBox'
manifest {
attributes 'Implementation-Title': 'PDFtkBox',
'Implementation-Version': ver,
'Main-Class': pkg+"."+program
}
classifier = ''
baseName = program
// Report what we built
doLast {
println " - Generated all-in-one jar ${program}.jar"
}
}
// If not using the all-in-one, this is a bundle of dependencies
task zipDependencies(dependsOn: 'compileJava', type: Zip) {
from configurations.compile.allArtifacts.files
from configurations.compile
archiveName project.name + "-dependencies.zip"
}
// Default is to build the all-in-one jar
defaultTasks 'shadowJar'