build.gradle 1.74 KB
Newer Older
Ricki Hirner's avatar
Ricki Hirner committed
1 2

buildscript {
3
    ext.kotlin_version = '1.2.41'
4
    ext.dokka_version = '0.9.16'
Ricki Hirner's avatar
Ricki Hirner committed
5

Ricki Hirner's avatar
Ricki Hirner committed
6 7
    repositories {
        jcenter()
8
        google()
Ricki Hirner's avatar
Ricki Hirner committed
9 10 11
    }

    dependencies {
Ricki Hirner's avatar
Ricki Hirner committed
12
        classpath 'com.android.tools.build:gradle:3.1.3'
Ricki Hirner's avatar
Ricki Hirner committed
13
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Ricki Hirner's avatar
Ricki Hirner committed
14
        classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
Ricki Hirner's avatar
Ricki Hirner committed
15 16 17
    }
}

Ricki Hirner's avatar
Ricki Hirner committed
18 19
repositories {
    jcenter()
20
    google()
Ricki Hirner's avatar
Ricki Hirner committed
21 22
}

Ricki Hirner's avatar
Ricki Hirner committed
23
apply plugin: 'com.android.library'
Ricki Hirner's avatar
Ricki Hirner committed
24
apply plugin: 'kotlin-android'
Ricki Hirner's avatar
Ricki Hirner committed
25
apply plugin: 'org.jetbrains.dokka-android'
Ricki Hirner's avatar
Ricki Hirner committed
26

27 28 29 30
ext {
    okhttp_version = "3.10.0"
}

Ricki Hirner's avatar
Ricki Hirner committed
31
android {
Ricki Hirner's avatar
Ricki Hirner committed
32
    compileSdkVersion 27
33
    buildToolsVersion '27.0.3'
Ricki Hirner's avatar
Ricki Hirner committed
34 35

    defaultConfig {
36 37
        //noinspection MinSdkTooLow
        minSdkVersion 9        // Android 2.3
Ricki Hirner's avatar
Ricki Hirner committed
38
        targetSdkVersion 27
39 40

        buildConfigField "String", "version_okhttp", "\"$okhttp_version\""
Ricki Hirner's avatar
Ricki Hirner committed
41 42 43 44 45 46 47
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
Ricki Hirner's avatar
Ricki Hirner committed
48 49 50 51

    lintOptions {
        disable 'AllowBackup'
    }
Ricki Hirner's avatar
Ricki Hirner committed
52 53 54 55

    defaultConfig {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
Ricki Hirner's avatar
Ricki Hirner committed
56 57 58
}

dependencies {
59
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Ricki Hirner's avatar
Ricki Hirner committed
60

Ricki Hirner's avatar
Ricki Hirner committed
61
    api "com.squareup.okhttp3:okhttp:$okhttp_version"
62

63 64
    androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
Ricki Hirner's avatar
Ricki Hirner committed
65

66 67 68
    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
69
    testImplementation 'org.ogce:xpp3:1.1.6'    // XmlPullParser
Ricki Hirner's avatar
Ricki Hirner committed
70
}