apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    namespace 'com.anggrayudi.hiddenapi.sample'

    defaultConfig {
        multiDexEnabled true
    }

    signingConfigs {
        debug {
            keyAlias 'androiddebugkey'
            keyPassword 'android'
            storePassword 'android'
            storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")
        }
    }

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

    lintOptions {
        abortOnError false
    }

    buildFeatures {
        viewBinding = true
    }

    flavorDimensions = ["librarySource"]
    productFlavors {
        local {
            dimension "librarySource"
            getIsDefault().set(true)
        }
        maven {
            dimension "librarySource"
            configurations.all {
                // Check for updates every build
                resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
            }
        }
    }
}

dependencies {
    // Testing
    testImplementation 'junit:junit:4.13.2'

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.appcompat:appcompat:1.7.0'
    implementation "androidx.core:core-ktx:1.15.0"
    implementation 'com.jakewharton.timber:timber:5.0.1'

    implementation project(':resources-helper')
    // If you want to modify this library's source code, set build variant to 'local'.
//    localImplementation project(':resources-helper')
//    mavenImplementation("com.anggrayudi:android-hidden-api:$VERSION_NAME") { changing = true }
}