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

allprojects {
    repositories {
        mavenLocal()
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

buildscript {

    repositories {
        mavenLocal()
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.1'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0'
    }
}

android {
    compileSdk 33

    defaultConfig {
        applicationId "com.alibaba.gaiax.demo"
        minSdk 21
        targetSdk 33
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

    sourceSets {
        main {
            java.srcDirs = ['src/main/kotlin', 'src/main/java']
            jniLibs.srcDir 'src/main/jniLibs'
        }

        androidTest {
            java.srcDirs = ['src/androidTest/java']
            res.srcDirs = ['src/androidTest/res']
            jniLibs.srcDir 'src/main/jniLibs'
        }
    }

    buildTypes {
        debug {
            debuggable true
            ndk {
                abiFilters 'arm64-v8a', 'armeabi-v7a', "x86", "x86_64"
            }
        }
        release {
            debuggable false
            ndk {
                abiFilters 'arm64-v8a', 'armeabi-v7a'
            }
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    namespace 'com.alibaba.gaiax.demo'


    lintOptions {
        abortOnError false
    }
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation project(path: ':GaiaXAndroidClientToStudio')
    implementation project(path: ':GaiaXAndroidAdapter')
    implementation project(path: ':GaiaXAndroid')
    implementation project(path: ':GXAnalyzeAndroid')
    implementation project(path: ':GaiaXAndroidJS')
    implementation project(path: ':GaiaXAndroidQuickJS')
    implementation project(path: ':GaiaXAndroidJSProxy')

    implementation("com.github.princekin-f:EasyFloat:2.0.4")

    implementation 'com.airbnb.android:lottie:4.1.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.core:core-ktx:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'com.alibaba:fastjson:1.2.79'
    implementation 'com.github.jenly1314:zxing-lite:2.1.1'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation 'androidx.test:core:1.5.0'
}
