You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
61 lines
1.3 KiB
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
}
|
|
|
|
group = 'co.jp.techsor.pdf'
|
|
version = '1.0.0'
|
|
sourceCompatibility = '17'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.itextpdf:kernel:8.0.2'
|
|
implementation 'com.itextpdf:layout:8.0.2'
|
|
implementation 'commons-cli:commons-cli:1.5.0'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
}
|
|
|
|
application {
|
|
mainClass = 'co.jp.techsor.pdf.App'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Main-Class': 'co.jp.techsor.pdf.App'
|
|
)
|
|
}
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
task fatJar(type: Jar) {
|
|
archiveBaseName = 'pdf-memo-layers'
|
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
with jar
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
// PDF解析ツール用のJAR
|
|
task probeJar(type: Jar) {
|
|
archiveBaseName = 'pdf-probe'
|
|
manifest {
|
|
attributes 'Main-Class': 'co.jp.techsor.pdf.PdfProbeApp'
|
|
}
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
with jar
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
// 両方のJARを作成するタスク
|
|
task allJars {
|
|
dependsOn fatJar, probeJar
|
|
}
|