11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4+
5+ ext. versions = [
6+ ' java' : JavaVersion . VERSION_1_8 ,
7+ ' androidGradlePlugin' : ' 4.1.3' ,
8+ ' googleServices' : ' 4.3.4' ,
9+ ' compileSdk' : 31 ,
10+ ' buildTools' : ' 30.0.2' ,
11+ ' minSdk' : 23 ,
12+ ' targetSdk' : 30 ,
13+ ' firebase' : ' 19.0.+' ,
14+ ' voiceAndroid' : ' 6.0.0' ,
15+ ' audioSwitch' : ' 1.1.2' ,
16+ ' androidxLifecycle' : ' 2.2.0' ,
17+ ]
18+
419 repositories {
520 google()
621 jcenter()
722 mavenCentral()
823 }
924 dependencies {
10- classpath ' com.android.tools.build:gradle:4.1.3 '
11- classpath ' com.google.gms:google-services:4.3.4 '
25+ classpath " com.android.tools.build:gradle:${ versions.androidGradlePlugin } "
26+ classpath " com.google.gms:google-services:${ versions.googleServices } "
1227
1328 // NOTE: Do not place your application dependencies here; they belong
1429 // in the individual module build.gradle files
@@ -24,22 +39,16 @@ allprojects {
2439
2540apply plugin : ' com.android.library'
2641
27- def DEFAULT_MIN_SDK_VERSION = 23
28- def DEFAULT_COMPILE_SDK_VERSION = 30
29- def DEFAULT_BUILD_TOOLS_VERSION = " 29.0.3"
30- def DEFAULT_TARGET_SDK_VERSION = 29
31- def DEFAULT_SUPPORT_LIB_VERSION = " 29.0.3"
32-
3342android {
34- compileSdkVersion rootProject. hasProperty(' compileSdkVersion' ) ? rootProject. compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
35- buildToolsVersion rootProject. hasProperty(' buildToolsVersion' ) ? rootProject. buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
43+ compileSdkVersion rootProject. hasProperty(' compileSdkVersion' ) ? rootProject. compileSdkVersion : versions . compileSdk
44+ buildToolsVersion rootProject. hasProperty(' buildToolsVersion' ) ? rootProject. buildToolsVersion : versions . buildTools
3645 compileOptions {
37- sourceCompatibility 1.8
38- targetCompatibility 1.8
46+ sourceCompatibility versions . java
47+ targetCompatibility versions . java
3948 }
4049 defaultConfig {
41- minSdkVersion rootProject. hasProperty(' minSdkVersion' ) ? rootProject. minSdkVersion : DEFAULT_MIN_SDK_VERSION
42- targetSdkVersion rootProject. hasProperty(' targetSdkVersion' ) ? rootProject. targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
50+ minSdkVersion rootProject. hasProperty(' minSdkVersion' ) ? rootProject. minSdkVersion : versions . minSdk
51+ targetSdkVersion rootProject. hasProperty(' targetSdkVersion' ) ? rootProject. targetSdkVersion : versions . targetSdk
4352 versionCode 1
4453 versionName " 1.0"
4554 vectorDrawables. useSupportLibrary = true
@@ -53,14 +62,11 @@ android {
5362}
5463
5564dependencies {
56- def supportLibVersion = rootProject. hasProperty(' supportLibVersion' ) ? rootProject. supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
57-
5865 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
59- implementation ' com.twilio:audioswitch:1.1.2'
60- implementation ' com.twilio:voice-android:5.4.2'
61- implementation " com.android.support:appcompat-v7:$supportLibVersion "
62- implementation ' com.facebook.react:react-native:+'
63- implementation ' com.google.firebase:firebase-messaging:19.0.+'
64- implementation ' androidx.lifecycle:lifecycle-extensions:2.2.0'
65- testImplementation ' junit:junit:4.12'
66+ implementation " com.twilio:audioswitch:${ versions.audioSwitch} "
67+ implementation " com.twilio:voice-android:${ versions.voiceAndroid} "
68+ implementation " com.facebook.react:react-native:+"
69+ implementation " com.google.firebase:firebase-messaging:${ versions.firebase} "
70+ implementation " androidx.lifecycle:lifecycle-extensions:${ versions.androidxLifecycle} "
71+ testImplementation " junit:junit:4.12"
6672}
0 commit comments