aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-cli/build.gradle')
-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'
}
+