Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / android / CHIPTool / app / build.gradle
1 apply plugin: 'com.android.application'
2 apply plugin: 'kotlin-android'
3 apply plugin: 'kotlin-android-extensions'
4
5 android {
6     compileSdkVersion 30
7     buildToolsVersion "30.0.2"
8
9     defaultConfig {
10         applicationId "com.google.chip.chiptool"
11         minSdkVersion 24
12         targetSdkVersion 30
13         versionCode 1
14         versionName "1.0"
15
16         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17
18         // NOTE: This build assumes CHIP was configured and built for armeabi-v7a. Deal with
19         // other archs later when build is sane.
20         //  ndk {abiFilters 'armeabi-v7a'}
21     }
22
23     buildTypes {
24         release {
25             minifyEnabled false
26             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
27         }
28     }
29     compileOptions {
30         sourceCompatibility JavaVersion.VERSION_1_8
31         targetCompatibility JavaVersion.VERSION_1_8
32     }
33
34     configurations.all {
35         resolutionStrategy.eachDependency {DependencyResolveDetails details ->
36             def requested = details.requested
37             if (requested.group == "androidx") {
38                 if (!requested.name.startsWith("multidex")) {
39                     details.useVersion "${targetSdk}.+"
40                 }
41             }
42         }
43     }
44 }
45
46 dependencies {
47     def room_version = "2.2.5"
48
49     implementation "androidx.room:room-runtime:$room_version"
50     annotationProcessor "androidx.room:room-compiler:$room_version"
51
52     implementation fileTree(dir: "libs", include: ["*.jar", "*.so"])
53     implementation 'androidx.appcompat:appcompat:1.1.0'
54     implementation 'androidx.preference:preference:1.1.1'
55     implementation "com.google.android.gms:play-services-vision:20.1.0"
56     implementation 'androidx.fragment:fragment:1.3.0-beta01'
57     implementation "androidx.annotation:annotation:1.1.0"
58     implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
59     implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
60     implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
61     testImplementation 'junit:junit:4.12'
62     androidTestImplementation 'androidx.test.ext:junit:1.1.1'
63     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
64     implementation "androidx.core:core-ktx:1.3.0"
65     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
66     implementation "androidx.work:work-runtime:2.3.3"
67     implementation 'com.google.code.gson:gson:2.8.5'
68 }
69 repositories {
70     mavenCentral()
71 }