apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' // Keep this if you are using Kotlin in your project

android {
    namespace "com.example.sms_call_sync"
    compileSdkVersion 34 // Ensure this is a recent API level, e.g., 34
    buildToolsVersion "30.0.3" // You might want to update this to a newer version if available for your SDK

    defaultConfig {
        applicationId "com.example.sms_call_sync"
        minSdkVersion 24
        targetSdkVersion 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
        }
    }

    // UPDATED: Java compatibility to Java 11
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11 // Changed from VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_11 // Changed from VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "11" // Changed from "1.8" to match Java 11
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.google.android.material:material:1.11.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"

    // OkHttp for network requests
    implementation 'com.squareup.okhttp3:okhttp:4.12.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'

    // Gson for JSON parsing
    implementation 'com.google.code.gson:gson:2.10.1'

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