Skip to content

Commit 3099a45

Browse files
authored
Change: Deprecate executeTests configuration property (#69)
To follow the convention of the Android Gradle Plugin, it makes sense to only support the specific `executeAndroidTests` and `executeUnitTests` properties (just like AGP 7.3 now has `enableUnitTestCoverage` and `enableAndroidTestCoverage`).
1 parent 3066455 commit 3099a45

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ rootCoverage {
9999
generateHtml true
100100
generateXml false
101101
102-
// Since 1.2: When false the plugin does not execute any tests, useful when you run the tests manually or remote (Firebase Test Lab)
103-
executeTests true
104-
105102
// Since 1.2: Same as executeTests except that this only affects the instrumented Android tests
106103
executeAndroidTests true
107104

plugin/src/main/kotlin/org/neotech/plugin/rootcoverage/RootCoveragePluginExtension.kt

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ open class RootCoveragePluginExtension {
1313
var includeNoLocationClasses: Boolean = false
1414

1515
/**
16-
* Same as executeTests except that this only disables/enables the instrumented Android tests.
16+
* When disabled the plugin will skip the execution of all (instrumented) Android tests (by not depending on the Gradle test tasks).
17+
* If disabled this does not automatically imply that already existing code coverage results will not be included in the final coverage
18+
* report, instead this is expected to happen as this can be useful when you run the tests manually or remote (Firebase Test Lab).
19+
*
20+
* When using this setting in combination with remote test execution make sure you fetch the `build/outputs` folder from the remote (or
21+
* any other place) and put them into the local build so that this plugin can use them to configure code coverage correctly. Also make
22+
* sure that when executing remotely coverage is enabled.
23+
*
24+
* Same as executeUnitTests except that this only disables/enables the instrumented Android tests.
1725
*
1826
* Default: true
1927
*
@@ -22,7 +30,15 @@ open class RootCoveragePluginExtension {
2230
var executeAndroidTests: Boolean = true
2331

2432
/**
25-
* Same as executeTests except that this only disables/enables the unit tests.
33+
* When disabled the plugin will skip the execution of all unit tests (by not depending on the Gradle test tasks). If disabled this does
34+
* not automatically imply that already existing code coverage results will not be included in the final coverage report, instead this
35+
* is expected to happen as this can be useful when you run the tests manually or remote (Firebase Test Lab).
36+
*
37+
* When using this setting in combination with remote test execution make sure you fetch the `build/outputs` folder from the remote (or
38+
* any other place) and put them into the local build so that this plugin can use them to configure code coverage correctly. Also make
39+
* sure that when executing remotely coverage is enabled.
40+
*
41+
* Same as executeUnitTests except that this only disables/enables the instrumented Android tests.
2642
*
2743
* Default: true
2844
*
@@ -31,23 +47,15 @@ open class RootCoveragePluginExtension {
3147
var executeUnitTests: Boolean = true
3248

3349
/**
34-
* When disabled the Android-Root-Coverage-Plugin will skip the execution of all tests (unit and instrumented Android tests). This can
35-
* be useful when you run the tests manually or remote (Firebase Test Lab). When using this setting make sure you fetch the
36-
* `build/outputs` and `build/jacoco/` folders the remote (or any other place) and put them into the local build so that this plugin can
37-
* use them.
38-
*
39-
* Default: true
40-
*
41-
* Note: if false this will override any value in `executeAndroidTests` and `executeUnitTests`.
42-
*
4350
* @see executeAndroidTests
4451
* @see executeUnitTests
4552
*/
53+
@Deprecated("Instead use executeAndroidTests and/or executeUnitTests")
4654
var executeTests: Boolean = true
4755

4856
/**
4957
* Whether to include results from instrumented Android tests into the final coverage report. If disabled this also causes the plugin to
50-
* not automatically execute instrumented Android tests (if not already disabled by either `executeTests` or `executeAndroidTests`).
58+
* not automatically execute instrumented Android tests (if not already disabled by `executeAndroidTests`).
5159
*
5260
* Default: true
5361
*
@@ -57,7 +65,7 @@ open class RootCoveragePluginExtension {
5765

5866
/**
5967
* Whether to include results from unit tests into the final coverage report. If disabled this also causes the plugin to not
60-
* automatically execute unit tests (if not already disabled by either `executeTests` or `executeUnitTests`).
68+
* automatically execute unit tests (if not already disabled by `executeUnitTests`).
6169
*
6270
* Default: true
6371
*

0 commit comments

Comments
 (0)