apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

react {
    autolinkLibrariesWithApp()
}

android {
    splits {
        abi {
            reset()
            enable true
            universalApk false
            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
        }
    }
  namespace "com.totalplaintextreader"
  compileSdk rootProject.ext.compileSdkVersion
  ndkVersion rootProject.ext.ndkVersion

  defaultConfig {
    applicationId "com.totalplaintextreader"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 27
    versionName "3.1.2"
  }

  signingConfigs {
    release {
        storeFile file(MYAPP_UPLOAD_STORE_FILE)
        storePassword MYAPP_UPLOAD_STORE_PASSWORD
        keyAlias MYAPP_UPLOAD_KEY_ALIAS
        keyPassword MYAPP_UPLOAD_KEY_PASSWORD
    }
  }

  buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        shrinkResources false
    }
  }

  kotlinOptions { jvmTarget = '17' }
}

dependencies {
  // React Native
  implementation("com.facebook.react:react-android")

  if (hermesEnabled.toBoolean()) {
    implementation("com.facebook.react:hermes-android")
  } else {
    implementation("org.webkit:android-jsc:+")
  }

  // AppCompat theme
  implementation("androidx.appcompat:appcompat:1.7.0")

  // Material components
  implementation("com.google.android.material:material:1.12.0")
}
