blob: bdbd03ff48d822e9fab188d24cf5e3691c01f557 [file] [log] [blame]
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
android {
compileSdkVersion 31
defaultConfig {
applicationId "com.google.chip.chiptool"
minSdkVersion 24
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
if (matterSdkSourceBuild.toBoolean() && !matterBuildSrcDir.isEmpty()) {
ndk {
abiFilters = []
abiFilters.addAll(matterSourceBuildAbiFilters.split(';').collect { it as String })
}
}
externalNativeBuild {
cmake {
targets "default"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/main.kotlin_module'
}
buildFeatures {
viewBinding = true
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "androidx") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${targetSdk}.+"
}
}
}
}
if (matterSdkSourceBuild.toBoolean() && !matterBuildSrcDir.isEmpty()) {
externalNativeBuild {
cmake {
path file(matterBuildSrcDir + '/CMakeLists.txt')
version '3.10.2'
}
}
} else {
sourceSets {
main {
jniLibs.srcDirs = ['libs/jniLibs']
}
}
}
}
dependencies {
implementation 'com.android.volley:volley:1.2.1'
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
if (matterSdkSourceBuild.toBoolean() && !matterBuildSrcDir.isEmpty()) {
implementation project(':chip-library')
} else {
// local in-source-tree copy of the dependencies. Useful for IDE compilation
implementation fileTree(dir: "libs", include: ["*.jar", "*.so"])
}
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.fragment:fragment:1.3.0-beta01'
implementation "androidx.annotation:annotation:1.1.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.core:core-ktx:1.3.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.work:work-runtime:2.7.1"
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.google.mlkit:barcode-scanning:17.0.2'
def camerax_version = "1.1.0"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-view:${camerax_version}"
implementation 'com.google.protobuf:protobuf-java:3.22.0'
}
repositories {
mavenCentral()
}