Extend testapp build.gradle.kts

This commit is contained in:
JeremyStar™ 2024-12-13 03:10:15 +01:00
parent c78cb4eb75
commit 377c71dfba
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 20 additions and 29 deletions

View file

@ -20,9 +20,6 @@
// Dependencies
dependencies {
// Kotlin support
kotlin(property("dependencyKotlinStdIdentifier") as String)
// sos!engine
implementation(project(":logging"))
}

View file

@ -17,9 +17,3 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Dependencies
dependencies {
// Kotlin support
kotlin(property("dependencyKotlinStdIdentifier") as String)
}

View file

@ -26,9 +26,6 @@ plugins {
// Dependencies
dependencies {
// Kotlin support
kotlin(property("dependencyKotlinStdIdentifier") as String)
// sos!engine
implementation(project(":logging"))
implementation(project(":base"))
@ -37,30 +34,33 @@ dependencies {
// Configure JAR
tasks.withType<Jar> {
manifest {
attributes.put("Main-Class", "de.staropensource.engine.testapp.MainKt")
attributes.put("Main-Class", "de.staropensource.engine.testapp.Main")
}
}
// Configure application
application {
mainClass = "de.staropensource.engine.testapp.Main"
applicationDefaultJvmArgs = listOf(
// JVM
// -> VM option unlocks
"-XX:+UnlockDiagnosticVMOptions",
// -> Display GC log
//"-Xlog:gc",
// JVM arguments
val jvmArgs: MutableList<String> = mutableListOf()
// -> JVM
jvmArgs.add("-XX:+UnlockDiagnosticVMOptions")
// -> Method compilation logging
//"-XX:+PrintCompilation",
//"-XX:+PrintInlining",
if (hasProperty("run.args.logGC") && property("run.args.logGC") as String == "true")
jvmArgs.add("-Xlog:gc")
if (hasProperty("run.args.logJITandAOT") && property("run.args.logJITandAOT") as String == "true") {
jvmArgs.add("-XX:+PrintCompilation")
jvmArgs.add("-XX:+PrintInlining")
}
if (hasProperty("run.args.garbageCollector"))
when (property("run.args.garbageCollector")) {
"epsilon" -> jvmArgs.add("-XX:+UseEpsilonGC")
"serial" -> jvmArgs.add("-XX:+UseSerialGC")
"g1" -> jvmArgs.add("-XX:+UseG1GC")
}
// -> Jansi
jvmArgs.add("-Djansi.mode=force")
// Jansi
// -> Force writing ANSI
"-Djansi.mode=force",
// sos!engine
// *none yet*
)
applicationDefaultJvmArgs = jvmArgs
}