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

Use Azul JDK for toolchains #3857

Merged
merged 3 commits into from Feb 26, 2023
Merged

Conversation

dellisd
Copy link
Collaborator

@dellisd dellisd commented Jan 29, 2023

Gradle JVM toolchains use Adoptium by default which doesn't have a JDK 8 builds for Apple Silicon. Azul does!

@dellisd dellisd requested a review from hfhbd January 29, 2023 01:52
@dellisd dellisd marked this pull request as ready for review January 29, 2023 01:52
@dellisd
Copy link
Collaborator Author

dellisd commented Jan 29, 2023

I spoke too soon. Azul isn't really supported yet. In any case, trying to build SQLDelight on an Apple Silicon mac current doesn't work.

@dellisd dellisd closed this Jan 29, 2023
@JakeWharton
Copy link
Member

You need to add https://github.com/gradle/foojay-toolchains for this to work. However, you may run into a bug so it's best to wait for Gradle 7.6.1 or 8.0 before landing it.

@hfhbd
Copy link
Collaborator

hfhbd commented Jan 29, 2023

What do you mean by building sqldelight on m1? I am using m1 too and it works well 🤔

@dellisd
Copy link
Collaborator Author

dellisd commented Jan 29, 2023

What do you mean by building sqldelight on m1? I am using m1 too and it works well 🤔

I'm guessing you have a JDK 8 installed locally that Gradle is using?

My oldest JDK is 11 so Gradle is trying to download an Adoptium build for JDK 8, and there is none for M1.

@hfhbd
Copy link
Collaborator

hfhbd commented Jan 29, 2023

Oh, I checked it and yeah, you are right. I installed azul jdk 8 locally.

@JakeWharton
Copy link
Member

JakeWharton commented Jan 29, 2023

Use this to install it manually (and automatically keep it up-to-date) for now: https://github.com/mdogan/homebrew-zulu

@dellisd dellisd reopened this Jan 29, 2023
@dellisd dellisd marked this pull request as draft January 29, 2023 20:27
@dellisd
Copy link
Collaborator Author

dellisd commented Jan 29, 2023

Added the foojay plugin, and sure enough it's blocked by an issue that was fixed in 7.6.1/8.0. I'll leave this open as a draft PR until we're able to upgrade gradle.

@hfhbd
Copy link
Collaborator

hfhbd commented Feb 13, 2023

I thought we could upgrade to the new release of Gradle 8.0 but the build fails due to https://youtrack.jetbrains.com/issue/KT-55751/MPP-Gradle-Consumable-configurations-must-have-unique-attributes

@dellisd dellisd mentioned this pull request Feb 24, 2023
@dellisd dellisd force-pushed the derekellis/2023-01-28/zulu-toolchain branch from 58a4416 to ed3e020 Compare February 24, 2023 19:11
@dellisd dellisd marked this pull request as ready for review February 24, 2023 19:11
Copy link
Member

@JakeWharton JakeWharton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a lot of these!

Copy link
Collaborator

@hfhbd hfhbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is time to use convention plugins too ;)

@dellisd dellisd enabled auto-merge (squash) February 26, 2023 01:17
@dellisd dellisd merged commit cc56d28 into master Feb 26, 2023
@dellisd dellisd deleted the derekellis/2023-01-28/zulu-toolchain branch February 26, 2023 01:55
@hfhbd
Copy link
Collaborator

hfhbd commented Feb 26, 2023

Very nice!

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.

None yet

3 participants