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

Removing toolchain #1526

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

Removing toolchain #1526

wants to merge 2 commits into from

Conversation

riggaroo
Copy link
Collaborator

@riggaroo riggaroo commented Jan 8, 2025

No description provided.

@riggaroo riggaroo requested a review from a team as a code owner January 8, 2025 17:08
@riggaroo riggaroo requested review from dturner and javadude and removed request for dturner January 8, 2025 17:08
Copy link
Contributor

@javadude javadude left a comment

Choose a reason for hiding this comment

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

A few general notes:

  • jvmToolchain acts as a default for sourceCompatibility, targetCompatibility, and jvmTarget. If we used jvmToolchain, the others aren't needed. (Which is one reason I liked jvmToolchain - one place to specify)

  • If we don't have jvmToolchain or jvmTarget, Kotlin defaults to target 1.8. So when jvmToolchain is removed, jvmTarget must be added if not there. (Some scripts had already it)

  • Some files didn't have jvmToolchain and it looks like you accidentally removed jvmTarget

  • A nit - one script uses

    jvmTarget = JavaVersion.VERSION_17.majorVersion
    

    I'd just change that to "17"

JetLagged/app/build.gradle.kts Show resolved Hide resolved
JetNews/app/build.gradle.kts Show resolved Hide resolved
Jetcaster/core/domain/build.gradle.kts Show resolved Hide resolved
Jetcaster/glancewidget/build.gradle.kts Show resolved Hide resolved
Jetcaster/tv/build.gradle.kts Show resolved Hide resolved
Jetcaster/wear/build.gradle Show resolved Hide resolved
Jetchat/app/build.gradle.kts Show resolved Hide resolved
Jetsnack/app/build.gradle.kts Show resolved Hide resolved
Reply/app/build.gradle.kts Show resolved Hide resolved
@tunjid
Copy link
Contributor

tunjid commented Jan 21, 2025

@javadude 👋🏿 👋🏿

Just a few questions about your comment above as II'm trying to resolve a compile error I have that I typically fix by toggling things till they work:

Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (21)

How do I ensure both of java and kotlin are in sync?

@javadude
Copy link
Contributor

@javadude 👋🏿 👋🏿

Just a few questions about your comment above as II'm trying to resolve a compile error I have that I typically fix by toggling things till they work:

Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (21)

How do I ensure both of java and kotlin are in sync?

does jvmTarget and targetCompatibility match?

kotlinOptions {
    jvmTarget = "17"
}

compileOptions {
    targetCompatibility = JavaVersion.VERSION_17
}

The nice thing about toolchain is that it provides a single-place default for jvmTarget, sourceCompatibility, and targetCompatibility, as well as auto-locate or auto-download the specified JDK.

The problem with toolchain is that if you don't have the build configured to auto-download (using something like the foojay resolver), you must have exactly the specified JDK installed on your machine to build it...

Copy link
Contributor

@javadude javadude left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants