Skip to content

Commit ab9b043

Browse files
authored
JUnit 5.13 (#386)
1 parent 11d7b28 commit ab9b043

File tree

6 files changed

+26
-22
lines changed

6 files changed

+26
-22
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ To get started, declare the plugin in your `app` module's build script alongside
2222

2323
```kotlin
2424
plugins {
25-
id("de.mannodermaus.android-junit5") version "1.13.1.0"
25+
id("de.mannodermaus.android-junit5") version "1.13.2.0"
2626
}
2727

2828
dependencies {
2929
// (Required) Writing and executing Unit Tests on the JUnit Platform
30-
testImplementation("org.junit.jupiter:junit-jupiter-api:5.13.1")
31-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.13.1")
30+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.13.2")
31+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.13.2")
3232

3333
// (Optional) If you need "Parameterized Tests"
34-
testImplementation("org.junit.jupiter:junit-jupiter-params:5.13.1")
34+
testImplementation("org.junit.jupiter:junit-jupiter-params:5.13.2")
3535

3636
// (Optional) If you also have JUnit 4-based tests
3737
testImplementation("junit:junit:4.13.2")
38-
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.13.1")
38+
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.13.2")
3939
}
4040
```
4141
</details>
@@ -45,20 +45,20 @@ To get started, declare the plugin in your `app` module's build script alongside
4545

4646
```groovy
4747
plugins {
48-
id "de.mannodermaus.android-junit5" version "1.13.1.0"
48+
id "de.mannodermaus.android-junit5" version "1.13.2.0"
4949
}
5050
5151
dependencies {
5252
// (Required) Writing and executing Unit Tests on the JUnit Platform
53-
testImplementation "org.junit.jupiter:junit-jupiter-api:5.13.1"
54-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.13.1"
53+
testImplementation "org.junit.jupiter:junit-jupiter-api:5.13.2"
54+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.13.2"
5555
5656
// (Optional) If you need "Parameterized Tests"
57-
testImplementation "org.junit.jupiter:junit-jupiter-params:5.13.1"
57+
testImplementation "org.junit.jupiter:junit-jupiter-params:5.13.2"
5858
5959
// (Optional) If you also have JUnit 4-based tests
6060
testImplementation "junit:junit:4.13.2"
61-
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.13.1"
61+
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.13.2"
6262
}
6363
```
6464
</details>
@@ -76,7 +76,7 @@ If you prefer to use the legacy way to declare the dependency instead, remove th
7676
// In the root project's build.gradle.kts:
7777
buildscript {
7878
dependencies {
79-
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.13.1.0")
79+
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.13.2.0")
8080
}
8181
}
8282

@@ -94,7 +94,7 @@ If you prefer to use the legacy way to declare the dependency instead, remove th
9494
// In the root project's build.gradle:
9595
buildscript {
9696
dependencies {
97-
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.13.1.0"
97+
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.13.2.0"
9898
}
9999
}
100100
@@ -124,7 +124,7 @@ Before you can write instrumentation tests with JUnit Jupiter, make sure that yo
124124

125125
```kotlin
126126
dependencies {
127-
androidTestImplementation("org.junit.jupiter:junit-jupiter-api:5.13.1")
127+
androidTestImplementation("org.junit.jupiter:junit-jupiter-api:5.13.2")
128128
}
129129
```
130130
</details>
@@ -134,7 +134,7 @@ Before you can write instrumentation tests with JUnit Jupiter, make sure that yo
134134

135135
```groovy
136136
dependencies {
137-
androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.13.1"
137+
androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.13.2"
138138
}
139139
```
140140
</details>
@@ -285,7 +285,7 @@ before filing an issue with the latest one.
285285

286286
|Your AGP Version|Suggested JUnit5 Plugin Version|
287287
|---|---|
288-
|`>= 8.2.0`|`1.13.1.0`|
288+
|`>= 8.2.0`|`1.13.2.0`|
289289
|`8.0.0` - `8.1.4`|`1.12.2.0`|
290290
|`7.0.0` - `7.4.2`|`1.10.0.0`|
291291
|`4.0.0` - `4.2.2`|`1.8.2.1`|

build-logic/src/main/kotlin/Dependencies.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
object libs {
44
object versions {
55
const val kotlin = "2.1.21"
6-
const val junitJupiter = "5.13.2"
7-
const val junitVintage = "5.13.2"
8-
const val junitPlatform = "1.13.2"
6+
const val junitJupiter = "5.13.3"
7+
const val junitVintage = "5.13.3"
8+
const val junitPlatform = "1.13.3"
99

1010
const val composeBom = "2025.03.00"
1111
const val androidXMultidex = "2.0.1"

build-logic/src/main/kotlin/Environment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ object Artifacts {
9393
platform = Java,
9494
groupId = "de.mannodermaus.gradle.plugins",
9595
artifactId = "android-junit5",
96-
currentVersion = "1.13.2.0",
97-
latestStableVersion = "1.13.1.0",
96+
currentVersion = "1.13.3.0-SNAPSHOT",
97+
latestStableVersion = "1.13.2.0",
9898
description = "Unit Testing with JUnit 5 for Android."
9999
)
100100

build-logic/src/main/kotlin/Tasks.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,6 @@ abstract class GenerateReadme : DefaultTask() {
261261
val match2 = CONSTANT_REGEX.find(placeholder)
262262
if (match2 != null) {
263263
val key = match2.groups.last()?.value
264-
val constantKey1 = CONSTANT_MAPPINGS[key]
265-
println("Constant key. placeholder=$placeholder, match2=$match2, constantKey1=$constantKey1, constants=$constants")
266264
val constantKey = CONSTANT_MAPPINGS[key] ?: throw InvalidPlaceholder(match2)
267265
constants[constantKey] ?: throw InvalidPlaceholder(match2)
268266

plugin/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Change Log
22
==========
33

44
## Unreleased
5+
- JUnit 5.13.3
56

67
## 1.13.2.0 (2025-09-06)
78
- First considerations for Android Gradle Plugin 9.x

plugin/android-junit5/src/test/kotlin/de/mannodermaus/gradle/plugins/junit5/ConfigurationCacheTests.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import de.mannodermaus.gradle.plugins.junit5.util.TestEnvironment
55
import de.mannodermaus.gradle.plugins.junit5.util.assertThat
66
import de.mannodermaus.gradle.plugins.junit5.util.prettyPrint
77
import de.mannodermaus.gradle.plugins.junit5.util.projects.FunctionalTestProjectCreator
8+
import de.mannodermaus.gradle.plugins.junit5.util.splitToArray
89
import de.mannodermaus.gradle.plugins.junit5.util.withPrunedPluginClasspath
910
import org.gradle.testkit.runner.BuildResult
1011
import org.gradle.testkit.runner.GradleRunner
@@ -29,6 +30,10 @@ class ConfigurationCacheTests {
2930
fun beforeAll(@TempDir folder: File) {
3031
projectCreator = FunctionalTestProjectCreator(folder, environment)
3132
println("Running configuration cache tests against latest AGP ($agp)...")
33+
34+
// Ensure that no ADB device is connected before starting these tests,
35+
// as they have a certain expectation of "no device connected" for asserting their output
36+
Runtime.getRuntime().exec("adb disconnect".splitToArray(" "))
3237
}
3338

3439
@Test

0 commit comments

Comments
 (0)