plugins {
  id 'com.android.application'
}

android {
  namespace = "com.admenri.urge"
  compileSdkVersion 35
  defaultConfig {
    minSdkVersion 21
    targetSdkVersion 35
    versionCode 19
    versionName "20251008"
    externalNativeBuild {
      ndkBuild {
        arguments "APP_PLATFORM=android-21"
        // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        abiFilters 'arm64-v8a', 'x86_64'
      }
      cmake {
        arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static"
        // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        abiFilters 'arm64-v8a', 'x86_64'
      }
    }
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
  applicationVariants.all { variant ->
    tasks["merge${variant.name.capitalize()}Assets"]
        .dependsOn("externalNativeBuild${variant.name.capitalize()}")
  }
  if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
    sourceSets.main {
      jniLibs.srcDir 'libs'
    }
    externalNativeBuild {
      cmake {
        path 'jni/CMakeLists.txt'
      }
    }

  }
  lint {
    abortOnError = false
  }
}

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