Status Update
Comments
bi...@google.com <bi...@google.com>
bi...@google.com <bi...@google.com> #2
bi...@google.com <bi...@google.com> #4
for all who are looking for a solution use this:
ga...@google.com <ga...@google.com> #5
Users should interact with AGP using DSL/API. Configuring tasks directly is not supported. See how we handle other error/warning reporting.
bi...@google.com <bi...@google.com> #6
Yeah, configuring task directly should no longer be supported. But
ga...@google.com <ga...@google.com> #7
What happens if release
is set to 9, but source/target are not set?
What is the error message for release = 9 and source/target set to 8? Should we improve it?
Do we need to evaluate value of release
option during configuration (it is a doFirst
makes sense. If we need to get the actual value, then it makes sense to have these checks in configuration phase.
bi...@google.com <bi...@google.com> #8
The expectation from javac is that if you set release
, then don't set -source/-target
. If you set release
to 9 and -source/-target
to 8, then javac would complain about using them together.(not about the version being not in sync)
I am still confused about whether users can configure JavaCompile
task directly, can you confirm?
ga...@google.com <ga...@google.com> #9
I am still confused about whether users can configure JavaCompile task directly, can you confirm?
Users can configure JavaCompile
directly (it is just a property on the task).
Considering the main goal of -release
is to replace -source/-target/-bootclasspath
, it may make sense to discourage its usage in Android project. We can add a warning (asking users to avoid specifying it), and then turn that into an error at some point. What do you think?
bi...@google.com <bi...@google.com> #10
Fixed with Icf5adc2c469b8af68205ccd8aea377c9295834d6
Description
AGP should take value of
javaCompile.options.release
into account when setting up compilation:--release 8
should not be allowed as it does not allow AGP to change-bootclasspath
param value-source/-target
Original issue: https://issuetracker.google.com/185418460