apply plugin: 'com.android.application'

android {
    compileSdkVersion 31

    defaultConfig {
        applicationId "org.transdroid.search"
        minSdkVersion 14
        targetSdkVersion 31
        versionCode 38
        versionName "4.3"
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

    sourceSets {
        main.java.srcDirs += 'src/external/java'
    }

    signingConfigs {
        releaseConfig {
            def propsFile = rootProject.file('keystore.properties')
            def configName = 'releaseConfig'

            if (propsFile.exists() && android.signingConfigs.hasProperty(configName)) {
                def props = new Properties()
                props.load(new FileInputStream(propsFile))
                keyAlias = props['keyAlias']
                storeFile = file(props['storeFile'])
                keyPassword = props['keyPassword']
                storePassword = props['storePassword']
            }
        }
    }

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

    compileOptions {
        encoding = 'UTF-8'
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }


    useLibrary 'org.apache.http.legacy'
    lint {
        disable 'GoogleAppIndexingWarning'
    }
}

dependencies {
    implementation 'com.android.volley:volley:1.2.1'
    implementation 'org.jsoup:jsoup:1.13.1'

    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'com.google.truth:truth:1.0.1'
}
