[Kotlin] Update gradle to 7.4.1 and simplify config files. (#7231)

* [Kotlin] Update gradle to 7.4.1 and simplify config files.

* [Kotlin] Add wrapper-validation-action to Kotlin Linux

* [Kotlin] Remove benchmark actions to reduce CI time

* [Kotlin] Move CI js test to Linux action, to increase Mac action speed

* [Kotlin] Generate gradle wrapper in order to be validate

Gradle wrapper from 3.3 to 4.0 are not verifiable because those files
were dynamically generated by Gradle in a non-reproducible way.

So they are now regenerated and will be checked using gitlab action:
gradle/wrapper-validation-action@v1
This commit is contained in:
Paulo Pinheiro
2022-04-08 20:23:13 +02:00
committed by GitHub
parent ab4bf59e8c
commit d658239484
14 changed files with 237 additions and 231 deletions

View File

@@ -1,15 +1,15 @@
import org.jetbrains.kotlin.ir.backend.js.compile
plugins {
kotlin("multiplatform") version "1.4.20"
kotlin("multiplatform")
id("org.jetbrains.kotlin.plugin.allopen") version "1.4.20"
id("org.jetbrains.kotlinx.benchmark") version "0.3.0"
id("org.jetbrains.kotlinx.benchmark") version "0.4.2"
id("io.morethan.jmhreport") version "0.9.0"
id("de.undercouch.download") version "4.1.1"
id("de.undercouch.download")
}
// allOpen plugin is needed for the benchmark annotations.
// for more infomation, see https://github.com/Kotlin/kotlinx-benchmark#gradle-plugin
// for more information, see https://github.com/Kotlin/kotlinx-benchmark#gradle-plugin
allOpen {
annotation("org.openjdk.jmh.annotations.State")
}
@@ -45,54 +45,25 @@ benchmark {
kotlin {
jvm {
withJava()
compilations.all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
sourceSets {
all {
languageSettings.enableLanguageFeature("InlineClasses")
languageSettings.useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
}
}
val jvmMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.3.0")
implementation(kotlin("stdlib-common"))
implementation(project(":flatbuffers-kotlin"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.1")
implementation(libs.kotlinx.benchmark.runtime)
//moshi
implementation("com.squareup.moshi:moshi-kotlin:1.11.0")
//gson
implementation("com.google.code.gson:gson:2.8.5")
// json serializers
implementation(libs.moshi.kotlin)
implementation(libs.gson)
}
}
/* Targets configuration omitted.
* To find out how to configure the targets, please follow the link:
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets
*/
targets {
targetFromPreset(presets.getAt("jvm"))
}
}
}