apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 28
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

buildscript {
    ext.moshi_min_version = '1.8.0'
    {{#each dependencies}}
    ext.{{{this.gradle.name}}}_min_version = '{{{this.gradle.minVersion}}}'
    {{/each}}
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation "com.squareup.moshi:moshi:$moshi_min_version+"
    // Note: this adapter uses a bulky and slow reflection implementation.
    // TODO: replace this with codegen-based solution.
    implementation "com.squareup.moshi:moshi-kotlin:$moshi_min_version+"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
    implementation 'com.jaredrummler:truetypeparser-light:1.0.0'

    {{#each dependencies}}
    implementation "{{{this.gradle.source}}}:${{{this.gradle.name}}}_min_version+"
    {{/each}}
}

repositories {
    mavenCentral()
}
