apply plugin: 'com.android.library'
apply plugin: "com.vanniktech.maven.publish"
apply plugin: 'dev.zacsweers.ticktock'

android {
    compileSdkVersion version_android_compile_sdk

    defaultConfig {
        minSdkVersion version_android_minimum_sdk

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility version_java
        targetCompatibility version_java
    }

    lintOptions {
        warningsAsErrors true
        showAll true
        checkReleaseBuilds false
        textReport true
        textOutput 'stdout'
    }
}

String version = project.hasProperty("tzdbVersion") ? project.property("tzdbVersion") : ""

tickTock {
    tzVersion.set(version)
    codeOutputDir.set(layout.projectDirectory.dir("src/main/java"))
    tzOutputDir.set(layout.projectDirectory.dir("src/main/assets"))
    packageName.set("com.gabrielittner.threetenbp")
}

dependencies {
    tickTockCompiler "dev.zacsweers.ticktock:ticktock-compiler:0.1.1"
    implementation deps.support_annotations
    implementation deps.threetenbp_notzdb

    androidTestImplementation deps.junit
    androidTestImplementation deps.truth
    androidTestImplementation deps.androidTestRunner
}
