From eae70f13da6a40f397da0a3af824f22e9bb9cc74 Mon Sep 17 00:00:00 2001 From: Elvis Souza Date: Wed, 4 Sep 2024 22:33:11 -0300 Subject: [PATCH] build optimizations (#562) * build optmizations * reduce int test time * reduce int test time * change level to b --- build.gradle | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b84c1ff58..903a94bb8 100644 --- a/build.gradle +++ b/build.gradle @@ -87,12 +87,13 @@ dependencies { testImplementation('org.mockito:mockito-junit-jupiter:5.12.+') testImplementation('org.hamcrest:hamcrest:3.0') testImplementation('io.rest-assured:rest-assured:5.5.0') + testImplementation('org.reflections:reflections:0.10.2') } test { useJUnitPlatform() - exclude "**/*CompTest.class" + exclude "**/*CompTest.class", "**/*IntTest.class" testLogging { events "passed", "skipped", "failed" } @@ -114,12 +115,16 @@ def compTest = tasks.register("compTest", Test) { } def intTest = tasks.register("intTest", Test) { + + dependsOn shadowJar useJUnitPlatform() include "**/*IntTest.class" failFast = true + testLogging { events "passed", "skipped", "failed" } + testLogging { showStandardStreams = true } @@ -201,6 +206,7 @@ graalvmNative { mergeWithExisting = true } } + binaries { main { javaLauncher = javaToolchains.launcherFor { @@ -213,10 +219,19 @@ graalvmNative { verbose = true fallback = false buildArgs.add('-J-Xmx5G') + buildArgs.add("-O3") } + configureEach { + if(it.name == "intTest"){ + println "> configuring for: ${it.getName()}" + buildArgs.add("-Ob") + } + } + } + registerTestBinary("intTest") { usingSourceSet(sourceSets.test) forTestTask(intTest)