Skip to content

Commit c16e2dc

Browse files
committed
Prepare version 0.3.0
1 parent a595c5c commit c16e2dc

File tree

3 files changed

+30
-46
lines changed

3 files changed

+30
-46
lines changed

README.md

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,27 @@
22

33
[![Build Status](https://travis-ci.org/vanniktech/gradle-android-junit-jacoco-plugin.svg?branch=master)](https://travis-ci.org/vanniktech/gradle-android-junit-jacoco-plugin?branch=master)
44
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
5-
![Java 8 required](https://img.shields.io/badge/java-8-brightgreen.svg)
5+
![Java 7 required](https://img.shields.io/badge/java-7-brightgreen.svg)
66

7-
Gradle plugin that generates JaCoCo reports from an Android Gradle Project. It goes over every subproject and creates the `jacocoReport` task. If you want an aggregated report from all subprojects use the `jacocoFullReport` task.
7+
Gradle plugin that generates Jacoco reports from a Gradle Project. Android Application, Android Library and Java Plugins are supported by this plugin. When this plugin is applied it goes over every subproject and creates the corresponding Jacoco tasks.
88

9-
Works with the latest Gradle Android Tools version 1.5.0. This plugin is compiled using Java 8 hence you also need Java 8 in order to use it.
9+
### Android project
10+
11+
- Task `jacocoTestReport<BuildType>`
12+
- Executes the `test<BuildType>` task before
13+
- Gets executed when the `check` task is executed
14+
- Generated Jacoco reports can be found under `build/reports/jacoco/<BuildType>`.
15+
16+
Where `<BuildType>` usually is `debug` and `release` unless additional build types where specified. For instance when having `debug` and `release` build types the following tasks would be created: `jacocoTestReportDebug`, `jacocoTestReportRelease`.
17+
18+
### Java project
19+
20+
- Task `jacocoTestReport`
21+
- Executes the `test` task before
22+
- Gets executed when the `check` task is executed
23+
- Generated Jacoco reports can be found under `build/reports/jacoco/`.
24+
25+
Works with the latest Gradle Android Tools version 1.5.0. This plugin is compiled using Java 7 hence you also need Java 7 in order to use it.
1026

1127
# Set up
1228

@@ -18,7 +34,7 @@ buildscript {
1834
mavenCentral()
1935
}
2036
dependencies {
21-
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.2.0'
37+
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.3.0'
2238
}
2339
}
2440
@@ -35,47 +51,15 @@ Can be found [here](https://oss.sonatype.org/#nexus-search;quick~gradle-android-
3551
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.2.1-SNAPSHOT'
3652
```
3753

38-
## Get reports for each subproject
39-
40-
```groovy
41-
./gradlew jacocoReport
42-
```
54+
### Configuration (since 0.3.0)
4355

44-
**XML reports**
45-
46-
```
47-
<subproject>/build/reports/jacoco/jacoco.xml
48-
```
49-
50-
**HTML reports**
51-
52-
```
53-
<subproject>/build/reports/jacoco/index.html
54-
```
55-
56-
**Exec files**
57-
58-
```
59-
<subproject>/build/jacoco/testDebugUnitTest.exec
60-
<subproject>/build/jacoco/testReleaseUnitTest.exec
61-
```
62-
63-
## Get aggreated report from all subprojects
56+
Those are all available configurations - shown with default values and their types. More information can be found in the [Java Documentation of the Extension](src/main/groovy/com/vanniktech/android/junit/jacoco/JunitJacocoExtension.groovy).
6457

6558
```groovy
66-
./gradlew jacocoFullReport
67-
```
68-
69-
**XML reports**
70-
71-
```
72-
<root>/build/reports/jacoco/full/jacoco.xml
73-
```
74-
75-
**HTML reports**
76-
77-
```
78-
<root>/build/reports/jacoco/full/index.html
59+
junitJacoco {
60+
jacocoVersion = '0.7.2.201409121644' // type String
61+
ignoreProjects = [] // type String array
62+
}
7963
```
8064

8165
# License

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pluginBundle {
3636
vcsUrl = POM_SCM_URL
3737

3838
plugins {
39-
androidJaCoCo {
39+
androidJacoco {
4040
id = 'com.vanniktech.android.junit.jacoco'
4141
displayName = POM_NAME
4242
tags = ['gradle', 'android', 'jacoco', 'app module', 'library module', 'junit', 'unit', 'testing', 'coverage']

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
GROUP=com.vanniktech
2-
VERSION_NAME=0.3.0-SNAPSHOT
2+
VERSION_NAME=0.3.0
33

44
POM_ARTIFACT_ID=gradle-android-junit-jacoco-plugin
5-
POM_NAME=Gradle Android JaCoCo Plugin
5+
POM_NAME=Gradle Android Jacoco Plugin
66
POM_PACKAGING=jar
77

8-
POM_DESCRIPTION=Gradle plugin that generates JaCoCo reports from an Android Gradle Project.
8+
POM_DESCRIPTION=Gradle plugin that generates Jacoco reports from an Android Gradle Project.
99
POM_INCEPTION_YEAR=2015
1010

1111
POM_URL=http://github.com/vanniktech/gradle-android-junit-jacoco-plugin/

0 commit comments

Comments
 (0)