Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Incompatibility issue with Gradle configuration cache #96

Open

Description

@CristianGM

The configuration cache is a feature that significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds.

Implementing support for the configuration cache in this plugin would improve users experience.

See https://docs.gradle.org/nightly/userguide/configuration_cache.html

The configuration cache will be introduced in Gradle 6.6.
But this can already be tested using 6.6-milestone-2.

Running the last Gradle Nightly + Kotlin 14-M3 + AGP 4.1.0-beta03 everything is working fine until we enable this plugin.

When I run ./gradlew assembleRelease, and the configuration doesn't come from the cache, Gradle reports this warning:

⌄ task:app:assembleRelease📋 of type org.gradle.api.DefaultTask📋
⌄ fieldactions📋 of org.gradle.api.DefaultTask📋
⌄ bean of type org.gradle.api.internal.AbstractTask$ClosureTaskAction📋
⌄ fieldclosure📋 of org.gradle.api.internal.AbstractTask$ClosureTaskAction📋
⌄ bean of type com.vanniktech.android.apk.size.ApkSizePlugin$_applyAndroidProject_closure1$_closure2$_closure3📋
⌄ fieldtask📋 of com.vanniktech.android.apk.size.ApkSizePlugin$_applyAndroidProject_closure1$_closure2$_closure3📋
⌄ bean of type groovy.lang.Reference📋
⌄ fieldvalue📋 of groovy.lang.Reference📋
■ cannot serialize object of type com.vanniktech.android.apk.size.ApkSizeTask📋, a subtype of org.gradle.api.Task📋, as these are not supported with the configuration cache.

as consequence of that, once it tries to run from a cached configuration the build fails with:

* What went wrong:
Execution failed for task ':Leboncoin:assembleRelease'.
> Cannot invoke method sizeApk() on null object

Activity

  1. vanniktech commented on Jul 10, 2020

    @vanniktech
    Owner

    Mind creating a PR to fix this?

  2. vanniktech commented on Jul 10, 2020

    @vanniktech
    Owner

    Being honest, I've entirely stopped using this plugin and I don't know if anyone is actually using it. (Probably they should not; and use the new proper 'public' API's from AGP 4.0/4.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions