buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 2
        versionName "2.0.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
}

repositories {
    google()
    jcenter()
    mavenCentral()
}

dependencies {
    implementation project(':capacitor-android')

    implementation 'androidx.browser:browser:1.0.0'
    implementation 'net.openid:appauth:0.7.1'
    implementation 'androidx.appcompat:appcompat:1.0.0'

    testImplementation 'junit:junit:4.13'
    // Optional -- Robolectric environment
    // testImplementation 'androidx.test:core:1.2.0'
    // Optional -- Mockito framework
    // testImplementation 'org.mockito:mockito-core:1.10.19'

    androidTestImplementation "commons-io:commons-io:2.6"
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

// ###############
// ### AppAuth ###
// ###############

android.defaultConfig.manifestPlaceholders = [
    'appAuthRedirectScheme': 'com.byteowls.capacitorapp'
]
