Margarita Bobova | 39918cb | 2023-06-23 15:03:38 +0200 | [diff] [blame] | 1 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 2 | |
Leonid Startsev | 21dea85 | 2021-05-18 18:36:19 +0300 | [diff] [blame] | 3 | /* |
| 4 | * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| 5 | */ |
| 6 | |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 7 | apply plugin: 'java' |
| 8 | apply plugin: 'kotlin' |
| 9 | apply plugin: 'kotlinx-serialization' |
| 10 | apply plugin: 'idea' |
Sebastian Schuberth | ece9fdd | 2022-01-28 16:23:48 +0100 | [diff] [blame] | 11 | apply plugin: 'com.github.johnrengelman.shadow' |
Vsevolod Tolstopyatov | 93a06df | 2022-06-24 16:36:32 +0200 | [diff] [blame] | 12 | apply plugin: 'me.champeau.jmh' |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 13 | |
| 14 | sourceCompatibility = 1.8 |
| 15 | targetCompatibility = 1.8 |
Vsevolod Tolstopyatov | a7cee0b | 2022-10-19 13:15:00 +0300 | [diff] [blame] | 16 | jmh.jmhVersion = "1.35" |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 17 | |
Sergey Shanshin | 5e8ccad | 2022-06-30 15:43:42 +0300 | [diff] [blame] | 18 | processJmhResources { |
| 19 | doFirst { |
| 20 | duplicatesStrategy(DuplicatesStrategy.EXCLUDE) |
| 21 | } |
| 22 | } |
| 23 | |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 24 | jmhJar { |
Sergey Shanshin | 5e8ccad | 2022-06-30 15:43:42 +0300 | [diff] [blame] | 25 | archiveBaseName.set('benchmarks') |
| 26 | archiveVersion.set('') |
| 27 | destinationDirectory = file("$rootDir") |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 28 | } |
| 29 | |
Margarita Bobova | 39918cb | 2023-06-23 15:03:38 +0200 | [diff] [blame] | 30 | // to include benchmark-module jmh source set compilation during build to verify that it is also compiled succesfully |
| 31 | assemble.dependsOn jmhClasses |
| 32 | |
| 33 | tasks.withType(KotlinCompile).configureEach { |
| 34 | kotlinOptions { |
| 35 | if (rootProject.ext.kotlin_lv_override != null) { |
| 36 | languageVersion = rootProject.ext.kotlin_lv_override |
| 37 | freeCompilerArgs += "-Xsuppress-version-warnings" |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 42 | dependencies { |
Vsevolod Tolstopyatov | a7cee0b | 2022-10-19 13:15:00 +0300 | [diff] [blame] | 43 | implementation 'org.openjdk.jmh:jmh-core:1.35' |
Sergey Shanshin | 5e8ccad | 2022-06-30 15:43:42 +0300 | [diff] [blame] | 44 | implementation 'com.google.guava:guava:31.1-jre' |
| 45 | implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3' |
| 46 | implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3' |
| 47 | implementation "com.squareup.okio:okio:$okio_version" |
Sebastian Schuberth | ece9fdd | 2022-01-28 16:23:48 +0100 | [diff] [blame] | 48 | implementation project(':kotlinx-serialization-core') |
| 49 | implementation project(':kotlinx-serialization-json') |
Sergey Shanshin | 5e8ccad | 2022-06-30 15:43:42 +0300 | [diff] [blame] | 50 | implementation project(':kotlinx-serialization-json-okio') |
Sebastian Schuberth | ece9fdd | 2022-01-28 16:23:48 +0100 | [diff] [blame] | 51 | implementation project(':kotlinx-serialization-protobuf') |
Vsevolod Tolstopyatov | e593b42 | 2018-06-28 11:23:49 +0300 | [diff] [blame] | 52 | } |