-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: master
Are you sure you want to change the base?
Conversation
846870a
to
97e94b9
Compare
} | ||
|
||
target.ext.PrintCoverage = PrintCoverageTask |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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.