apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka-android'

android {
    compileSdkVersion project.compileSdkVersion

    defaultConfig {
        minSdkVersion project.minSdkVersion
        targetSdkVersion project.targetSdkVersion
        versionCode project.versionCode
        versionName project.versionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    sourceSets {
        main {
            manifest.srcFile 'src/main/AndroidManifest.xml'
            java.srcDirs = ['src/main/java']
            res.srcDirs = ['src/main/res']
        }
    }

    compileOptions {
        sourceCompatibility project.targetJavaVersion
        targetCompatibility project.targetJavaVersion
    }
    kotlinOptions {
        jvmTarget = project.targetJavaVersion.toString()
    }
}

task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
    outputFormat = 'javadoc'
    outputDirectory = "$buildDir/documentation"
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$project.kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.4.0'
    implementation "androidx.activity:activity-ktx:1.4.0"
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

//apply from: '../publish/mavencentral.gradle'
