build.gradle.kts 1.05 KB
Newer Older
1 2

object Libs {
3 4 5 6
    // okhttp HTTP library
    // We'll use 3.12 for now, but this branch won't receive feature updates anymore. Security
    // updates are limited to Dec 2020, so we'll have to update to 3.13 until then. On Android,
    // using 3.13 will raise the required SDK level to Android 5.
7
    const val okhttpVersion = "3.12.1"
8 9

    // XmlPullParser library
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    const val xpp3Version = "1.1.6"
}

plugins {
    kotlin("jvm") version "1.3.11"

    id("com.github.kukuhyoniatmoko.buildconfigkotlin") version "1.0.5"
    id("org.jetbrains.dokka") version "0.9.17"
}

repositories {
    jcenter()
}

dependencies {
    implementation(kotlin("stdlib"))

27
    api("com.squareup.okio:okio:2.+")       // use Kotlin-friendly okhttp 2.x
28
    api("com.squareup.okhttp3:okhttp:${Libs.okhttpVersion}")
29 30

    implementation("org.ogce:xpp3:${Libs.xpp3Version}")
31 32 33 34 35 36 37 38 39

    testImplementation("com.squareup.okhttp3:mockwebserver:${Libs.okhttpVersion}")
}

buildConfigKotlin {
    sourceSet("main", Action {
        buildConfig(name = "okhttpVersion", value = Libs.okhttpVersion)
    })
}