apply plugin: 'com.android.application'

Object sdkVersion = 29
android {
    compileSdk rootProject.ext.compileSdkVersion
    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion sdkVersion
        versionCode 3
        versionName versionCode + ".0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        optimized {
            initWith debug
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
                    'proguard-rules.pro'
        }
    }

    productFlavors {
        aidlbridge {
            applicationId 'dev.dworks.apps.alauncher.companion'
            flavorDimensions 'default'
        }

        pixelbridge {
            applicationId 'com.google.android.apps.nexuslauncher'
            flavorDimensions 'default'
        }
    }

    sourceSets {
        pixelbridge {
            aidl.srcDirs = ['src/pixel/aidl']
            java.srcDirs = ['src/pixel/java']
            res.srcDirs = ['src/pixel/res']
            manifest.srcFile 'src/pixel/AndroidManifest.xml'
        }
    }
    namespace 'dev.dworks.apps.alauncher.companion'
    buildFeatures {
        aidl true
    }
}

dependencies {
    implementation 'com.squareup.retrofit2:retrofit:3.0.0'
    implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
}
