From f08aee8f3d327f80b86cd87be0f89a1ae01ac3a2 Mon Sep 17 00:00:00 2001 From: Napster Date: Sun, 22 Dec 2024 16:05:20 +0100 Subject: [PATCH] Explicitly add Mockito agent --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2eaf2302..74e4c86c 100644 --- a/build.gradle +++ b/build.gradle @@ -249,6 +249,7 @@ apply plugin: 'com.bmuschko.docker-remote-api' configurations { flywayMigration + mockitoAgent // fucks with spring boot jar, we dont need it anyways // be VERY careful and test the produced jar if ever reenabled @@ -337,8 +338,11 @@ dependencies { testImplementation "org.testcontainers:testcontainers" testImplementation "org.testcontainers:selenium" testImplementation "com.codeborne:selenide:$selenideVersion" - testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion" testImplementation "org.awaitility:awaitility" + + testImplementation "org.mockito:mockito-core" + mockitoAgent("org.mockito:mockito-core") { transitive = false } + testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion" } tasks.withType(JavaCompile).configureEach { @@ -544,6 +548,7 @@ generateJooq { } test { + jvmArgs("-javaagent:${configurations.mockitoAgent.asPath}") dependsOn(flywayMigrate) doLast { stopCodegenDbContainerPost.start()