Status Update
Comments
ga...@google.com <ga...@google.com>
cm...@google.com <cm...@google.com>
au...@google.com <au...@google.com> #2
Note, this is normally a warning, but we run with -Werror
ga...@google.com <ga...@google.com> #3
To reproduce, create a default project in AS and to app/build.gradle
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Werror"
}
and run JAVA_HOME=<JDK_11> ./gradlew clean :app:comDJWJ
.
je...@google.com <je...@google.com> #4
Isn't it coming from the javac compiler itself. I do not believe jdk11 supports generating jdk7 bytecode but I might be wrong.
au...@google.com <au...@google.com> #5
It's been working for almost a year for us.
jdk11/linux-x86/bin/javac -source 1.7 -target 1.7 Test.java
this compiles just fine.
au...@google.com <au...@google.com> #6
It seems very likely it is that starts using -parameter
calls to javac
it seems that this argument is not supported when targeting 1.7, which a lot of AGP clients still do.
je...@google.com <je...@google.com> #7
On Wed, Sep 23, 2020 at 4:09 PM aurimas <buganizer-system+aurimas@google.com>
wrote:
hu...@google.com <hu...@google.com> #8
Thanks for catching this bug! We have fixed this issue in AGP 4.2.0-beta01 (maybe also AGP 4.2.0-alpha13 if my cherrypick request is approved):
We are now also treating javac warnings as errors in our tests to prevent similar issues.
@Jerome: Isn't it coming from the javac compiler itself. I do not believe jdk11 supports generating jdk7 bytecode but I might be wrong.
Looks like JDK 11 deprecates (but still supports) targeting Java 6, as detected by this test
Description
androidx-studio-integration
branch./frameworks/support/busytown/androidx-studio-integration.sh