:kotlin-intensifies-purple: New blog post alert: <...
# announcements
a
K New blog post alert: K2 Compiler Performance Benchmarks and How to Measure Them on Your Projects In our latest post, we explore the performance of the K2 compiler in various projects and give you the tools to collect your own benchmarks. Some of K2's improvements include: 🚀 Up to 94% faster compilation ⏲️ Significant speedups in the initialization and analysis phases kodee walking Check out the benchmarks and share your own results! We are eager to learn about both the improvements and any issues you might encounter. Dive in now ➡️ kotl.in/4x6lke
kodee walking 4
K 24
s
This is awesome, but unfortunately does not work out-of the box for most advanced projects. For example, the fact that it relies on JSON report output, means it needs a specific version of Kotlin to run the build. And it does not work together with included builds that uses
kotlin-dsl
plugin. The recommendation is to add the
kotlin("jvm")
plugin to ensure the proper version, but again, it will fail and Gradle will complain that it can't find the proper jvm plugin. I ended up replicating parts of the gradle-profiler scenarios and run them manually. 😕
n
Hi Simon! Would you mind sharing the exception when
kotliln("jvm")
plugin is applied?
s
Copy code
Plugin [id: 'org.jetbrains.kotlin.jvm'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (plugin dependency must include a version number for this source)
And I also have this warning
Copy code
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.9.20` that might work differently than in the requested version `1.9.23`.
t
warning is expected
which version of
kotlin("jvm")
plugin are you applying?
s
No specific version (aka the default used by Gradle I suppose):
Copy code
plugins {
    kotlin("jvm")
    `kotlin-dsl`
}
t
please specify using
kotlin_version
property:
Copy code
plugins {
   val kotlinVersion = System.getenv("kotlin_version")
    kotlin("jvm") version(kotlinVersion)
    `kotlin-dsl`
}
s
Copy code
Plugin [id: 'org.jetbrains.kotlin.plugin.compose', version: '1.9.23', apply: false] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:1.9.23')
  Searched in the following repositories:
    Google
    MavenRepo
    Gradle Central Plugin Repository
I guess this is probably caused by the fact my repository uses the new Kotlin Compose compiler, and the benchmark expects to have the project code working on both versions at the same time 😕
The automated scenarios do not allow customizing
git-checkout
parameter, and instead uses the HEAD
t
@Nataliya Valtman I think we could add this feature as Gradle profiler should support it as well
👀 1
s
It seems like @Zac Sweers added support for this in https://github.com/Kotlin/k2-performance-metrics/pull/10 Thanks a lot 🙏
👍 1