File tree Expand file tree Collapse file tree 10 files changed +11
-38
lines changed
testCommon/src/test/groovy/de/mannodermaus/gradle/plugins/junit5
android-junit5/src/main/kotlin/de/mannodermaus/gradle/plugins/junit5
java/de/mannodermaus/junit5/sample
kotlin/de/mannodermaus/junit5/sample Expand file tree Collapse file tree 10 files changed +11
-38
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ configurations {
1818processTestResources {
1919 def tokens = [COMPILE_SDK_VERSION : COMPILE_SDK_VERSION ,
2020 BUILD_TOOLS_VERSION : BUILD_TOOLS_VERSION ,
21- MIN_SDK_VERSION : MIN_SDK_VERSION ,
21+ MIN_SDK_VERSION : SAMPLE_MIN_SDK_VERSION ,
2222 TARGET_SDK_VERSION : TARGET_SDK_VERSION ]
2323
2424 inputs. properties(tokens)
Original file line number Diff line number Diff line change @@ -440,17 +440,4 @@ abstract class BasePluginSpec extends Specification {
440440 project. tasks. findByName(" jacocoTestReportDebug" ) == null
441441 project. tasks. findByName(" jacocoTestReportRelease" ) == null
442442 }
443-
444- def " Attaches the JUnit 5 Runner Builder to the Android Default Config" () {
445- when :
446- Project project = factory. newProject(rootProject())
447- .asAndroidApplication()
448- .applyJunit5Plugin()
449- .buildAndEvaluate()
450-
451- then :
452- def args = project. android. defaultConfig. testInstrumentationRunnerArguments
453- assert args. containsKey(" runnerBuilder" )
454- assert args[" runnerBuilder" ] == " de.mannodermaus.junit5.AndroidJUnit5Builder"
455- }
456443}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -18,7 +18,3 @@ const val JUNIT_PLATFORM_VERSION_PROP = "junitPlatformVersion"
1818const val JUNIT_JUPITER_VERSION_PROP = " junitJupiterVersion"
1919const val JUNIT_VINTAGE_VERSION_PROP = " junitVintageVersion"
2020const val JUNIT4_VERSION_PROP = " junit4Version"
21-
22- // Android defaultConfig
23- const val RUNNER_BUILDER_ARG = " runnerBuilder"
24- const val JUNIT5_RUNNER_BUILDER_CLASS_NAME = " de.mannodermaus.junit5.AndroidJUnit5Builder"
File renamed without changes.
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ class AndroidJUnitPlatformPlugin : Plugin<Project> {
3434 project.configureDependencies()
3535 project.afterEvaluate {
3636 it.configureTasks()
37- it.configureAndroid()
3837 }
3938 }
4039
@@ -128,12 +127,4 @@ class AndroidJUnitPlatformPlugin : Plugin<Project> {
128127
129128 return providers
130129 }
131-
132- private fun Project.configureAndroid () {
133- // Include the JUnit 5-based instrumentation Runner
134- // in the default configuration.
135- // This is the gateway for automatic instrumented tests support
136- val defaultConfig = this .android.safeDefaultConfig
137- defaultConfig.testInstrumentationRunnerArguments[RUNNER_BUILDER_ARG ] = JUNIT5_RUNNER_BUILDER_CLASS_NAME
138- }
139130}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ INSTRUMENTATION_GROUP_ID = de.mannodermaus.junit5
2424INSTRUMENTATION_ARTIFACT_ID = android-instrumentation-test
2525INSTRUMENTATION_DESCRIPTION = Extensions for instrumented Android tests with JUnit 5.
2626INSTRUMENTATION_VERSION_NAME = 0.1.1-SNAPSHOT
27+ INSTRUMENTATION_MIN_SDK_VERSION = 26
2728
2829# Dependency versions (plugins)
2930ANDROID_PLUGIN_2X_VERSION = 2.3.3
@@ -38,12 +39,14 @@ DCENDENTS_MAVEN_PLUGIN_VERSION = 2.0
3839GROOVY_VERSION = 3.0.0-alpha-1
3940KOTLIN_VERSION = 1.2.0
4041
41- # Android Environment
42+ # Android Environment (common)
4243COMPILE_SDK_VERSION = android-27
4344BUILD_TOOLS_VERSION = 27.0.1
44- MIN_SDK_VERSION = 26
4545TARGET_SDK_VERSION = 27
4646
47+ # Android Environment (sample)
48+ SAMPLE_MIN_SDK_VERSION = 14
49+
4750# Dependency versions
4851JUNIT_PLATFORM_VERSION = 1.0.2
4952JUNIT_JUPITER_VERSION = 5.0.2
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ android {
77 compileSdkVersion COMPILE_SDK_VERSION
88
99 defaultConfig {
10- minSdkVersion MIN_SDK_VERSION
10+ minSdkVersion INSTRUMENTATION_MIN_SDK_VERSION
1111 targetSdkVersion TARGET_SDK_VERSION
1212 versionCode 1
1313 versionName " 1.0"
Original file line number Diff line number Diff line change 1+ package de .mannodermaus .junit5 .sample ;
2+
13import java .util .ArrayList ;
24import java .util .Collection ;
35import java .util .List ;
Original file line number Diff line number Diff line change 1+ package de.mannodermaus.junit5.sample
2+
13import org.junit.jupiter.api.AfterAll
24import org.junit.jupiter.api.AfterEach
35import org.junit.jupiter.api.Assertions.assertAll
You can’t perform that action at this time.
0 commit comments