group 'dev.fluttercommunity.workmanager'
version '1.0-SNAPSHOT'

rootProject.allprojects {
    repositories {
        mavenCentral()
        google()
    }
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    // Conditional for compatibility with AGP <4.2.
    if (project.android.hasProperty("namespace")) {
        namespace 'dev.fluttercommunity.workmanager'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
        test.java.srcDirs += 'src/test/kotlin'
    }
    defaultConfig {
        compileSdk 35
        minSdkVersion 19
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
            kotlinOptions.jvmTarget = "1.8"
        }
    }

}

dependencies {
    def work_version = "2.10.2"
    implementation "androidx.work:work-runtime:$work_version"
    implementation "androidx.concurrent:concurrent-futures:1.1.0"

    testImplementation 'junit:junit:4.13.2'
    testImplementation "org.jetbrains.kotlin:kotlin-test"
    testImplementation "org.mockito:mockito-core:4.11.0"
    testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
}
