diff --git a/README.md b/README.md index d2365d56..e0c652bc 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ To get started, declare the plugin in your `app` module's build script alongside ```kotlin plugins { - id("de.mannodermaus.android-junit5") version "1.13.1.0" + id("de.mannodermaus.android-junit5") version "1.13.2.0" } dependencies { // (Required) Writing and executing Unit Tests on the JUnit Platform - testImplementation("org.junit.jupiter:junit-jupiter-api:5.13.1") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.13.1") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.13.2") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.13.2") // (Optional) If you need "Parameterized Tests" - testImplementation("org.junit.jupiter:junit-jupiter-params:5.13.1") + testImplementation("org.junit.jupiter:junit-jupiter-params:5.13.2") // (Optional) If you also have JUnit 4-based tests testImplementation("junit:junit:4.13.2") - testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.13.1") + testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.13.2") } ``` @@ -45,20 +45,20 @@ To get started, declare the plugin in your `app` module's build script alongside ```groovy plugins { - id "de.mannodermaus.android-junit5" version "1.13.1.0" + id "de.mannodermaus.android-junit5" version "1.13.2.0" } dependencies { // (Required) Writing and executing Unit Tests on the JUnit Platform - testImplementation "org.junit.jupiter:junit-jupiter-api:5.13.1" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.13.1" + testImplementation "org.junit.jupiter:junit-jupiter-api:5.13.2" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.13.2" // (Optional) If you need "Parameterized Tests" - testImplementation "org.junit.jupiter:junit-jupiter-params:5.13.1" + testImplementation "org.junit.jupiter:junit-jupiter-params:5.13.2" // (Optional) If you also have JUnit 4-based tests testImplementation "junit:junit:4.13.2" - testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.13.1" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.13.2" } ``` @@ -76,7 +76,7 @@ If you prefer to use the legacy way to declare the dependency instead, remove th // In the root project's build.gradle.kts: buildscript { dependencies { - classpath("de.mannodermaus.gradle.plugins:android-junit5:1.13.1.0") + classpath("de.mannodermaus.gradle.plugins:android-junit5:1.13.2.0") } } @@ -94,7 +94,7 @@ If you prefer to use the legacy way to declare the dependency instead, remove th // In the root project's build.gradle: buildscript { dependencies { - classpath "de.mannodermaus.gradle.plugins:android-junit5:1.13.1.0" + classpath "de.mannodermaus.gradle.plugins:android-junit5:1.13.2.0" } } @@ -124,7 +124,7 @@ Before you can write instrumentation tests with JUnit Jupiter, make sure that yo ```kotlin dependencies { - androidTestImplementation("org.junit.jupiter:junit-jupiter-api:5.13.1") + androidTestImplementation("org.junit.jupiter:junit-jupiter-api:5.13.2") } ``` @@ -134,7 +134,7 @@ Before you can write instrumentation tests with JUnit Jupiter, make sure that yo ```groovy dependencies { - androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.13.1" + androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.13.2" } ``` @@ -285,7 +285,7 @@ before filing an issue with the latest one. |Your AGP Version|Suggested JUnit5 Plugin Version| |---|---| -|`>= 8.2.0`|`1.13.1.0`| +|`>= 8.2.0`|`1.13.2.0`| |`8.0.0` - `8.1.4`|`1.12.2.0`| |`7.0.0` - `7.4.2`|`1.10.0.0`| |`4.0.0` - `4.2.2`|`1.8.2.1`| diff --git a/build-logic/src/main/kotlin/Dependencies.kt b/build-logic/src/main/kotlin/Dependencies.kt index 8fd10891..d525b1b6 100644 --- a/build-logic/src/main/kotlin/Dependencies.kt +++ b/build-logic/src/main/kotlin/Dependencies.kt @@ -3,9 +3,9 @@ object libs { object versions { const val kotlin = "2.1.21" - const val junitJupiter = "5.13.2" - const val junitVintage = "5.13.2" - const val junitPlatform = "1.13.2" + const val junitJupiter = "5.13.3" + const val junitVintage = "5.13.3" + const val junitPlatform = "1.13.3" const val composeBom = "2025.03.00" const val androidXMultidex = "2.0.1" diff --git a/build-logic/src/main/kotlin/Environment.kt b/build-logic/src/main/kotlin/Environment.kt index 771a304e..d5e381fb 100644 --- a/build-logic/src/main/kotlin/Environment.kt +++ b/build-logic/src/main/kotlin/Environment.kt @@ -93,8 +93,8 @@ object Artifacts { platform = Java, groupId = "de.mannodermaus.gradle.plugins", artifactId = "android-junit5", - currentVersion = "1.13.2.0", - latestStableVersion = "1.13.1.0", + currentVersion = "1.13.3.0-SNAPSHOT", + latestStableVersion = "1.13.2.0", description = "Unit Testing with JUnit 5 for Android." ) diff --git a/build-logic/src/main/kotlin/Tasks.kt b/build-logic/src/main/kotlin/Tasks.kt index 345aced9..1b747a71 100644 --- a/build-logic/src/main/kotlin/Tasks.kt +++ b/build-logic/src/main/kotlin/Tasks.kt @@ -261,8 +261,6 @@ abstract class GenerateReadme : DefaultTask() { val match2 = CONSTANT_REGEX.find(placeholder) if (match2 != null) { val key = match2.groups.last()?.value - val constantKey1 = CONSTANT_MAPPINGS[key] - println("Constant key. placeholder=$placeholder, match2=$match2, constantKey1=$constantKey1, constants=$constants") val constantKey = CONSTANT_MAPPINGS[key] ?: throw InvalidPlaceholder(match2) constants[constantKey] ?: throw InvalidPlaceholder(match2) diff --git a/plugin/CHANGELOG.md b/plugin/CHANGELOG.md index fc24dd84..13351c94 100644 --- a/plugin/CHANGELOG.md +++ b/plugin/CHANGELOG.md @@ -2,6 +2,7 @@ Change Log ========== ## Unreleased +- JUnit 5.13.3 ## 1.13.2.0 (2025-09-06) - First considerations for Android Gradle Plugin 9.x diff --git a/plugin/android-junit5/src/test/kotlin/de/mannodermaus/gradle/plugins/junit5/ConfigurationCacheTests.kt b/plugin/android-junit5/src/test/kotlin/de/mannodermaus/gradle/plugins/junit5/ConfigurationCacheTests.kt index 3563ffa7..4115f756 100644 --- a/plugin/android-junit5/src/test/kotlin/de/mannodermaus/gradle/plugins/junit5/ConfigurationCacheTests.kt +++ b/plugin/android-junit5/src/test/kotlin/de/mannodermaus/gradle/plugins/junit5/ConfigurationCacheTests.kt @@ -5,6 +5,7 @@ import de.mannodermaus.gradle.plugins.junit5.util.TestEnvironment import de.mannodermaus.gradle.plugins.junit5.util.assertThat import de.mannodermaus.gradle.plugins.junit5.util.prettyPrint import de.mannodermaus.gradle.plugins.junit5.util.projects.FunctionalTestProjectCreator +import de.mannodermaus.gradle.plugins.junit5.util.splitToArray import de.mannodermaus.gradle.plugins.junit5.util.withPrunedPluginClasspath import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.GradleRunner @@ -29,6 +30,10 @@ class ConfigurationCacheTests { fun beforeAll(@TempDir folder: File) { projectCreator = FunctionalTestProjectCreator(folder, environment) println("Running configuration cache tests against latest AGP ($agp)...") + + // Ensure that no ADB device is connected before starting these tests, + // as they have a certain expectation of "no device connected" for asserting their output + Runtime.getRuntime().exec("adb disconnect".splitToArray(" ")) } @Test