summaryrefslogtreecommitdiff
path: root/benchmark/build.gradle
blob: 751ad78ce1967e2565d3ec5cf0f4d7e9e1aed00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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')
}