MarathonLabs / marathon

Cross-platform test runner
https://docs.marathonlabs.io
GNU General Public License v2.0
577 stars 120 forks source link

Gradle Configuration Cache is not supported by Marathon Gradle Plugin #378

Open ZakTaccardi opened 4 years ago

ZakTaccardi commented 4 years ago

Gradle has a new feature called the Configuration Cache. It was previously known as Instant Execution, and this greatly improves build speed.

Usage of the Configuration Cache has a stricter list of requirements.

While the Marathon Gradle Plugin may already be compatible with the Configuration Cache, please investigate this to ensure support.

Malinskiy commented 3 years ago

marathon's gradle plugin depends on android gradle plugin. Since AGP doesn't support configuration cache in the stable version as of yet, we will work on this after this is resolved in AGP See https://issuetracker.google.com/issues/162074215

ZakTaccardi commented 2 years ago

AGP and Kotlin both support the configuration cache (docs) now. Please add support to Marathon

With the configuration cache enabled:

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache problems found in this build.

> Invocation of 'Task.project' by task ':marathonWrapper' at execution time is unsupported.
> Invocation of 'Task.project' by task ':subproject:marathonDebugAndroidTest' at execution time is unsupported.
> Invocation of 'Task.project' by task ':subproject:marathonDebugAndroidTest' at execution time is unsupported.
Malinskiy commented 2 years ago

I'll be happy to accept a PR with the necessary changes @ZakTaccardi

ZakTaccardi commented 2 years ago

Unfortunately my company blocks pushing code to regular github, so collaborating here will be difficult.

This doc contains a list of the APIs that would need migrations: https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements

Most of the issues I've seen are usage of project.file(..) or project.buildDir, which can be replaced with layout.buildDirectory (inject a ProjectLayout).

ZakTaccardi commented 2 years ago

note: configuration cache is nearing feature stability https://github.com/gradle/gradle/issues/19933

Malinskiy commented 2 years ago

So your company blocks pushing code to github but it's ok to use code from github? Seems like a wrong policy FYI I don't plan to implement support for configuration cache in the near future because the project has different priorities ATM, happy to help with the code review though

Malinskiy commented 1 year ago

0.8.0 added support for as much incrementality as reasonably possible, should help a bit