Kotlin / kotlinx-benchmark

Kotlin multiplatform benchmarking toolkit
Apache License 2.0
499 stars 40 forks source link

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

Open adam-enko opened 2 months ago

adam-enko commented 2 months ago

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

https://github.com/Kotlin/kotlinx-benchmark/blob/0764551f1dde18955f986fbf1dd581449202a23f/plugin/build.gradle#L19-L25

However, Gradle uses an embedded version of Kotlin.

Using KGP is problematic for a few reasons.

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.)