2020-11-26 11:00:48 +01:00
|
|
|
plugins {
|
2020-12-06 16:52:08 +01:00
|
|
|
id 'application'
|
2020-11-26 11:00:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":pgpainless-core"))
|
|
|
|
|
2020-12-22 22:02:36 +01:00
|
|
|
implementation 'info.picocli:picocli:4.5.2'
|
2020-11-26 11:00:48 +01:00
|
|
|
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
|
|
|
|
|
|
|
|
/*
|
|
|
|
implementation "org.bouncycastle:bcprov-debug-jdk15on:$bouncyCastleVersion"
|
|
|
|
/*/
|
|
|
|
implementation "org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion"
|
|
|
|
//*/
|
2020-12-06 16:52:08 +01:00
|
|
|
implementation "org.bouncycastle:bcpg-jdk15on:$bouncyCastleVersion"
|
2020-11-26 11:00:48 +01:00
|
|
|
|
|
|
|
// https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
|
|
|
|
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
mainClassName = 'org.pgpainless.sop.PGPainlessCLI'
|
|
|
|
|
2021-06-24 19:10:48 +02:00
|
|
|
def generatedVersionDir = "${buildDir}/generated-version"
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
output.dir(generatedVersionDir, builtBy: 'generateVersionProperties')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task generateVersionProperties {
|
|
|
|
doLast {
|
|
|
|
def propertiesFile = file "$generatedVersionDir/version.properties"
|
|
|
|
propertiesFile.parentFile.mkdirs()
|
|
|
|
propertiesFile.createNewFile()
|
|
|
|
// Instead of using a Properties object here, we directly write to the file
|
|
|
|
// since Properties adds a timestamp, ruining reproducibility
|
|
|
|
propertiesFile.write("version="+rootProject.version.toString())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
processResources.dependsOn generateVersionProperties
|
|
|
|
|
2020-12-06 16:52:08 +01:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': "$mainClassName"
|
|
|
|
}
|
|
|
|
|
|
|
|
from {
|
|
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
|
|
} {
|
|
|
|
exclude "META-INF/*.SF"
|
|
|
|
exclude "META-INF/*.DSA"
|
|
|
|
exclude "META-INF/*.RSA"
|
|
|
|
}
|
2020-11-26 11:00:48 +01:00
|
|
|
}
|
2020-12-06 16:52:08 +01:00
|
|
|
|