-
Notifications
You must be signed in to change notification settings - Fork 26
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
Make app-gradle-plugin configuration cache compatible #997
Comments
Hi @liutikas. What would it take to make the plugin configuration-cache compatible? |
- Replace project with injected FileOperations object - Replace project with logger as that's the only thing used Fixes part of #454 issue Test: existing tests pass
Partial fix here GoogleCloudPlatform/app-gradle-plugin#455 |
@diegomarquezp I'm keen to move this forward, we need maintainer involvement to help make decisions. GoogleCloudPlatform/app-gradle-plugin#455 takes use ⅔ the way there. It fixes
There is 1 bigger problem, which is the following from many sources:
Each Extension is referenced from Tasks, which means that those Extensions cannot have
To finalize the work we need to discuss what to do with the internal API usage:
See https://github.com/GoogleCloudPlatform/app-gradle-plugin/pull/455/files#r1148827989 for more. To make the extension migration production ready, we'll have to add one reflective call to support < Gradle 5.3, because at that point they removed a method that we would use. (There's a replacement on the same interface with a different name from Gradle 4.10.) |
I also found more usages of btw, the branch is https://github.com/TWiStErRob/gcp-gradle-plugin/commits/cc if you want to see all the commits at once. |
In case someone is looking for a workaround:
+ ktslistOf(
// com.google.cloud.tools.gradle.appengine.core.CheckCloudSdkTask::class, // OK
com.google.cloud.tools.gradle.appengine.core.DownloadCloudSdkTask::class, // getProject()
com.google.cloud.tools.gradle.appengine.core.GcloudTask::class, // DeployExtension.gradleProject (except CloudSdkLoginTask)
com.google.cloud.tools.gradle.appengine.core.ShowConfigurationTask::class, // getProject()
com.google.cloud.tools.gradle.appengine.appyaml.StageAppYamlTask::class, // StageAppYamlExtension.project + getProject()
com.google.cloud.tools.gradle.appengine.standard.StageStandardTask::class, // StageStandardExtension.project + getProject()
com.google.cloud.tools.gradle.appengine.standard.DevAppServerRunTask::class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.standard.DevAppServerStartTask::class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.standard.DevAppServerStopTask::class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.sourcecontext.GenRepoInfoFileTask::class, // GenRepoInfoFileExtension.project
).forEach {
tasks.withType(it).configureEach {
notCompatibleWithConfigurationCache("https://github.com/GoogleCloudPlatform/appengine-plugins/issues/997")
}
} Groovy//noinspection UnnecessaryQualifiedReference
[
// com.google.cloud.tools.gradle.appengine.core.CheckCloudSdkTask.class, // OK
com.google.cloud.tools.gradle.appengine.core.DownloadCloudSdkTask.class, // getProject()
com.google.cloud.tools.gradle.appengine.core.GcloudTask.class, // DeployExtension.gradleProject (except CloudSdkLoginTask)
com.google.cloud.tools.gradle.appengine.core.ShowConfigurationTask.class, // getProject()
com.google.cloud.tools.gradle.appengine.appyaml.StageAppYamlTask.class, // StageAppYamlExtension.project + getProject()
com.google.cloud.tools.gradle.appengine.standard.StageStandardTask.class, // StageStandardExtension.project + getProject()
com.google.cloud.tools.gradle.appengine.standard.DevAppServerRunTask.class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.standard.DevAppServerStartTask.class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.standard.DevAppServerStopTask.class, // RunExtension.project
com.google.cloud.tools.gradle.appengine.sourcecontext.GenRepoInfoFileTask.class, // GenRepoInfoFileExtension.project
].each {
tasks.withType(it).configureEach {
notCompatibleWithConfigurationCache("https://github.com/GoogleCloudPlatform/appengine-plugins/issues/997")
}
}
but no build failure. This means we can use CC for running test and other checks, but CC is skipped for when these tasks are configured, which could slow down local development for example ( |
Can we get some reply? @diegomarquezp cc @suztomo |
Make app-gradle-plugin configuration cache compatible. Configuration cache is about to ship stable. Enabling it currently causes GCP gradle plugin to fail in multiple ways
The text was updated successfully, but these errors were encountered: