Closed joezorry closed 2 years ago
I am also attempting to use the configuration cache as well. Here's the error I'm getting.
I'm also facing this problem with Gradle 7.3.3
and OSS License Gradle plugin 0.10.4
.
387 problems were found storing the configuration cache, 2 of which seem unique.
- Task `:app:generateLicenses` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.3.3/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:app:getDependencies` of type `com.google.android.gms.oss.licenses.plugin.DependencyTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See https://docs.gradle.org/7.3.3/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
Support of Gradle configuration cache would be really nice because we Android developers need faster builds desperately 😉
Also having issues with this plugin:
1 problem was found storing the configuration cache.
With com.google.android.gms:oss-licenses-plugin:0.10.5
:
966 problems were found storing the configuration cache, 13 of which seem unique.
- Task `:aospWithQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:aospWithoutQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:buildKotlinToolingMetadata` of type `org.jetbrains.kotlin.gradle.tooling.BuildKotlinToolingMetadataTask$FromKotlinExtension`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectAospWithQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectAospWithoutQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectL3goWithQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectL3goWithoutQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectLawnWithQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:collectLawnWithoutQuickstepReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:l3goWithQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:l3goWithoutQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lawnWithQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lawnWithoutQuickstepReleaseOssLicensesTask` of type `com.google.android.gms.oss.licenses.plugin.LicensesTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
For ones who need config cache support, you can migrate this plugin to Licensee, just ref:
Thanks for the share @Goooler. Quick questions:
OssLicensesMenuActivity
), did you face any issue developing that? (I see that you had to tell Gradle to copy the new resource file).For ones who need config cache support, you can migrate this plugin to Licensee, just ref https://github.com/LawnchairLauncher/lawnchair/pull/3492.
@Goooler I don't quite understand. Licensee is for verifying that you only use approved OSS licenses in your project and Google Play OSS Licenses is for showing licenses information in your Android application. How do they work together?
I'm using:
com.google.android.gms:oss-licenses-plugin:0.10.4
with gradle version 7.2 andcom.android.tools.build:gradle:7.0.2
When I'm running
./gradlew :app:assembleDebug --configuration-cache
on a clean build I get problems with two tasks:generateLicenses
anddependencyTask
I'm attaching the stacktraces here since I can't attach the html report
generateLicenses task:
getDependencies task