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

kotlinx-benchmark Gradle plugin should use Gradle's embedded Kotlin #244

Open
adam-enko opened this issue Jul 11, 2024 · 0 comments
Open

Comments

@adam-enko
Copy link
Member

adam-enko commented Jul 11, 2024

Currently the kxb Gradle plugin uses Kotlin Gradle Plugin to compile the project.

plugins {
id 'java-gradle-plugin'
id 'maven-publish'
alias(libs.plugins.gradle.pluginPublish)
alias(libs.plugins.kotlinx.binaryCompatibilityValidator)
alias(libs.plugins.kotlin.jvm)
}

However, Gradle uses an embedded version of Kotlin.

Using KGP is problematic for a few reasons.

  • KGP adds dependencies that might clash with other Gradle plugins (e.g. adds kotlin-stdlib as a dependency, but this will be provided by Gradle.)
  • kxb Gradle misses compiler arguments (e.g. -java-parameters) that maximise compatibility with other Gradle plugins.

In order to maximise compatibility with Gradle, kxb Gradle should use the kotlin-dsl plugin instead of KGP. (This might lead to lots of code changes though, because it applies sam-with-receiver - a quicker fix would be to use embedded-kotlin instead of KGP.)

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

No branches or pull requests

1 participant