1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
2
3
3
buildscript {
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
+
4
19
repositories {
5
20
google()
6
21
jcenter()
7
22
mavenCentral()
8
23
}
9
24
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 } "
12
27
13
28
// NOTE: Do not place your application dependencies here; they belong
14
29
// in the individual module build.gradle files
@@ -24,22 +39,16 @@ allprojects {
24
39
25
40
apply plugin : ' com.android.library'
26
41
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
-
33
42
android {
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
36
45
compileOptions {
37
- sourceCompatibility 1.8
38
- targetCompatibility 1.8
46
+ sourceCompatibility versions . java
47
+ targetCompatibility versions . java
39
48
}
40
49
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
43
52
versionCode 1
44
53
versionName " 1.0"
45
54
vectorDrawables. useSupportLibrary = true
@@ -53,14 +62,11 @@ android {
53
62
}
54
63
55
64
dependencies {
56
- def supportLibVersion = rootProject. hasProperty(' supportLibVersion' ) ? rootProject. supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
57
-
58
65
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"
66
72
}
0 commit comments