
plugins {
    id 'com.android.application'
    id 'com.chaquo.python'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId 'com.acmo0.youtubedownloader'
        minSdk 26
        targetSdk 31
        versionCode 1
        versionName "1.3.1"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        sourceSets {
            main {
                python {
                    srcDirs = ["src/main/python"]
                }
            }
        }
        python {
            buildPython "/usr/bin/python3"
            buildPython "python3"

            pip{
                options "--upgrade","--ignore-installed","--force-reinstall"
                install "yt-dlp"
                install "git+https://github.com/pytube/pytube"
            }
        }
        ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}


dependencies {

    implementation "androidx.core:core:1.6.0"
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.gms:play-services-basement:17.6.0'
    def work_version = "2.5.0"

    implementation "androidx.work:work-runtime:$work_version"
    implementation "androidx.work:work-runtime-ktx:$work_version"
    implementation "androidx.work:work-rxjava2:$work_version"
    implementation "androidx.work:work-gcm:$work_version"
    androidTestImplementation "androidx.work:work-testing:$work_version"
    implementation "androidx.work:work-multiprocess:$work_version"

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.writingminds:FFmpegAndroid:0.3.2'
}

