group = "com.atmob.mobile_use_statistics"
version = "1.0"

buildscript {
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath("com.android.tools.build:gradle:7.3.0")
    }
}

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


// 加载 local.properties 文件
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withInputStream { stream ->
        localProperties.load(stream)
    }
}

// 读取变量
def flutterSdk = localProperties.getProperty('flutter.sdk')

apply plugin: "com.android.library"

android {
    namespace = "com.atmob.mobile_use_statistics"

    compileSdk = 35

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

    defaultConfig {
        minSdk = 22
    }

    dependencies {
        //flutter
        compileOnly files("$flutterSdk/bin/cache/artifacts/engine/android-arm/flutter.jar")

        //AndroidX
        compileOnly "androidx.annotation:annotation:1.1.0"
    }

    testOptions {
        unitTests.all {
            testLogging {
                events "passed", "skipped", "failed", "standardOut", "standardError"
                outputs.upToDateWhen { false }
                showStandardStreams = true
            }
        }
    }
}
