buildscript {
    dependencies {
        classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version"
        classpath "com.novoda:gradle-android-command-plugin:$gradle_android_command_plugin_version"
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 29

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 29

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        debug { }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    testImplementation "androidx.test.ext:junit:$androidx_test_ext_junit_version"
    testImplementation "androidx.test:runner:$androidx_test_runner_version"
    testImplementation "androidx.test:core:$androidx_test_core_version"
    testImplementation "androidx.test.espresso:espresso-core:$androidx_test_esspresso_core_version"
    testImplementation "org.mockito:mockito-core:$mockito_core_version"
    testImplementation "org.robolectric:robolectric:$robolectric_version"
}

group = 'com.guardanis'

ext {
    mavProjectName = "sigcap"
    mavLibraryVersion = '2.0.0'

    mavLibraryDescription = 'Easily capture signatures'
    mavPublishToMavenLocal = false
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    android.libraryVariants.all { variant ->
        if (variant.name == 'release') {
            owner.classpath += variant.javaCompileProvider.get().classpath
        }
    }
    exclude '**/R.html', '**/R.*.html', '**/index.html'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    archiveClassifier.set('javadoc')
    from javadoc.destinationDir
}

//apply from: project.rootProject.file('deployments.gradle')