Skip to content

Commit 70fc683

Browse files
Elena LepilkinaAbduqodiri Qurbonzoda
authored andcommitted
Upgrade kotlin to 1.4.30 and gradle to 6.8
1 parent a72f09d commit 70fc683

File tree

12 files changed

+40
-68
lines changed

12 files changed

+40
-68
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the hoods to run benchmarks on JVM.
1616

1717
Gradle 6.0 or newer
1818

19-
Kotlin 1.4.0 or newer
19+
Kotlin 1.4.30 or newer
2020

2121
# Gradle plugin
2222

examples/kotlin-kts/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ configure<AllOpenExtension> {
2121
}
2222

2323
dependencies {
24-
implementation(kotlin("stdlib-jdk8"))
2524
implementation(project(":kotlinx.benchmark.runtime"))
2625
}
2726

examples/kotlin-multiplatform/build.gradle

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ kotlin {
4141
sourceSets {
4242
commonMain {
4343
dependencies {
44-
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
4544
implementation project(":kotlinx.benchmark.runtime")
4645
}
4746
}
@@ -51,22 +50,14 @@ kotlin {
5150
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
5251
}
5352
}
54-
jvmMain {
55-
dependencies {
56-
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
57-
}
58-
}
53+
jvmMain {}
5954
jvmTest {
6055
dependencies {
6156
implementation 'org.jetbrains.kotlin:kotlin-test'
6257
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
6358
}
6459
}
65-
jsMain {
66-
dependencies {
67-
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
68-
}
69-
}
60+
jsMain {}
7061
jsTest {
7162
dependencies {
7263
implementation 'org.jetbrains.kotlin:kotlin-test-js'

examples/kotlin/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ compileTestKotlin {
3333
// Propagate dependencies from main sourceSet
3434
// You can add "+ sourceSets.test.output" to include test output as well
3535
dependencies {
36-
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
3736
implementation(project(":kotlinx.benchmark.runtime"))
3837
benchmarksCompile sourceSets.main.output + sourceSets.main.runtimeClasspath
3938
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group = org.jetbrains.kotlinx
33
version = 0.2.0
44

55
kotlin.code.style=official
6-
kotlin_version=1.4.0
6+
kotlin_version=1.4.30
77
jmhVersion=1.21
88
junit_version=4.12
99

gradle/shared.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ compileTestKotlin {
1313

1414
dependencies {
1515
compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
16-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
17-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk7', version: kotlin_version
18-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
1916

2017
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_version
2118
testCompile group: 'junit', name: 'junit', version: junit_version

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip

plugin/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ sourceSets {
6565

6666
dependencies {
6767
compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
68-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
69-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk7', version: kotlin_version
70-
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
7168

7269
compile 'com.squareup:kotlinpoet:1.3.0'
7370
compile "org.openjdk.jmh:jmh-core:$jmhVersion"

plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ group = org.jetbrains.kotlinx
77
# Put link to your OSS repository. Bintray requires this to be filled for free OpenSource tiers.
88
vcs=https://github.com/kotlin/kotlinx-benchmark
99

10-
kotlin_version=1.4.0
10+
kotlin_version=1.4.30
1111
jmhVersion=1.21
1212
junit_version=4.12
1313
infra_version=0.2.0-dev-55

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ private fun Project.createNativeBenchmarkCompileTask(target: NativeBenchmarkTarg
6767
benchmarkCompilation.apply {
6868
val sourceSet = kotlinSourceSets.single()
6969
sourceSet.resources.setSrcDirs(files())
70+
// TODO: check if there are other ways to set compiler options.
71+
this.kotlinOptions.freeCompilerArgs = compilation.kotlinOptions.freeCompilerArgs
7072
sourceSet.kotlin.setSrcDirs(files("$benchmarkBuildDir/sources"))
7173
sourceSet.dependencies {
7274
implementation(compilation.compileDependencyFiles)
@@ -79,15 +81,12 @@ private fun Project.createNativeBenchmarkCompileTask(target: NativeBenchmarkTarg
7981
// The release build type is already optimized and non-debuggable.
8082
executable(benchmarkCompilation.name, listOf(RELEASE)) {
8183
this.compilation = benchmarkCompilation
84+
this.outputDirectory = file("$benchmarkBuildDir/classes")
8285
// A link task's name is linkReleaseExecutable<Target>.
8386
linkTask.apply {
8487
group = BenchmarksPlugin.BENCHMARKS_TASK_GROUP
8588
description = "Compile Native benchmark source files for '${compilationTarget.name}'"
8689
dependsOn(generateSourceTaskName(target))
87-
88-
// It's impossible to change output directory using the binaries DSL.
89-
// See https://youtrack.jetbrains.com/issue/KT-29395
90-
destinationDir = file("$benchmarkBuildDir/classes")
9190
}
9291
linkTask.onlyIf { compilation.compileKotlinTask.enabled }
9392
tasks.getByName(BenchmarksPlugin.ASSEMBLE_BENCHMARKS_TASKNAME).dependsOn(linkTask)

0 commit comments

Comments
 (0)