build.gradle 3.34 KB
Newer Older
vunguyencuong's avatar
vunguyencuong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

if (new File("thingMapping.gradle").exists()) {
    apply from : "thingMapping.gradle"
}

android {
    compileSdkVersion 30
    buildToolsVersion "29.0.3"

    signingConfigs {
        debug {
            storeFile file('../app/key/tuya.jks')
            storePassword '05052002'
            keyAlias 'key_tuya'
            keyPassword '05052002'
        }
    }

    defaultConfig {
        applicationId "com.example.smarthomecontrol"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        Properties properties = new Properties()
        properties.load(project.rootProject.file('local.properties').newDataInputStream())
        manifestPlaceholders = [
                TUYA_SMART_APPKEY: "${properties.getProperty("crvyt9phy3wr7md4jkcv")}",
                TUYA_SMART_SECRET: "${properties.getProperty("qfuh5mp5k5ady4k3khgeywdppjhrgqvv")}",
        ]
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.debug
        ndk {
            abiFilters "armeabi-v7a", "arm64-v8a"
        }
    }
    lintOptions {
        abortOnError false
    }

    packagingOptions {
        pickFirst 'lib/*/libc++_shared.so' // 多个aar存在此so,需要选择第一个
        pickFirst 'lib/*/libgnustl_shared.so'//业务包需要
        pickFirst 'lib/*/liblog.so'
        pickFirst 'lib/*/libopenh264.so'
    }

    buildTypes {
        debug {
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

vunguyencuong's avatar
vunguyencuong committed
73 74 75 76
    buildFeatures{
        viewBinding = true
    }

vunguyencuong's avatar
vunguyencuong committed
77 78 79 80 81 82 83 84 85 86 87 88 89
}

configurations.all {
    exclude group: "com.thingclips.smart" ,module: 'thingsmart-modularCampAnno'
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.aar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0-alpha04'
vunguyencuong's avatar
vunguyencuong committed
90
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
vunguyencuong's avatar
vunguyencuong committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
    implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'com.alibaba:fastjson:1.1.67.android'
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.9'


    implementation project(':base_res')
    implementation project(":home")
    implementation project(":device_config")
    implementation project(":device_management")
    implementation project(":ipc")
    implementation project(":sweeper")
    implementation 'cn.yipianfengye.android:zxing-library:2.2'

}