Skip to content

Commit

Permalink
feat: upgrade to native 1.4.+
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Aug 25, 2021
1 parent 323a255 commit 39dda38
Show file tree
Hide file tree
Showing 10 changed files with 969 additions and 962 deletions.
32 changes: 22 additions & 10 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
group 'io.agora.agora_rtm'

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

buildscript {
def kotlin_version = rootProject.ext.has('kotlin_version') ? rootProject.ext.get('kotlin_version') : '1.3.72'

repositories {
mavenCentral()
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

rootProject.allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}

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

android {
compileSdkVersion 28
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)

consumerProguardFiles 'consumer-rules.pro'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'io.agora.rtm:rtm-sdk:1.2.2'
api 'com.github.agorabuilder:rtm-sdk:1.4.7'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', '1.3.72')}"
}
5 changes: 5 additions & 0 deletions android/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-keepattributes *Annotation*
-keep class kotlin.** { *; }
-keep class org.jetbrains.** { *; }

-keep class io.agora.**{*;}
Loading

0 comments on commit 39dda38

Please sign in to comment.