| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| /* |
| * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| */ |
| |
| apply plugin: 'java' |
| apply plugin: 'kotlin' |
| apply plugin: 'kotlinx-serialization' |
| apply plugin: 'idea' |
| apply plugin: 'com.github.johnrengelman.shadow' |
| apply plugin: 'me.champeau.jmh' |
| |
| sourceCompatibility = 1.8 |
| targetCompatibility = 1.8 |
| jmh.jmhVersion = "1.35" |
| |
| processJmhResources { |
| doFirst { |
| duplicatesStrategy(DuplicatesStrategy.EXCLUDE) |
| } |
| } |
| |
| jmhJar { |
| archiveBaseName.set('benchmarks') |
| archiveVersion.set('') |
| destinationDirectory = file("$rootDir") |
| } |
| |
| // to include benchmark-module jmh source set compilation during build to verify that it is also compiled succesfully |
| assemble.dependsOn jmhClasses |
| |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| if (rootProject.ext.kotlin_lv_override != null) { |
| languageVersion = rootProject.ext.kotlin_lv_override |
| freeCompilerArgs += "-Xsuppress-version-warnings" |
| } |
| } |
| } |
| |
| dependencies { |
| implementation 'org.openjdk.jmh:jmh-core:1.35' |
| implementation 'com.google.guava:guava:31.1-jre' |
| implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3' |
| implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3' |
| implementation "com.squareup.okio:okio:$okio_version" |
| implementation project(':kotlinx-serialization-core') |
| implementation project(':kotlinx-serialization-json') |
| implementation project(':kotlinx-serialization-json-okio') |
| implementation project(':kotlinx-serialization-protobuf') |
| } |