Skip to content

Commit 001d3cd

Browse files
Abduqodiri Qurbonzodaqurbonzoda
Abduqodiri Qurbonzoda
authored andcommitted
Enforce minimum Kotlin and Gradle versions in plugin
1 parent 53ee45d commit 001d3cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/main/src/kotlinx/benchmark/gradle/BenchmarksPlugin.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ class BenchmarksPlugin : Plugin<Project> {
3030
// DO NOT use properties of an extension immediately, it will not contain any user-specified data
3131
val extension = extensions.create(BENCHMARK_EXTENSION_NAME, BenchmarksExtension::class.java, project)
3232

33-
if (GradleVersion.current() < GradleVersion.version("5.1")) {
34-
logger.error("JetBrains Gradle Benchmarks plugin requires Gradle version 5.1 or higher")
33+
if (GradleVersion.current() < GradleVersion.version("6.8")) {
34+
logger.error("JetBrains Gradle Benchmarks plugin requires Gradle version 6.8 or higher")
3535
return // TODO: Do we need to fail build at this point or just ignore benchmarks?
3636
}
3737

3838
val kotlinClass = tryGetClass<KotlinBasePluginWrapper>("org.jetbrains.kotlin.gradle.plugin.KotlinBasePluginWrapper")
3939
if (kotlinClass != null) {
4040
plugins.findPlugin(kotlinClass)?.run {
4141
logger.info("Detected Kotlin plugin version '$kotlinPluginVersion'")
42-
if (VersionNumber.parse(kotlinPluginVersion) < VersionNumber(1, 3, 50, null))
43-
logger.error("JetBrains Gradle Benchmarks plugin requires Kotlin version 1.3.40 or higher")
42+
if (VersionNumber.parse(kotlinPluginVersion) < VersionNumber(1, 4, 30, null))
43+
logger.error("JetBrains Gradle Benchmarks plugin requires Kotlin version 1.4.30 or higher")
4444
}
4545
}
4646

0 commit comments

Comments
 (0)