Skip to content
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

Bump JDK 17 and using toolchain #1392

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Jaehwa-Noh
Copy link
Contributor

@Jaehwa-Noh Jaehwa-Noh commented Apr 23, 2024

What I have done and why
• Replace sourceCompatibility and targetCompatibility to toolchain
• Add toolchain resolver org.gradle.toolchains.foojay-resolver-convention
• Bump JDK11 to JDK17

JDK 17

In this issuetracker shows, no need to fix the version of JDK at 11 to use desugaring.
https://issuetracker.google.com/issues/343505126

toolchain

According this documentation

We recommend that you always specify the Java toolchain, and either ensure that the specified JDK is installed, or add a toolchain resolver to your build.

If not specified, this defaults to the Java toolchain or JDK used to run Gradle. We recommend that you always explicitly specify a toolchain (preferred) or sourceCompatibility.

resolver

documentation

If you use Gradle 8.0.2 or higher, you also need to add a toolchain resolver plugin. This type of plugin manages which repositories to download a toolchain from. As an example, add to your settings.gradle(.kts) the following plugin:

Fix #1483

How I'm testing it

Choose at least one:

  • Unit tests
  • UI tests
  • Screenshot tests
  • N/A (provide justification)

Change-Id: I86d606a582e3cdf5b7d2c9304783a905682920ad
- "org.gradle.toolchains.foojay-resolver-convention".

Change-Id: I8368ffa068c1b6318160fc4783f851595cd667ff
Change-Id: I0d706d410ca339789c0fea60b451aa82920648de
Change-Id: Ibdf89dd4f82a01fd8b765adb94668a615970c291
Change-Id: I878ab5315b861319d61498670124f0de5d4a5c49
Change-Id: Ic32957cfcbfbf80bf82358fd4811be8d17bb3a94
@Jaehwa-Noh Jaehwa-Noh marked this pull request as draft April 23, 2024 08:04
@Jaehwa-Noh Jaehwa-Noh marked this pull request as ready for review April 23, 2024 10:56
Change-Id: I85ac5d0d6ab81a618ab90dd41bdd40bfb7db7fc3

# Conflicts:
#	build-logic/convention/build.gradle.kts
#	build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/KotlinAndroid.kt
#	lint/build.gradle.kts
@Jaehwa-Noh Jaehwa-Noh marked this pull request as draft May 30, 2024 07:22
Change-Id: I5aef26e99c33124ebe99c5045a7ca89083a2e73d
Change-Id: I3e04f3fdf04a2ac98cf83c331e38202920cf1bce
Change-Id: Ibd27ae52e9c6edafc654574e7ddaa8742ad69a24
Change-Id: I1e1074c6e6fdfc578c82bf6263879ef9e5eb9364
Change-Id: Ieb6d9c63ad2012dde3e7280ccea25dbd80edd8e7
This reverts commit 81ae9e3.
@Jaehwa-Noh Jaehwa-Noh changed the title Preferred toolchain use Bump JDK 17 and using toolchain May 30, 2024
@Jaehwa-Noh Jaehwa-Noh marked this pull request as ready for review May 30, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Desugaring doesn't need to fix at JDK 11 version.
1 participant