18

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?

3
  • 1
    Quoting from the "Known Issues" from here : Android Gradle Plugin may report the following warning, which may be safely ignored: WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.. Android Gradle Plugin 3.3 will resolve this issue.
    – zeekhuge
    Nov 25, 2018 at 19:13
  • 3
    Also, for me, migrating to androidX removed those warnings at all !
    – zeekhuge
    Nov 25, 2018 at 21:02
  • @ZeekHuge thanks for your comments. I have read this paragraph, which seems to imply this option is ignored, but is it the case for all "experimental and unsupported" option settings?
    – PLNech
    Nov 26, 2018 at 12:12

1 Answer 1

1

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.

2
  • Thanks for these details, although they don't answer the question: do those properties affect anything? How come do these options always seem ignored in my testing? You're addressing the fact they are "experimental", but they are also described as "unsupported".
    – PLNech
    Apr 2, 2020 at 11:09
  • 1
    These warnings do not affect the functionality at all, but one should better not depend on them (unless one has to), because they may either be added as default functionality or they may disappear again; in other terms, it's kind of a public beta. The term "unsupported" may have two different meanings, when it comes to features, depending on the context. In this case: not being covered by support. Apr 2, 2020 at 15:15

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.