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

Adding Kotlin compile support #189

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

LikeTheSalad
Copy link
Contributor

@LikeTheSalad LikeTheSalad commented Dec 14, 2023

Related to this discussion.

@LikeTheSalad LikeTheSalad requested a review from a team December 14, 2023 15:50
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString()))
languageVersion.set(minKotlinVersion)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
languageVersion.set(minKotlinVersion)
languageVersion.set(minKotlinVersion)
apiVersion.set(minKotlinVersion)

Copy link
Member

Choose a reason for hiding this comment

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

Probably has to change in the other places as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, I'll make the changes 👍 tbh the docs for that option weren't too clear for me so I wasn't sure if we needed it. Though I guess is better to have it to avoid unexpected issues. We should probably add it in the core repo too, as it's only got languageVersion set.

sourceCompatibility(javaVersion)
targetCompatibility(javaVersion)
isCoreLibraryDesugaringEnabled = true
}
}
kotlin {
Copy link
Member

@marandaneto marandaneto Dec 14, 2023

Choose a reason for hiding this comment

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

Usually this configuration goes in the android.kotlinOptions block:

android {
  kotlinOptions {
    // jvmTarget
    // languageVersion
    // apiVersion
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like the android.kotlinOptions is just a wrapper of the other config, though yeah it's usually the way Android suggests to set Kotlin stuff so I've made the changes 👍

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

LGTM. One step closer! Thanks.

# Conflicts:
#	gradle/libs.versions.toml
@LikeTheSalad LikeTheSalad merged commit 2d65392 into open-telemetry:main Dec 15, 2023
2 checks passed
@LikeTheSalad LikeTheSalad deleted the add-kotlin-support branch December 15, 2023 07:56
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