Skip to content

Commit d6efbd0

Browse files
committed
Rename jacoco container to jacocoOptions, deprecate old name
1 parent 98bb103 commit d6efbd0

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

android-junit5/src/main/groovy/de/mannodermaus/gradle/plugins/junit5/AndroidJUnitPlatformExtension.groovy

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AndroidJUnitPlatformExtension extends JUnitPlatformExtension {
4141
private def logDeprecationWarning(String dontUse, String useInstead) {
4242
LogUtils.agpStyleLog(project.logger,
4343
LogUtils.Level.WARNING,
44-
"Accessing '$dontUse' for JUnit 5 unit tests is deprecated and will be removed in a future version. Please use '$useInstead' instead")
44+
"Accessing '$dontUse' is deprecated and will be removed in a future version. Please use '$useInstead' instead")
4545
}
4646

4747
@Deprecated
@@ -189,13 +189,27 @@ class AndroidJUnitPlatformExtension extends JUnitPlatformExtension {
189189

190190
/**
191191
* Configures Jacoco reporting options.*/
192-
void jacoco(Closure closure) {
192+
void jacocoOptions(Closure closure) {
193193
ConfigureUtil.configure(closure, jacoco)
194194
}
195195

196196
/**
197197
* Configures Jacoco reporting options.*/
198-
JacocoOptions getJacoco() { return jacoco }
198+
JacocoOptions getJacocoOptions() { return jacoco }
199+
200+
// FIXME DEPRECATED ---------------------------------------------------------------
201+
202+
void jacoco(Closure closure) {
203+
logDeprecationWarning("jacoco", "jacocoOptions")
204+
jacocoOptions(closure)
205+
}
206+
207+
JacocoOptions getJacoco() {
208+
logDeprecationWarning("jacoco", "jacocoOptions")
209+
return getJacocoOptions()
210+
}
211+
212+
// END DEPRECATED ---------------------------------------------------------------
199213

200214
/**
201215
* Options for controlling Jacoco reporting.*/

0 commit comments

Comments
 (0)