-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile Glide with Java 17 on Gradle #5003
Comments
TWiStErRob
added a commit
to TWiStErRob/glide-support
that referenced
this issue
Jan 8, 2023
Ok, it wasn't that bad for Glide, but I have a feeling every Android project will have to do this. // Workaround for https://github.com/bumptech/glide/issues/5003.
tasks.withType(JavaCompile).configureEach {
options.fork = true
options.forkOptions.jvmArgs += [
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
]
} // Workaround for https://github.com/bumptech/glide/issues/5003.
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
options.forkOptions.jvmArgs = options.forkOptions.jvmArgs.orEmpty() + listOf(
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
)
} |
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Jul 2, 2023
Related to bumptech#5003. This at least lets Glide compile on Java 17. I'm not sure if it has any down stream impact on users of Glide.
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Jul 2, 2023
Related to bumptech#5003. This at least lets Glide compile on Java 17. I'm not sure if it has any down stream impact on users of Glide.
sjudd
added a commit
that referenced
this issue
Jul 2, 2023
Related to #5003. This at least lets Glide compile on Java 17. I'm not sure if it has any down stream impact on users of Glide.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glide Version: 4.14.2
Integration libraries: recyclerview:4.14.2, okhttp:4.14.2, volley:4.14.2
Device/Android Version: N/A
Issue details / Repro steps / Use case background:
I just updated to Gradle 8 RC1 / Java 17 and saw this error. Then I re-tested
gradlew assemble lint --no-build-cache --rerun-tasks -S
Gradle 7.6 / Java 17: fails
Gradle 7.6 / Java 11: ok
Gradle 8 RC1 / Java 17: fails
Gradle 8 RC1 / Java 11: ok
Note: this issue will become very relevant in a few months, when AGP will en-masse force Java 17 on everyone.
Looks like this has been an issue in the past, but no action was taken on the Gradle side, not sure if it's a Gradle issue in general, but linking for reference: gradle/gradle#16641
Based on projectlombok/lombok#2681 (comment) it's not going to be an easy ride.
Any pointers or ideas welcome to use Glide on Java 17.
Repro
JAVA_HOME
to 17gradlew assemble lint --no-build-cache --rerun-tasks -S
Glide load line /
GlideModule
(if any) / list Adapter code (if any):Layout XML:
Stack trace / LogCat:
glide/annotation/compiler/src/main/java/com/bumptech/glide/annotation/compiler/ProcessorUtil.java
Lines 560 to 568 in 4affb8d
The text was updated successfully, but these errors were encountered: