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

android {
    compileSdk 34
    defaultConfig {
        applicationId 'com.fr3ts0n.ecu.gui.androbd'
        minSdkVersion 17
        // SDK 25 to allow background service mechanism for plugins
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 25
        versionCode 20616
        versionName 'V2.6.16'

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        lintOptions {
            // Override lint error on targetSdkVersion
            abortOnError false
        }

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_17
            targetCompatibility JavaVersion.VERSION_17
        }

        kotlinOptions {
            jvmTarget = "17" // Ensure consistency with JavaVersion.VERSION_17
        }
    }

    applicationVariants.configureEach { variant ->
        variant.resValue "string", "app_version", variant.versionName
    }

    buildTypes {
        release {
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    productFlavors {
    }
    lint {
        abortOnError false
    }
    namespace 'com.fr3ts0n.ecu.gui.androbd'
}

dependencies {
    implementation project(':plugin')
    implementation project(':library')
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.github.mik3y:usb-serial-for-android:3.9.0'
    implementation 'com.github.anastr:speedviewlib:1.6.1'
    implementation 'androidx.core:core-ktx:1.12.0'
}
