Skip to content

Commit d2905c0

Browse files
author
Marcel Schnelle
authored
Remove JavaExec-based tasks, migrate to native Gradle API (#101)
* Remove custom test tasks & move to configuration of existing unit tests instead * Finished migration of test code to the native test tasks * Remove more unnecessary stuff * Update to Kotlin 1.2.51 * Migrate from old DSL (junit-platform-gradle-plugin) to native DSL for tag & engine declarations * Remove custom dependency handlers & other hand-holding techniques for backwards compatibility * Remove deprecated junit-platform-gradle-plugin from project
1 parent 34f2a2f commit d2905c0

File tree

25 files changed

+303
-2051
lines changed

25 files changed

+303
-2051
lines changed

android-junit5-embedded-runtime/LICENSE

-202
This file was deleted.

android-junit5-embedded-runtime/build.gradle

-64
This file was deleted.
Binary file not shown.

android-junit5-tests/build.gradle

+4-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ apply plugin: "java-library"
77
apply plugin: "idea"
88
apply plugin: "jacoco"
99
apply plugin: "kotlin"
10-
apply plugin: "org.junit.platform.gradle.plugin"
1110

1211
// ------------------------------------------------------------------------------------------------
1312
// Compilation Tweaks
@@ -47,20 +46,16 @@ processTestResources {
4746

4847
test {
4948
failFast = true
49+
useJUnitPlatform()
5050
testLogging {
5151
events "passed", "skipped", "failed"
5252
exceptionFormat = "full"
5353
}
54-
}
5554

56-
junitPlatform {
57-
details "tree"
58-
enableStandardTestTask true
55+
// Enable this line to run slow Functional Tests on the local device as well
56+
environment("CI", "true")
5957
}
6058

61-
// Enable this line to run slow Functional Tests on the local device as well
62-
//junitPlatformTest.environment("CI", "true")
63-
6459
dependencies {
6560
// Test Plugin Dependencies
6661
testImplementation project(":android-junit5")
@@ -108,5 +103,5 @@ task writeFunctionalTestCompileClasspath(type: WriteClasspathResource) {
108103

109104
tasks.withType(WriteClasspathResource).all {
110105
processTestResources.finalizedBy it
111-
junitPlatformTest.mustRunAfter it
106+
test.mustRunAfter it
112107
}

0 commit comments

Comments
 (0)