173 lines
6.5 KiB
Groovy
173 lines
6.5 KiB
Groovy
/*
|
|
* Copyright (c) 2018-2020 DJI
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*
|
|
*/
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
lintOptions {
|
|
abortOnError = false
|
|
}
|
|
compileSdkVersion 31
|
|
buildToolsVersion "30.0.3"
|
|
useLibrary 'org.apache.http.legacy'
|
|
defaultConfig {
|
|
applicationId "com.dji.ux.beta.sample"
|
|
minSdkVersion 23
|
|
targetSdkVersion 31
|
|
multiDexEnabled true
|
|
vectorDrawables.useSupportLibrary = true
|
|
ndk {
|
|
// On x86 devices that run Android API 23 or above, if the application is targeted with API 23 or
|
|
// above, FFmpeg lib might lead to runtime crashes or warnings.
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
/*
|
|
dexOptions {
|
|
javaMaxHeapSize "3g"
|
|
}
|
|
*/
|
|
lintOptions{
|
|
abortOnError false
|
|
}
|
|
packagingOptions{
|
|
doNotStrip "*/*/libdjivideo.so"
|
|
doNotStrip "*/*/libSDKRelativeJNI.so"
|
|
doNotStrip "*/*/libFlyForbid.so"
|
|
doNotStrip "*/*/libduml_vision_bokeh.so"
|
|
doNotStrip "*/*/libyuv2.so"
|
|
doNotStrip "*/*/libGroudStation.so"
|
|
doNotStrip "*/*/libFRCorkscrew.so"
|
|
doNotStrip "*/*/libUpgradeVerify.so"
|
|
doNotStrip "*/*/libFR.so"
|
|
doNotStrip "*/*/libDJIFlySafeCore.so"
|
|
doNotStrip "*/*/libdjifs_jni.so"
|
|
doNotStrip "*/*/libsfjni.so"
|
|
doNotStrip "*/*/libDJICommonJNI.so"
|
|
doNotStrip "*/*/libDJICSDKCommon.so"
|
|
doNotStrip "*/*/libDJIUpgradeCore.so"
|
|
doNotStrip "*/*/libDJIUpgradeJNI.so"
|
|
doNotStrip "*/*/libDJIWaypointV2Core.so"
|
|
doNotStrip "*/*/libDJIMOP.so"
|
|
doNotStrip "*/*/libDJISDKLOGJNI.so"
|
|
|
|
pickFirst 'lib/*/libstlport_shared.so'
|
|
pickFirst 'lib/*/libRoadLineRebuildAPI.so'
|
|
pickFirst 'lib/*/libGNaviUtils.so'
|
|
pickFirst 'lib/*/libGNaviMapex.so'
|
|
pickFirst 'lib/*/libGNaviData.so'
|
|
pickFirst 'lib/*/libGNaviMap.so'
|
|
pickFirst 'lib/*/libGNaviSearch.so'
|
|
exclude 'META-INF/proguard/okhttp3.pro'
|
|
exclude 'META-INF/rxjava.properties'
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation ('com.dji:dji-sdk:4.16.1', {
|
|
/**
|
|
* Comment the "library-anti-distortion" if your app needs Anti Distortion for Mavic 2 Pro
|
|
* com.dji:dji-sdk:4.16
|
|
* and Mavic 2 Zoom.
|
|
* Comment the "fly-safe-database" if you don't need a smaller apk for release. When
|
|
* uncommented, we will download it when DJISDKManager.getInstance().registerApp
|
|
* is called, and it won't register success without fly-safe-database.
|
|
* Both will greatly reduce the size of the APK.
|
|
*/
|
|
exclude module: 'library-anti-distortion'
|
|
exclude module: 'fly-safe-database'
|
|
|
|
/**
|
|
* Uncomment the following line to exclude Amap from the app.
|
|
* Note that Google Play Store does not allow APKs that include this library.
|
|
*/
|
|
// exclude group: 'com.amap.api'
|
|
})
|
|
implementation 'androidx.test.ext:junit:1.1.3'
|
|
compileOnly ('com.dji:dji-sdk-provided:4.16.1')
|
|
|
|
//UXSDK MOBILE HERE
|
|
implementation 'com.github.dji-sdk:Mobile-UXSDK-Beta-Android:v0.5.1'
|
|
|
|
// UXSDK dependencies
|
|
implementation 'androidx.annotation:annotation:1.3.0'
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
implementation 'androidx.core:core:1.7.0'
|
|
implementation "androidx.core:core-ktx:1.7.0"
|
|
|
|
// UXSDK map dependencies: Only include dependencies for map providers that are used in your app
|
|
// Amap: Do not include if publishing to Google Play Store
|
|
//implementation 'com.amap.api:3dmap:6.9.2'
|
|
//implementation 'com.amap.api:search:6.9.2'
|
|
//implementation 'com.amap.api:location:4.7.0'
|
|
// HERE maps
|
|
//implementation files('libs/HERE-sdk-3.15.0.aar')
|
|
// Mapbox
|
|
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0'
|
|
// Google maps
|
|
implementation 'com.google.android.gms:play-services-base:18.0.1'
|
|
implementation 'com.google.android.gms:play-services-location:19.0.1'
|
|
implementation 'com.google.android.gms:play-services-maps:18.0.2'
|
|
implementation 'com.google.android.gms:play-services-places:17.0.0'
|
|
implementation 'com.google.maps.android:android-maps-utils:1.2.1'
|
|
|
|
// SDK dependencies
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
// required to avoid crash on Android 12 API 31
|
|
implementation 'androidx.work:work-runtime-ktx:2.7.1'
|
|
|
|
// Sample app dependencies
|
|
implementation 'com.jakewharton:butterknife:10.0.0'
|
|
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
|
|
|
|
implementation "com.ncorti:slidetoact:0.9.0"
|
|
implementation "com.github.emrekose26:RecordButton:1.2.4"
|
|
implementation 'com.google.android.material:material:1.5.0'
|
|
|
|
api 'io.reactivex.rxjava3:rxandroid:3.0.0'
|
|
api 'io.reactivex.rxjava3:rxjava:3.0.0'
|
|
|
|
|
|
}
|
|
repositories {
|
|
mavenLocal()
|
|
}
|