Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean for a gradle property to be "experimental and unsupported"?

Several times, to solve an issue or update dependencies, I had to enable a given gradle option setting.

  • For example, Robolectric 4.0 Migration guide states:

    Put this in your gradle.properties:

    android.enableUnitTestBinaryResources=true

  • Likewise, to debug a databinding compile error I followed the advice printed in Gradle's build log:

    Gradle may disable incremental compilation [...].
    Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.


From both examples, I get that the authors (Robolectric/gradle maintainers) are confident that enabling this option will have a positive impact on each situation.
However, in both cases I get this warning in my build output:

WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported. The current default is 'false'.

WARNING: The option setting 'android.enableSeparateAnnotationProcessing=true' is experimental and unsupported. The current default is 'false'.

I had in my gradle.properties since a few months the flag android.databinding.enableV2=true. To see how it's handled, I tried to put it to false, which brought the same The option setting 'android.databinding.enableV2=false' is experimental and unsupported. warning (which seems to suggest an unsupported setting is ignored).

  • I understand these are experimental feature flags. But what about unsupported? Does this mean I should not expect support if anything goes wrong, or does it mean they will be ignored?

  • If it means they are ignored, how are those properties meant to be used?

like image 941
PLNech Avatar asked Nov 15 '18 15:11

PLNech


People also ask

What is gradle property?

A gradle.properties file is a list of key values pairs, each of which represents a property name and value.

What is gradle properties in Android Studio?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.


1 Answers

This is the default warning for new, experimental AGP features. This generally means, in case you'd file a bug against them, it may or may not be considered. It also means, that they may eventually be retracted at any given time (or future version); it is nothing to rely on. For example, it may as well warn that such a feature switch is not supported anymore and that it has no effect.

like image 69
Martin Zeitler Avatar answered Sep 23 '22 02:09

Martin Zeitler