Skip to content

Commit 21fd1ab

Browse files
committed
Prepare 1.0.0-RC3-rev1
1 parent 07d7e01 commit 21fd1ab

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,36 @@ A Gradle plugin that allows for the execution of [JUnit 5][junit5gh] unit tests
99
```groovy
1010
buildscript {
1111
dependencies {
12-
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-M6"
12+
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-RC3-rev1"
1313
}
1414
}
1515
```
1616

1717
Snapshots of the development version are available through [Sonatype's `snapshots` repository][sonatyperepo].
1818

19-
**Note**: This plugin also supports the Release Candidates of JUnit 5.
20-
However, as of Android Studio 3.0 Beta 5, there is an internal issue with how tests are executed from the IDE
21-
related to a removed API in JUnit 5 still accessed from Android Studio's build of IntelliJ.
22-
If you run your JUnit 5 tests directly from Android Studio *right now*, they will fail with a `NoSuchMethodError`.
23-
24-
If you are running the latest version of IDEA itself, or you only ever run tests from the command line,
25-
it's safe to upgrade this plugin to the *actual* most recent version, `1.0.0-RC3`.
26-
2719
## Setup
2820

2921
```groovy
3022
apply plugin: "com.android.application"
3123
apply plugin: "de.mannodermaus.android-junit5"
3224
3325
dependencies {
34-
testApi junitJupiter()
26+
testImplementation junit5()
3527
3628
// (Optional) If you need "parameterized tests"
37-
testApi junitParams()
29+
testImplementation junit5Params()
30+
31+
// For Android Studio users:
32+
//
33+
// All versions up to and including AS 3.0 Beta 5 use a build of IntelliJ IDEA
34+
// that depends on APIs of an outdated Milestone Release of JUnit 5.
35+
// Therefore, your tests will fail with a NoSuchMethodError
36+
// when executed from Android Studio directly.
37+
//
38+
// To prevent this, there is a separate library you can apply here.
39+
// It provides a copy of the JUnit 5 Runtime used in a more recent build
40+
// of IntelliJ, overriding the one embedded in Android Studio.
41+
testCompileOnly "de.mannodermaus.gradle.plugins:android-junit5-embedded-runtime:1.0.0-RC3-rev1"
3842
}
3943
```
4044

@@ -55,9 +59,9 @@ However, there are some additional properties that you can apply:
5559
```groovy
5660
junitPlatform {
5761
// The JUnit Jupiter dependency version to use; matches the platform's milestone by default
58-
jupiterVersion "5.0.0-M6"
62+
jupiterVersion "5.0.0-RC3"
5963
// The JUnit Vintage Engine dependency version to use; matches the platform's milestone by default
60-
vintageVersion "4.12.0-M6"
64+
vintageVersion "4.12.0-RC3"
6165
}
6266
```
6367

android-junit5/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ project.configure(project) {
171171
vcsUrl = VCS_URL
172172
version {
173173
name = VERSION_NAME
174-
desc = DESCRIPTION
174+
desc = PLUGIN_DESCRIPTION
175175
}
176176
}
177177
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ android.injected.build.model.only.versioned = 3
55

66
# Artifact configuration (common)
77
GROUP_ID = de.mannodermaus.gradle.plugins
8-
VERSION_NAME = 1.0.0-RC3-rev1-SNAPSHOT
8+
VERSION_NAME = 1.0.0-RC3-rev1
99
VCS_URL = https://github.com/aurae/android-junit5
1010

1111
# Artifact configuration (plugin)

sample/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99

1010
dependencies {
1111
//noinspection GradleDynamicVersion
12-
classpath "de.mannodermaus.gradle.plugins:android-junit5:+"
12+
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-RC3-rev1-SNAPSHOT"
1313
classpath "com.android.tools.build:gradle:$ANDROID_PLUGIN_3X_VERSION"
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
1515
}
@@ -51,8 +51,8 @@ android {
5151
dependencies {
5252
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
5353

54-
testImplementation junitJupiter()
55-
testImplementation junitParams()
54+
testImplementation junit5()
55+
testImplementation junit5Params()
5656
testCompileOnly project(":android-junit5-embedded-runtime")
5757
}
5858

0 commit comments

Comments
 (0)