blob: 751ad78ce1967e2565d3ec5cf0f4d7e9e1aed00c [file] [log] [blame]
Margarita Bobova39918cb2023-06-23 15:03:38 +02001import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
Leonid Startsev21dea852021-05-18 18:36:19 +03003/*
4 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
5 */
6
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +03007apply plugin: 'java'
8apply plugin: 'kotlin'
9apply plugin: 'kotlinx-serialization'
10apply plugin: 'idea'
Sebastian Schuberthece9fdd2022-01-28 16:23:48 +010011apply plugin: 'com.github.johnrengelman.shadow'
Vsevolod Tolstopyatov93a06df2022-06-24 16:36:32 +020012apply plugin: 'me.champeau.jmh'
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +030013
14sourceCompatibility = 1.8
15targetCompatibility = 1.8
Vsevolod Tolstopyatova7cee0b2022-10-19 13:15:00 +030016jmh.jmhVersion = "1.35"
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +030017
Sergey Shanshin5e8ccad2022-06-30 15:43:42 +030018processJmhResources {
19 doFirst {
20 duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
21 }
22}
23
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +030024jmhJar {
Sergey Shanshin5e8ccad2022-06-30 15:43:42 +030025 archiveBaseName.set('benchmarks')
26 archiveVersion.set('')
27 destinationDirectory = file("$rootDir")
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +030028}
29
Margarita Bobova39918cb2023-06-23 15:03:38 +020030// to include benchmark-module jmh source set compilation during build to verify that it is also compiled succesfully
31assemble.dependsOn jmhClasses
32
33tasks.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 Tolstopyatove593b422018-06-28 11:23:49 +030042dependencies {
Vsevolod Tolstopyatova7cee0b2022-10-19 13:15:00 +030043 implementation 'org.openjdk.jmh:jmh-core:1.35'
Sergey Shanshin5e8ccad2022-06-30 15:43:42 +030044 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 Schuberthece9fdd2022-01-28 16:23:48 +010048 implementation project(':kotlinx-serialization-core')
49 implementation project(':kotlinx-serialization-json')
Sergey Shanshin5e8ccad2022-06-30 15:43:42 +030050 implementation project(':kotlinx-serialization-json-okio')
Sebastian Schuberthece9fdd2022-01-28 16:23:48 +010051 implementation project(':kotlinx-serialization-protobuf')
Vsevolod Tolstopyatove593b422018-06-28 11:23:49 +030052}