Skip to content

Commit bd73c0f

Browse files
committed
Migrate to 1.3.40 EAP
1 parent ab24fc1 commit bd73c0f

File tree

13 files changed

+52
-221
lines changed

13 files changed

+52
-221
lines changed

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ buildscript {
33
jcenter()
44
gradlePluginPortal()
55
// maven { url "../kotlin-libraries-infra/build/maven" }
6-
maven { url "https://dl.bintray.com/orangy/maven" }
6+
maven { url "https://dl.bintray.com/orangy/maven" } // for kotlinx.cli & infra
7+
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
8+
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
79
}
810

911
dependencies {
@@ -14,6 +16,11 @@ buildscript {
1416

1517
apply plugin: 'kotlinx.team.infra'
1618

19+
repositories {
20+
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
21+
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
22+
}
23+
1724
infra {
1825
teamcity {
1926
projectName = "kotlinx-benchmark"
@@ -33,13 +40,6 @@ infra {
3340
password = findProperty('bintrayApiKey')
3441
}
3542
}
36-
37-
node {
38-
version = '10.15.1'
39-
mocha('4.1.0')
40-
install("source-map-support", "0.5.3")
41-
install("mocha-teamcity-reporter", "2.2.2")
42-
}
4343
}
4444

4545
afterEvaluate {

examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ subprojects {
1212
mavenCentral()
1313
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
1414
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
15-
maven { url "https://dl.bintray.com/orangy/maven" }
15+
maven { url "https://dl.bintray.com/orangy/maven" } // for kotlinx.cli
1616
// maven { url "$rootProject.projectDir/../kotlin-libraries-infra/build/maven" }
1717
}
1818
}

examples/kotlin-kts/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.*
77
plugins {
88
java
99
kotlin("jvm")
10-
kotlin("plugin.allopen") version "1.3.30"
10+
kotlin("plugin.allopen") version "1.3.40-eap-104"
1111
id("kotlinx.benchmark") version "0.2.0"
1212
}
1313

examples/kotlin-multiplatform/build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@ buildscript {
66

77
plugins {
88
id 'org.jetbrains.kotlin.multiplatform'
9-
id 'org.jetbrains.kotlin.plugin.allopen' version "1.3.30"
9+
id 'org.jetbrains.kotlin.plugin.allopen' version "1.3.40-eap-104"
1010
id 'kotlinx.benchmark' version "0.2.0"
1111
id 'kotlinx.team.node'
1212
}
1313

14-
node {
15-
version = '10.15.1'
16-
}
17-
1814
// how to apply plugin to a specific source set?
1915
allOpen {
2016
annotation("org.openjdk.jmh.annotations.State")
2117
}
2218

2319
kotlin {
20+
/*
2421
infra {
2522
target('macosX64')
2623
target('linuxX64')
2724
target('mingwX64')
2825
}
26+
*/
2927

3028
jvm {
3129
compilations.all {
@@ -36,12 +34,7 @@ kotlin {
3634
}
3735

3836
js {
39-
compilations.all {
40-
kotlinOptions {
41-
sourceMap = true
42-
moduleKind = "umd"
43-
}
44-
}
37+
nodejs()
4538
}
4639

4740
sourceSets.all {

examples/kotlin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
33
id 'org.jetbrains.kotlin.jvm'
4-
id 'org.jetbrains.kotlin.plugin.allopen' version "1.3.30"
4+
id 'org.jetbrains.kotlin.plugin.allopen' version "1.3.40-eap-104"
55
id 'kotlinx.benchmark' version '0.2.0'
66
}
77

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.3.31
6+
kotlin_version=1.3.40-eap-104
77
jmhVersion=1.21
88
junit_version=4.12
99

plugin/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
mavenCentral()
44
jcenter()
55
// maven { url "../../kotlin-libraries-infra/build/maven" }
6-
maven { url "https://dl.bintray.com/orangy/maven" }
6+
maven { url "https://dl.bintray.com/orangy/maven" } // for kotlinx.cli & infra
77
}
88
dependencies {
99
classpath "kotlinx.team:kotlinx.team.infra:$infra_version"
@@ -13,7 +13,7 @@ buildscript {
1313

1414
plugins {
1515
id 'java-gradle-plugin'
16-
id 'org.jetbrains.kotlin.jvm' version "1.3.30"
16+
id 'org.jetbrains.kotlin.jvm' version "1.3.40-eap-104"
1717
}
1818

1919
apply plugin: 'kotlinx.team.infra'
@@ -40,7 +40,7 @@ repositories {
4040
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
4141
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
4242
// maven { url "../../kotlin-libraries-infra/build/maven" }
43-
maven { url "https://dl.bintray.com/orangy/maven" }
43+
maven { url "https://dl.bintray.com/orangy/maven" } // for kotlinx.cli & infra
4444
}
4545

4646
gradlePlugin {

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.3.30
10+
kotlin_version=1.3.40-eap-104
1111
jmhVersion=1.21
1212
infra_version=0.1.0-dev-47
1313

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class BenchmarksPlugin : Plugin<Project> {
4141
if (kotlinClass != null) {
4242
plugins.findPlugin(kotlinClass)?.run {
4343
logger.info("Detected Kotlin plugin version '$kotlinPluginVersion'")
44-
if (VersionNumber.parse(kotlinPluginVersion) < VersionNumber(1, 3, 30, null))
45-
logger.error("JetBrains Gradle Benchmarks plugin requires Kotlin version 1.3.30 or higher")
44+
if (VersionNumber.parse(kotlinPluginVersion) < VersionNumber(1, 3, 40, null))
45+
logger.error("JetBrains Gradle Benchmarks plugin requires Kotlin version 1.3.40 or higher")
4646
}
4747
}
4848

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
package kotlinx.benchmark.gradle
22

3-
import kotlinx.team.infra.node.*
43
import org.gradle.api.*
54
import org.jetbrains.kotlin.gradle.plugin.mpp.*
65

76
fun Project.processJsCompilation(target: JsBenchmarkTarget) {
8-
if (!plugins.hasPlugin(NodePlugin::class.java)) {
9-
logger.info("Enabling node plugin in $this")
10-
pluginManager.apply(NodePlugin::class.java)
11-
}
12-
137
project.logger.info("Configuring benchmarks for '${target.name}' using Kotlin/JS")
148
val compilation = target.compilation
159

1610
configureMultiplatformJsCompilation(target)
1711

18-
createJsBenchmarkInstallTask()
1912
createJsBenchmarkGenerateSourceTask(target, compilation)
2013

2114
val benchmarkCompilation = createJsBenchmarkCompileTask(target)
22-
createJsBenchmarkDependenciesTask(target, benchmarkCompilation)
2315
target.extension.configurations.forEach {
2416
createJsBenchmarkExecTask(it, target, benchmarkCompilation)
2517
}
@@ -38,6 +30,8 @@ private fun Project.createJsBenchmarkCompileTask(target: JsBenchmarkTarget): Kot
3830
sourceSet.dependencies {
3931
implementation(compilation.compileDependencyFiles)
4032
implementation(compilation.output.allOutputs)
33+
implementation(npm("benchmark"))
34+
runtimeOnly(npm("source-map-support"))
4135
}
4236
compileKotlinTask.apply {
4337
group = BenchmarksPlugin.BENCHMARKS_TASK_GROUP

0 commit comments

Comments
 (0)