group = "vn.hunghd.flutterdownloader"
version = "1.0-SNAPSHOT"

buildscript {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }

    dependencies {
        classpath "com.android.tools.build:gradle:8.8.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0"
        classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.2"
    }
}

repositories {
    google()
    mavenCentral()
}

apply plugin: "com.android.library"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "org.jlleitschuh.gradle.ktlint"

android {
    namespace = "vn.hunghd.flutterdownloader"
    compileSdk = 35

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }

    kotlinOptions {
        jvmTarget = "11"
        // allWarningsAsErrors = true // TODO(bartekpacia): Re-enable
    }

    sourceSets {
        main.java.srcDirs += "src/main/kotlin"
        test.java.srcDirs += "src/test/kotlin"
    }

    defaultConfig {
        minSdk = 21
        targetSdk = 35
    }
}

dependencies {
    compileOnly "androidx.annotation:annotation:1.6.0"
    implementation "androidx.core:core-ktx:1.13.1"
    implementation "androidx.work:work-runtime:2.9.0"
}
