|
| 1 | +/* |
| 2 | + * Copyright (c) 2018-2020 DJI |
| 3 | + * |
| 4 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | + * of this software and associated documentation files (the "Software"), to deal |
| 6 | + * in the Software without restriction, including without limitation the rights |
| 7 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | + * copies of the Software, and to permit persons to whom the Software is |
| 9 | + * furnished to do so, subject to the following conditions: |
| 10 | + * |
| 11 | + * The above copyright notice and this permission notice shall be included in all |
| 12 | + * copies or substantial portions of the Software. |
| 13 | + * |
| 14 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 | + * SOFTWARE. |
| 21 | + */ |
| 22 | + |
| 23 | +apply plugin: 'com.android.library' |
| 24 | +apply plugin: 'kotlin-android' |
| 25 | + |
| 26 | +android { |
| 27 | + lintOptions { |
| 28 | + abortOnError = false |
| 29 | + } |
| 30 | + compileSdkVersion 29 |
| 31 | + buildToolsVersion "29.0.1" |
| 32 | + publishNonDefault true |
| 33 | + resourcePrefix "uxsdk_" |
| 34 | + defaultConfig { |
| 35 | + minSdkVersion 19 |
| 36 | + targetSdkVersion 29 |
| 37 | + versionCode 1 |
| 38 | + versionName "4.5" |
| 39 | + vectorDrawables.useSupportLibrary = true |
| 40 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 41 | + } |
| 42 | + buildTypes { |
| 43 | + release { |
| 44 | + minifyEnabled false |
| 45 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 46 | + } |
| 47 | + mock { |
| 48 | + debuggable true |
| 49 | + } |
| 50 | + bridge { |
| 51 | + debuggable true |
| 52 | + } |
| 53 | + } |
| 54 | + compileOptions { |
| 55 | + targetCompatibility 1.8 |
| 56 | + sourceCompatibility 1.8 |
| 57 | + } |
| 58 | + testOptions { |
| 59 | + unitTests.returnDefaultValues = true |
| 60 | + } |
| 61 | + testBuildType "debug" |
| 62 | + aaptOptions { |
| 63 | + // PNG optimization |
| 64 | + cruncherEnabled true |
| 65 | + } |
| 66 | +} |
| 67 | + |
| 68 | +dependencies { |
| 69 | + api project(path: ':android-uxsdk-beta-core') |
| 70 | + |
| 71 | + implementation ('com.dji:dji-sdk:4.12', { |
| 72 | + /** |
| 73 | + * Comment the "library-anti-distortion" if your app needs Anti Distortion for Mavic 2 Pro |
| 74 | + * and Mavic 2 Zoom. |
| 75 | + * Comment the "fly-safe-database" if you don't need a smaller apk for release. When |
| 76 | + * uncommented, we will download it when DJISDKManager.getInstance().registerApp |
| 77 | + * is called, and it won't register success without fly-safe-database. |
| 78 | + * Both will greatly reduce the size of the APK. |
| 79 | + */ |
| 80 | + exclude module: 'library-anti-distortion' |
| 81 | + exclude module: 'fly-safe-database' |
| 82 | + }) |
| 83 | + compileOnly ('com.dji:dji-sdk-provided:4.12') |
| 84 | + |
| 85 | + implementation 'androidx.multidex:multidex:2.0.0' |
| 86 | + implementation 'androidx.appcompat:appcompat:1.0.0' |
| 87 | + implementation 'androidx.annotation:annotation:1.0.0' |
| 88 | + implementation 'androidx.legacy:legacy-support-v4:1.0.0' |
| 89 | + implementation 'androidx.constraintlayout:constraintlayout:1.1.2' |
| 90 | + implementation 'androidx.media:media:1.0.0' |
| 91 | + |
| 92 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| 93 | +} |
| 94 | +repositories { |
| 95 | + mavenCentral() |
| 96 | +} |
0 commit comments