Cannot configure retryStrategy and batchingStrategy using Gradle
See original GitHub issueDescribe the bug
I am trying to override default retryStrategy and batchingStrategy using Gradle plugin with:
marathon {
retryStrategy {
fixedQuota {
retryPerTestQuota = 3
totalAllowedRetryQuota = 30
}
}
batchingStrategy {
fixedSize {
size = 10
}
}
}
but running task ./gradlew app:marathonContractBackendDebug fails with:
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not set unknown property 'retryPerTestQuota' for object of type com.malinskiy.marathon.gradle.RetryStrategyConfiguration.
To Reproduce Steps to reproduce the behaviour:
- Try to override
retryStrategyandbatchingStrategyusing Gradle plugin
Expected behavior We should be able to override those values according to readme.
This bug is introduced in 0.7.1 release
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
custom gradle plugin causes: Cannot configure the 'publishing ...
PS: I tried doing nothing in the custom plugin (i.e., simply return from apply method), but it still gives same error. gradle ·...
Read more >Marathon - GitHub Pages
Configuration for gradle plugin is done via gradle only. It doesn't support the CLI's marathonfile. Here is an example of gradle config using...
Read more >Declaring Capabilities of a Library - Gradle User Manual
For example, a library may include several features in a single artifact. ... Could not resolve all files for configuration ':compileClasspath'.
Read more >Gradle | IntelliJ IDEA Documentation - JetBrains
You can also create a Gradle project and store it in the WSL environment or open it from the WSL file system. For...
Read more >Working with the Gradle registry - GitHub Docs
You can configure Gradle to publish packages to the GitHub Packages Gradle registry ... Also, accounts using legacy per-repository plans cannot access the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m trying to figure out if this can be fixed. Will report back as soon as I know if this can be fixed. If not - will revert to the old closure signature
So it turns out it’s not possible to use a unified interface for the plugin’s configuration for both Kotlin and Groovy: Kotlin uses the
@HasImplicitReceiverannotation which is picked up by the SAM conversion plugin for kotlin compiler. This code is transformed into a lambda with actual receiver in kotlin while grovvy will always transform the lambda into a lambda with a parameter. Here is an example in the official Java plugin as a reference: https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/java/org/gradle/api/plugins/JavaPluginConvention.java#L128 where you can clearly see that it’s fine to have two of the signatures around for kts/groovy. I’ll introduce the helpers for the Groovy back as a result of this investigation.