apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

group = 'expo.modules.pngme'
version = '1.0.0'

buildscript {
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
  if (expoModulesCorePlugin.exists()) {
    apply from: expoModulesCorePlugin
    applyKotlinExpoModulesCorePlugin()
  }
}

android {
  compileSdkVersion safeExtGet("compileSdkVersion", 34)

  defaultConfig {
    minSdkVersion safeExtGet("minSdkVersion", 21)
    targetSdkVersion safeExtGet("targetSdkVersion", 34)
    versionCode 1
    versionName "1.0.0"
  }
  
  lintOptions {
    abortOnError false
  }
  
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
  
  kotlinOptions {
    jvmTarget = '1.8'
  }
}

repositories {
  mavenCentral()
}

dependencies {
  implementation project(':expo-modules-core')
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
  
  // These will be available from the app's build.gradle via the plugin
  compileOnly 'com.pngme:pngme-sdk:7.0.6'
  
  // Required support libraries
  implementation 'androidx.appcompat:appcompat:1.4.0'
  implementation 'androidx.core:core-ktx:1.7.0'
  implementation 'com.google.android.material:material:1.5.0'
}