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

group = 'expo.modules.tiktokopensdk'
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 33
  defaultConfig {
    minSdkVersion 21
    targetSdkVersion 33
  }
  lintOptions {
    abortOnError false
  }
  publishing {
    singleVariant("release") {
      withSourcesJar()
    }
  }
}

dependencies {
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
  implementation 'com.bytedance.ies.tiktok:tiktok-open-sdk:3.7.1'
}

afterEvaluate {
  publishing {
    publications {
      release(MavenPublication) {
        from components.release
      }
    }
  }
}
