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


buildscript {
    ext.kotlin_version = '1.7.20'
    repositories {

        maven{url 'https://maven.aliyun.com/nexus/content/groups/public/'}
        jcenter()
        google()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        // TODO: For Dev
        // classpath 'com.android.tools.build:gradle:4.1.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // TODO: For Development
        // classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
    }
}


android {
    compileSdkVersion 33

    defaultConfig {
      minSdkVersion 16
      targetSdkVersion 33
      versionCode 1
      versionName "1.0"

      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

      ndk {
        abiFilters "armeabi-v7a","arm64-v8a"
      }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

}

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

    implementation 'com.alibaba:fastjson:1.1.67.android'

    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.6.0'

    implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0'

    implementation 'com.tuya.smart:tuyasmart:3.32.5'

    implementation 'com.tuya.smart:tuyasmart-ipcsdk:3.34.5'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    implementation 'com.facebook.react:react-native:+'

    implementation 'de.greenrobot:eventbus:2.4.0'

    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

    implementation 'io.reactivex.rxjava2:rxjava:2.1.7'

    implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'

    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
}
repositories {
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$projectDir/../node_modules/react-native/android"
    }
    mavenCentral()
    google()
    maven {
      url "https://maven-other.tuya.com/repository/maven-releases/"
    }
}
