Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gradle Task] JaCoCo compatible with gradle 5.x #11321

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tasks/ANTV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 155,
"Minor": 158,
"Patch": 0
},
"demands": [
Expand Down
16 changes: 8 additions & 8 deletions Tasks/Common/codecoverage-tools/codecoverageconstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ subprojects {

reports {
html.enabled = true
html.destination "\${buildDir}/jacocoHtml"
html.destination file("\${buildDir}/jacocoHtml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the $ is being escaped here, so the end result would be path/to/build.gradle/${buildDir}/jacocoHtml, rather than replacing ${buildDir} with it's value. Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to be replace in the build.gradle file instead, as a project property.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see now, phew that's confusing

xml.enabled = true
xml.destination "\${buildDir}/summary.xml"
xml.destination file("\${buildDir}/summary.xml")
}
}
test {
Expand Down Expand Up @@ -60,8 +60,8 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
reports {
html.enabled = true
xml.enabled = true
xml.destination "${reportDir}/summary.xml"
html.destination "${reportDir}/"
xml.destination file("${reportDir}/summary.xml")
html.destination file("${reportDir}/")
}
}`;
}
Expand All @@ -87,8 +87,8 @@ jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
xml.destination "${reportDir}/summary.xml"
html.destination "${reportDir}"
xml.destination file("${reportDir}/summary.xml")
html.destination file("${reportDir}")
}
}

Expand Down Expand Up @@ -189,7 +189,7 @@ export function jacocoMavenPluginEnable(includeFilter: string[], excludeFilter:
let plugin = {
"groupId": "org.jacoco",
"artifactId": "jacoco-maven-plugin",
"version": "0.8.1",
"version": "0.8.4",
"configuration": {
"destFile": path.join(outputDirectory, "jacoco.exec"),
"outputDirectory": outputDirectory,
Expand Down Expand Up @@ -295,7 +295,7 @@ export function jacocoMavenMultiModuleReport(reportDir: string, srcData: string,
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>
<version>0.8.1</version>
<version>0.8.4</version>
</dependency>
</dependencies>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion Tasks/GradleV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 155,
"Minor": 158,
"Patch": 0
},
"releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/MavenV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 158,
"Patch": 0
"Patch": 1
},
"releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`",
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/MavenV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 3,
"Minor": 158,
"Patch": 0
"Patch": 1
},
"releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`",
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PublishCodeCoverageResultsV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 155,
"Minor": 158,
"Patch": 0
},
"demands": [],
Expand Down