buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}

apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: "kotlin-kapt"
apply plugin: 'kotlinx-serialization'

android {
    compileSdkVersion 32
    buildToolsVersion '33.0.0'
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 32
        versionCode 19
        versionName "1.19"
        applicationId "org.bisw.nxbookmarks"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }


    flavorDimensions "default"
    buildTypes {
        release {
            // Do not minify: https://github.com/nextcloud/Android-SingleSignOn/issues/488
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        owncloud {
            // Do not minify: https://github.com/nextcloud/Android-SingleSignOn/issues/488
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            applicationIdSuffix ".owncloud"
        }
    }
    productFlavors {
        fdroid {
            applicationId "org.schabi.nxbookmarks"
        }
        amazon{
            applicationId "org.bisw.nxbookmarks"
        }
    }


    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
        useIR = true
    }
    buildFeatures {
        viewBinding true
        dataBinding true
    }
    lint {
        disable 'MissingTranslation'
    }
}

dependencies {
    //implementation 'com.github.desperateCoder:Android-SingleSignOn:273-multiple-params-for-key-SNAPSHOT'
    implementation "com.github.nextcloud:Android-SingleSignOn:0.6.0"
    androidTestImplementation('androidx.test.espresso:espresso-core:3.5.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    testImplementation 'junit:junit:4.13.2'
    implementation 'org.eclipse.birt.runtime.3_7_1:org.apache.commons.codec:1.3.0'
    implementation 'org.jsoup:jsoup:1.15.3'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}
