Skip to content

Commit

Permalink
build optimizations (#562)
Browse files Browse the repository at this point in the history
* build optmizations

* reduce int test time

* reduce int test time

* change level to b
  • Loading branch information
mageddo authored Sep 5, 2024
1 parent 5a5dfb7 commit eae70f1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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
}
Expand Down Expand Up @@ -201,6 +206,7 @@ graalvmNative {
mergeWithExisting = true
}
}

binaries {
main {
javaLauncher = javaToolchains.launcherFor {
Expand All @@ -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)
Expand Down

0 comments on commit eae70f1

Please sign in to comment.