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

Add configuration options for report-path and message #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvol
Copy link

@mvol mvol commented May 14, 2020

We have multiple sub-projects and want to display a separate message for the combined coverage. This pull-request adds configuration options for 'reportPath' and 'message' to customize both the xml-report from jacoco to be scanned for coverage data as well as the output message.

@mvol mvol mentioned this pull request May 14, 2020
@mvol mvol force-pushed the feature/report-configuration branch from 846870a to 97e94b9 Compare May 14, 2020 22:05
}

target.ext.PrintCoverage = PrintCoverageTask
Copy link
Author

Choose a reason for hiding this comment

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

Allows to reference the PrintCoverageTask in build-scripts without having to use the fully qualified class name:
task customTask(type: PrintCoverage) { ... }
instead of
task customTask(type: de.jansauer.printcoverage.PrintCoverageTask) { ... }


PrintCoverageExtension(Project project) {
coverageType = project.objects.property(String)
coverageType.set('INSTRUCTION')
Copy link
Author

Choose a reason for hiding this comment

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

Defaults are now handled directly in the task to allow custom task definitions with minimal configuration

import org.gradle.api.tasks.TaskAction

class PrintCoverageTask extends DefaultTask {

@Input
@Optional
Copy link
Author

Choose a reason for hiding this comment

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

Optional inputs with defaults handled in the task to allow custom task definitions extending this task with minimal configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants