xref: /aosp_15_r20/external/kotlinx.serialization/formats/hocon/build.gradle (revision 57b5a4a64c534cf7f27ac9427ceab07f3d8ed3d8)
1import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
4/*
5 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
6 */
7
8apply plugin: 'kotlin'
9apply plugin: 'kotlinx-serialization'
10
11compileKotlin {
12    kotlinOptions {
13        allWarningsAsErrors = true
14        jvmTarget = '1.8'
15    }
16}
17
18tasks.withType(KotlinCompile).configureEach {
19    kotlinOptions {
20        if (rootProject.ext.kotlin_lv_override != null) {
21            languageVersion = rootProject.ext.kotlin_lv_override
22            freeCompilerArgs += "-Xsuppress-version-warnings"
23        }
24    }
25}
26
27java {
28    sourceCompatibility = JavaVersion.VERSION_1_8
29    targetCompatibility = JavaVersion.VERSION_1_8
30}
31
32
33dependencies {
34    api project(':kotlinx-serialization-core')
35    api 'org.jetbrains.kotlin:kotlin-stdlib'
36    api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
37
38    api 'com.typesafe:config:1.4.1'
39
40    testImplementation 'org.jetbrains.kotlin:kotlin-test'
41    testImplementation 'junit:junit:4.12'
42}
43
44Java9Modularity.configureJava9ModuleInfo(project)
45