Skip to content

Commit

Permalink
Prepare 1.0.0-RC3-rev1
Browse files Browse the repository at this point in the history
  • Loading branch information
mannodermaus committed Sep 9, 2017
1 parent 07d7e01 commit 21fd1ab
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,36 @@ A Gradle plugin that allows for the execution of [JUnit 5][junit5gh] unit tests
```groovy
buildscript {
dependencies {
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-M6"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-RC3-rev1"
}
}
```

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

**Note**: This plugin also supports the Release Candidates of JUnit 5.
However, as of Android Studio 3.0 Beta 5, there is an internal issue with how tests are executed from the IDE
related to a removed API in JUnit 5 still accessed from Android Studio's build of IntelliJ.
If you run your JUnit 5 tests directly from Android Studio *right now*, they will fail with a `NoSuchMethodError`.

If you are running the latest version of IDEA itself, or you only ever run tests from the command line,
it's safe to upgrade this plugin to the *actual* most recent version, `1.0.0-RC3`.

## Setup

```groovy
apply plugin: "com.android.application"
apply plugin: "de.mannodermaus.android-junit5"
dependencies {
testApi junitJupiter()
testImplementation junit5()
// (Optional) If you need "parameterized tests"
testApi junitParams()
testImplementation junit5Params()
// For Android Studio users:
//
// All versions up to and including AS 3.0 Beta 5 use a build of IntelliJ IDEA
// that depends on APIs of an outdated Milestone Release of JUnit 5.
// Therefore, your tests will fail with a NoSuchMethodError
// when executed from Android Studio directly.
//
// To prevent this, there is a separate library you can apply here.
// It provides a copy of the JUnit 5 Runtime used in a more recent build
// of IntelliJ, overriding the one embedded in Android Studio.
testCompileOnly "de.mannodermaus.gradle.plugins:android-junit5-embedded-runtime:1.0.0-RC3-rev1"
}
```

Expand All @@ -55,9 +59,9 @@ However, there are some additional properties that you can apply:
```groovy
junitPlatform {
// The JUnit Jupiter dependency version to use; matches the platform's milestone by default
jupiterVersion "5.0.0-M6"
jupiterVersion "5.0.0-RC3"
// The JUnit Vintage Engine dependency version to use; matches the platform's milestone by default
vintageVersion "4.12.0-M6"
vintageVersion "4.12.0-RC3"
}
```

Expand Down
2 changes: 1 addition & 1 deletion android-junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ project.configure(project) {
vcsUrl = VCS_URL
version {
name = VERSION_NAME
desc = DESCRIPTION
desc = PLUGIN_DESCRIPTION
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android.injected.build.model.only.versioned = 3

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

# Artifact configuration (plugin)
Expand Down
6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {

dependencies {
//noinspection GradleDynamicVersion
classpath "de.mannodermaus.gradle.plugins:android-junit5:+"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-RC3-rev1-SNAPSHOT"
classpath "com.android.tools.build:gradle:$ANDROID_PLUGIN_3X_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
Expand Down Expand Up @@ -51,8 +51,8 @@ android {
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"

testImplementation junitJupiter()
testImplementation junitParams()
testImplementation junit5()
testImplementation junit5Params()
testCompileOnly project(":android-junit5-embedded-runtime")
}

Expand Down

0 comments on commit 21fd1ab

Please sign in to comment.