plugins {
    id("com.android.library")
    id("com.facebook.react") // This is required for New Architecture & Codegen
}

android {
    namespace "com.reactlibrary"
    compileSdk = 36

    defaultConfig {
        minSdk = 24
        targetSdk = 36
        versionCode = 1
        versionName = "1.0"
    }

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

    testOptions {
        unitTests {
            returnDefaultValues = true
            includeAndroidResources = true
        }
    }
}

dependencies {
    implementation "com.facebook.react:react-android:0.84.1"
    implementation 'com.google.code.gson:gson:2.13.2'
    implementation 'androidx.appcompat:appcompat:1.7.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0'
    implementation platform('com.google.firebase:firebase-bom:34.11.0')
    implementation('com.google.firebase:firebase-messaging')
    api('com.google.android.gms:play-services-location:21.3.0')
    implementation 'androidx.media:media:1.7.1'
    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
    implementation("com.mapp.sdk:engage-android:7.0.2")
    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.mockito:mockito-core:5.14.2'
    testImplementation 'org.mockito:mockito-inline:5.2.0'
    testImplementation 'org.json:json:20240303'
    testImplementation 'org.robolectric:robolectric:4.13'
}

react {
    jsRootDir = rootDir
    libraryName = "RNMappPlugin"
    codegenJavaPackageName = "com.reactlibrary"
}
