buildscript {
  dependencies {
    classpath "com.google.devtools.ksp:symbol-processing-gradle-plugin:${rootProject["kspVersion"]}"
  }
}

plugins {
  id 'com.android.library'
  id 'kotlin-kapt'
  id 'expo-module-gradle-plugin'
}

apply plugin: 'com.google.devtools.ksp'

group = 'expo.modules.image'
version = '57.0.5'

android {
  namespace "expo.modules.image"
  defaultConfig {
    versionCode 1
    versionName "57.0.5"
    consumerProguardFiles("proguard-rules.pro")

    buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
  }

  sourceSets {
    main {
      java {
        if (expoModule.safeExtGet("excludeAppGlideModule", false)) {
          exclude("**/ExpoImageAppGlideModule.kt")
        }
      }
    }
  }
}

dependencies {
  def GLIDE_VERSION = "5.0.5"

  implementation 'com.facebook.react:react-android'

  api "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
  ksp "com.github.bumptech.glide:ksp:${GLIDE_VERSION}"
  api 'com.caverock:androidsvg-aar:1.4'

  implementation "com.github.penfeizhou.android.animation:glide-plugin:3.0.5"
  implementation "com.github.bumptech.glide:avif-integration:${GLIDE_VERSION}"

  api "com.github.bumptech.glide:okhttp3-integration:${GLIDE_VERSION}"
  api "com.squareup.okhttp3:okhttp:${expoModule.safeExtGet("okHttpVersion", '4.9.2')}"

  implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
  implementation "jp.wasabeef:glide-transformations:4.3.0"

  testImplementation 'junit:junit:4.13.2'
  testImplementation 'org.robolectric:robolectric:4.16'
}
