Skip to content

Commit e9cee62

Browse files
authored
Release 1.2.0 (#17)
- Official support for Android Gradle Plugin 3.5 and Gradle 5.6. - New configuration options that replace the now deprecated skipTestExecution and testTypes options: - executeTests: When false the plugin does not execute any tests, so you can run them manually or remote (Firebase Test Lab) - executeAndroidTests: Same as executeTests except that this only affects the instrumented Android tests - executeUnitTests: Same as executeTests except that this only affects the unit tests - includeAndroidTestResults: When true include results from instrumented Android tests into the coverage report - includeUnitTestResults : When true include results from unit tests into the coverage report
1 parent 324cdd4 commit e9cee62

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'org.neotech.plugin.rootcoverage'
2626
buildscript {
2727
dependencies {
2828
// Step 1: add the dependency
29-
classpath 'org.neotech.plugin:android-root-coverage-plugin:1.1.2'
29+
classpath 'org.neotech.plugin:android-root-coverage-plugin:1.2.0'
3030
}
3131
}
3232
```
@@ -51,7 +51,7 @@ android {
5151
The Android-Root-Coverage-Plugin generates a special Gradle task `:rootCodeCoverageReport` that when
5252
executed generates a Jacoco code coverage report. You can either run this task directly from
5353
Android Studio using the Gradle Tool Window (see:
54-
https://www.jetbrains.com/help/idea/jetgradle-tool-window.html) or from the terminal.
54+
<https://www.jetbrains.com/help/idea/jetgradle-tool-window.html>) or from the terminal.
5555

5656
- **Gradle Tool Window:** You can find the task under: `Tasks > reporting > rootCodeCoverageReport`, double click to execute it.
5757
- **Terminal:** Execute the task using `gradlew rootCodeCoverageReport`.
@@ -60,18 +60,19 @@ https://www.jetbrains.com/help/idea/jetgradle-tool-window.html) or from the term
6060
# Compatibility
6161
| Version | Android Gradle plugin version | Gradle version |
6262
| ------------- | ----------------------------- | -------------- |
63+
| **1.2.0** | 3.5 | 5.4.1-5.6.4 |
6364
| **1.1.2** | 3.4 | 5.1.1+ |
6465
| **1.1.1** | 3.3 | 4.10.1+ |
6566
| ~~**1.1.0**~~ | ~~3.3~~ | ~~5+~~ |
6667
| **1.0.2** | 3.2 | 4.6+ |
6768

6869
*Note: This plugin normally supports exactly the same Gradle versions as the Android Gradle
6970
plugin, for more information please refer to:*
70-
https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
71+
<https://developer.android.com/studio/releases/gradle-plugin#updating-gradle>
7172

7273
Android Gradle Plugin versions before `3.4.0-alpha05` are affected by a bug that in certain conditions can
7374
cause Jacoco instrumentation to fail in combination with inline kotlin methods shared across modules. For more information
74-
see: https://issuetracker.google.com/issues/109771903 and https://issuetracker.google.com/issues/110763361.
75+
see: <https://issuetracker.google.com/issues/109771903> and <https://issuetracker.google.com/issues/110763361>.
7576
If your project is affected by this upgrade to an Android Gradle Plugin version of at least `3.4.0-alpha05`.
7677

7778

@@ -88,13 +89,23 @@ rootCoverage {
8889
// Overrides the default build variant for specific modules.
8990
buildVariantOverrides ":moduleA" : "debugFlavourA", ":moduleB": "debugFlavourA"
9091
91-
9292
// Class exclude patterns
9393
excludes = ["**/some.package/**"]
94-
// If true the task it self does not execute any tests (debug option)
95-
skipTestExecution false
96-
// Type of tests to run (import com.android.builder.model.TestVariantBuildOutput.TestType)
97-
testTypes = [TestType.UNIT, TestType.ANDROID_TEST]
94+
95+
// Since 1.2: When false the plugin does not execute any tests, useful when you run the tests manually or remote (Firebase Test Lab)
96+
executeTests true
97+
98+
// Since 1.2: Same as executeTests except that this only affects the instrumented Android tests
99+
executeAndroidTests true
100+
101+
// Since 1.2: Same as executeTests except that this only affects the unit tests
102+
executeUnitTests true
103+
104+
// Since 1.2: When true include results from instrumented Android tests into the coverage report
105+
includeAndroidTestResults true
106+
107+
// Since 1.2: When true include results from unit tests into the coverage report
108+
includeUnitTestResults true
98109
}
99110
```
100111

@@ -105,7 +116,6 @@ projects. But if you like to add some actually functionality, this is the wish l
105116

106117
- Support for Java library modules
107118
- Make use of the JacocoMerge task? To merge the `exec` en `ec` files?
108-
- Support for configuring the output type: html, xml etc. (Just like Jacoco)
109119
- Improved integration test setup: without the hackish dynamic versions in the Gradle plugin block?
110120

111121
**How to test your changes/additions?**

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
}
1313

1414
dependencies {
15-
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
15+
classpath "com.github.ben-manes:gradle-versions-plugin:0.27.0"
1616
}
1717
}
1818

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ org.gradle.jvmargs=-Xmx1536m
1919
#PACKAGING=jar
2020

2121
GROUP=org.neotech.plugin
22-
VERSION=1.1.2
22+
VERSION=1.2.0
2323
DESCRIPTION=A Gradle plugin for easy generation of combined code coverage reports for Android projects with multiple modules.
2424

2525
PROJECT_WEBSITE=https://github.com/NeoTech-Software/android-root-coverage-plugin

gradle/dependencies.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ ext {
33
minSdk : 19,
44
targetSdk : 29,
55
compileSdk: 29,
6-
kotlin : "1.3.60"
6+
kotlin : "1.3.61"
77
]
88
projectDependency = [
99

1010
// Gradle Plugins
1111
kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${projectVersion.kotlin}",
12-
androidGradlePlugin: "com.android.tools.build:gradle:3.5.2",
12+
androidGradlePlugin: "com.android.tools.build:gradle:3.5.3",
1313

1414
// Dependencies
1515
kotlinStdlibJdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${projectVersion.kotlin}",
1616
appCompat : "androidx.appcompat:appcompat:1.1.0",
1717

1818
// Test dependencies
19-
junit : "junit:junit:4.12",
19+
junit : "junit:junit:4.13",
2020
truth : "com.google.truth:truth:1.0",
2121
supportTestRunner : "androidx.test:runner:1.2.0",
2222
espressoCore : "androidx.test.espresso:espresso-core:3.2.0",

0 commit comments

Comments
 (0)