sop-java/sop-java-picocli/build.gradle

52 lines
1.2 KiB
Groovy
Raw Normal View History

2022-01-11 13:46:05 +01:00
// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
plugins {
id 'application'
}
dependencies {
2022-04-26 00:33:20 +02:00
// JUnit
2022-01-11 13:46:05 +01:00
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
// Testing Exit Codes in JUnit
2022-01-11 13:46:05 +01:00
// https://todd.ginsberg.com/post/testing-system-exit/
testImplementation "com.ginsberg:junit5-system-exit:$junitSysExitVersion"
2022-04-26 00:33:20 +02:00
// Mocking Components
testImplementation "org.mockito:mockito-core:$mockitoVersion"
2022-01-11 13:46:05 +01:00
2022-04-26 00:34:29 +02:00
// SOP
2022-01-11 13:46:05 +01:00
implementation(project(":sop-java"))
2022-04-26 00:34:29 +02:00
// CLI
implementation "info.picocli:picocli:$picocliVersion"
2022-04-26 00:34:48 +02:00
// @Nonnull, @Nullable...
implementation "com.google.code.findbugs:jsr305:$jsrVersion"
2022-01-11 13:46:05 +01:00
}
mainClassName = 'sop.cli.picocli.SopCLI'
application {
mainClass = mainClassName
}
2022-01-11 13:46:05 +01:00
jar {
dependsOn(":sop-java:jar")
2022-01-11 13:46:05 +01:00
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"
}
}