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"
|
|
|
|
|
2022-04-26 00:32:03 +02:00
|
|
|
// Testing Exit Codes in JUnit
|
2022-01-11 13:46:05 +01:00
|
|
|
// https://todd.ginsberg.com/post/testing-system-exit/
|
2022-04-26 00:32:03 +02:00
|
|
|
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'
|
|
|
|
|
2022-04-11 12:12:19 +02:00
|
|
|
application {
|
|
|
|
mainClass = mainClassName
|
|
|
|
}
|
|
|
|
|
2022-01-11 13:46:05 +01:00
|
|
|
jar {
|
2022-04-11 12:12:57 +02:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|