Skip to content

Commit 1a63133

Browse files
authored
Merge pull request #17 from codecov/udpate-readme
Update README
2 parents 9e7e8d7 + 2e05657 commit 1a63133

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

README.md

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1-
# [Codecov][1] Gradle Example
1+
# [Codecov](https://codecov.io) Gradle Example
22

3-
1. Add Jacoco Plugin to your `build.gradle`. [See here](https://github.com/codecov/example-gradle/blob/master/build.gradle#L5)
4-
1. Set Jacoco to export xml. [See here](https://github.com/codecov/example-gradle/blob/master/build.gradle#L18-L23)
5-
1. Execute your tests as normal
6-
1. Call `gradle jacocoTestReport` to generate report. [See here](https://github.com/codecov/example-gradle/blob/65f88382659cf17c8693c3079941a12c8d004f03/circle.yml#L3)
7-
1. Call `bash <(curl -s https://codecov.io/bash)` to upload reports to Codecov. [See here](https://github.com/codecov/example-gradle/blob/65f88382659cf17c8693c3079941a12c8d004f03/circle.yml#L4)
8-
- Public project? Using TravisCI, CircleCI or AppVeyor? You're all set! No upload token required.
9-
- Otherwise please include your repository upload token. [See here](http://docs.codecov.io/v4.3.0/docs/about-the-codecov-bash-uploader#section-upload-token)
10-
11-
## Frequently Asked Questions
3+
## Guide
4+
### Travis Setup
125

13-
#### ❔ Do you support Multi-module projects?
6+
Add to your `.travis.yml` file.
7+
```yml
8+
language: java
9+
jdk:
10+
- oraclejdk8
11+
before_script:
12+
- chmod +x gradlew
13+
script:
14+
- ./gradlew check
15+
- ./gradlew codeCoverageReport
16+
after_success:
17+
- bash <(curl -s https://codecov.io/bash)
18+
```
1419
15-
Update your parent (root) `build.gradle`:
20+
### Produce Coverage Reports
21+
1. Add Jacoco Plugin to your `build.gradle`. [See here](https://github.com/codecov/example-gradle/blob/master/build.gradle#L5)
22+
2. Set Jacoco to export xml. [See here](https://github.com/codecov/example-gradle/blob/master/build.gradle#L18-L23)
23+
3. Execute your tests as normal
24+
4. Call `gradle jacocoTestReport` to generate report. [See here](https://github.com/codecov/example-gradle/blob/65f88382659cf17c8693c3079941a12c8d004f03/circle.yml#L3)
1625

26+
### FAQ
27+
- Q: Do you support Multi-module projects?<br/>A:Update your parent (root) `build.gradle`:
1728
```groovy
1829
allprojects {
1930
apply plugin: 'java'
@@ -34,7 +45,7 @@ allprojects {
3445
3546
subprojects {
3647
dependencies {
37-
...
48+
...
3849
}
3950
4051
test.useTestNG()
@@ -60,25 +71,11 @@ codeCoverageReport.dependsOn {
6071
}
6172
```
6273

63-
Update your `.travis.yml` file:
64-
65-
```yml
66-
language: java
67-
jdk:
68-
- oraclejdk8
69-
before_script:
70-
- chmod +x gradlew
71-
script:
72-
- ./gradlew check
73-
- ./gradlew codeCoverageReport
74-
after_success:
75-
- bash <(curl -s https://codecov.io/bash)
76-
```
77-
78-
No need to have anything else report-related in child modules
79-
80-
[Credits for multi-module](https://csiebler.github.io/blog/2014/02/09/multi-project-code-coverage-using-gradle-and-jacoco/)
81-
82-
We are happy to help if you have any questions. Please contact email our Support at [[email protected]](mailto:[email protected])
74+
## Caveats
75+
### Private Repo
76+
Repository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending `-t <your upload token>` to you where you upload reports.
8377

84-
[1]: https://codecov.io/
78+
## Links
79+
- [Community Boards](https://community.codecov.io)
80+
- [Support](https://codecov.io/support)
81+
- [Documentation](https://docs.codecov.io)

0 commit comments

Comments
 (0)