Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gradle Plugin: Support Java 11 #4863

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Gradle Plugin: Support Java 11 #4863

wants to merge 3 commits into from

Conversation

hfhbd
Copy link
Collaborator

@hfhbd hfhbd commented Dec 1, 2023

By using Java 17 in the worker actions. Curios if we can even use Java 8 πŸ€”

@hfhbd hfhbd self-assigned this Dec 1, 2023
@hfhbd hfhbd changed the title Support Java 11 as Gradle JVM Gradle Plugin: Support Java 11 Dec 4, 2023
@JavierSegoviaCordoba
Copy link
Contributor

Is this discarded?

@chrisjenx
Copy link
Contributor

What's the reason for downgrading java version? Generally we want to upgrade not downgrade?

@JavierSegoviaCordoba
Copy link
Contributor

What's the reason for downgrading java version? Generally we want to upgrade not downgrade?

People are forced to use a new version. From my perspective is not a problem, but it is usual to use Java 8 for libraries and Java 11 for Gradle plugins (because some big plugins were forced to move to Java 11 tho).

@JavierSegoviaCordoba
Copy link
Contributor

@hfhbd I have created this PR to reduce the target Java version to 11 in sql-psi.

@JakeWharton
Copy link
Collaborator

I suspect we may still require 17 in the end as that's what AGP uses now.

@JavierSegoviaCordoba
Copy link
Contributor

Is that still a thing? I think they reverted the need to have Java 17 in AGP as I am upgrading my convention plugins to the latest AGP version and they are using Java 11.

@JakeWharton
Copy link
Collaborator

Started in AGP 8: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes

Paparazzi just forced us to 17 internally because it bumped layoutlib from AGP to the version from AGP 8.x.

@JavierSegoviaCordoba
Copy link
Contributor

I will have to recheck, but I am using AGP 8.7.3 and the plugin is built with Java 11. Something must be different as I can merge any AGP PR but SqlDelight 2.0.2 PR fails because of Java 17.

I am pretty confident it is using Java 11 as any look for JavaVersion does not show up anything about JavaVersion_17

@hfhbd
Copy link
Collaborator Author

hfhbd commented Dec 24, 2024

Anyway, Gradle 8.10 emits a warning if you don't use a JVM < 17 gradle/gradle#29507, because Gradle 9.0 will require a JVM 17.

@JakeWharton
Copy link
Collaborator

I'm still happy to target as low as possible while running on as new as possible ourselves. 11 is a pretty reasonable low mark for tooling things.

@JavierSegoviaCordoba
Copy link
Contributor

I can run assemble on SqlDelight by publishing the sql-psi to MavenLocal. However, I need to keep the Intellij plugin module using Java 17.

Trying to run all the tests but some of them are failing. I migrated some deprecated APIs that were using inline to other new ones that are not inline and I can be missing something. I am running the tests from a Windows machine too, which can affect.

When sql-psi is published using Java 11, I will create the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants