aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-07-01 13:36:51 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-08-17 16:55:28 +0200
commitc98ea00dffa6f8eaf7d78411435df77e64f5f2cd (patch)
tree9768d064eb9b2ec0f42ca1636dce7dae0864f977 /pdf-as-cli
parentbfff992ce5e09e176b6509752e4404dd4286544b (diff)
downloadpdf-as-4-c98ea00dffa6f8eaf7d78411435df77e64f5f2cd.tar.gz
pdf-as-4-c98ea00dffa6f8eaf7d78411435df77e64f5f2cd.tar.bz2
pdf-as-4-c98ea00dffa6f8eaf7d78411435df77e64f5f2cd.zip
build tasks for pdfbox2
Diffstat (limited to 'pdf-as-cli')
-rw-r--r--pdf-as-cli/build.gradle90
1 files changed, 85 insertions, 5 deletions
diff --git a/pdf-as-cli/build.gradle b/pdf-as-cli/build.gradle
index 8cc9ef0f..51bdbe13 100644
--- a/pdf-as-cli/build.gradle
+++ b/pdf-as-cli/build.gradle
@@ -15,17 +15,29 @@ task releases(type: Copy) {
into rootDir.toString() + "/releases/" + version
}
-releases.dependsOn jar
-releases.dependsOn sourcesJar
-releases.dependsOn distZip
-releases.dependsOn distTar
+configurations {
+ pdfBox2Compile
+ pdfBox1Compile
+ }
+sourceSets{
+ pdfBox2{
+ compileClasspath = configurations.pdfBox2Compile
+ runtimeClasspath= configurations.pdfBox2Compile
+ }
+ pdfBox1{
+ compileClasspath = configurations.pdfBox1Compile
+ runtimeClasspath= configurations.pdfBox1Compile
+ }
+}
+
dependencies {
compile project (':pdf-as-lib')
compile project (':signature-standards:sigs-pkcs7detached')
compile project (':signature-standards:sigs-pades')
compile project (':pdf-as-moa')
- compile project (':pdf-as-pdfbox')
+ pdfBox1Compile project (':pdf-as-pdfbox')
+ pdfBox2Compile project (':pdf-as-pdfbox-2')
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
compile 'ch.qos.logback:logback-classic:1.1.2'
@@ -33,6 +45,74 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
+
+startScripts{
+ classpath+=sourceSets.pdfBox1.compileClasspath
+}
+
+compileJava{
+ classpath=sourceSets.main.compileClasspath
+ classpath+=sourceSets.pdfBox1.compileClasspath
+ classpath+=sourceSets.pdfBox2.compileClasspath
+}
+
+
+task pdfbox2Startscript(type: CreateStartScripts) {
+ description "Creates OS specific scripts to call the 'other' entry point"
+
+ classpath = startScripts.classpath.minus(configurations.pdfBox1Compile) + sourceSets.pdfBox2.compileClasspath
+ outputDir = startScripts.outputDir
+ mainClassName = startScripts.mainClassName
+ applicationName = startScripts.applicationName+"-pdfbox2"
+}
+
+distZip {
+
+ doFirst{
+ baseName = archivesBaseName
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+
+ into("${baseName}-${version}/lib") {
+ from startScripts.classpath
+ }
+ into("${baseName}-${version}/lib") {
+ from pdfbox2Startscript.classpath
+ }
+ into("${baseName}-${version}/bin") {
+ from pdfbox2Startscript
+ }
+ }
+}
+
+distTar {
+ doFirst{
+ baseName = archivesBaseName
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+
+ into("${baseName}-${version}/lib") {
+ from startScripts.classpath
+ }
+ into("${baseName}-${version}/lib") {
+ from pdfbox2Startscript.classpath
+ }
+ into("${baseName}-${version}/bin") {
+ from pdfbox2Startscript
+ }
+ }
+}
+
+
+releases.dependsOn jar
+releases.dependsOn sourcesJar
+releases.dependsOn distZip
+releases.dependsOn distTar
+
+distZip.dependsOn startScripts
+startScripts.dependsOn pdfbox2Startscript
+
+
+
test {
systemProperties 'property': 'value'
}
+