You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
7.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'org.greenrobot.greendao'
greendao {
schemaVersion 2 //数据库版本号
daoPackage 'com.dji.ux.ruishi.dao'
// 设置DaoMaster、DaoSession、Dao 包名
targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录,请注意,这里路径用/不要用.
}
repositories {
mavenLocal()
jcenter()
}
android {
signingConfigs {
debug {
// storeFile file('/Users/cuishan/work/airfly/Mobile-UXSDK-Android-master/sample/Djrs.jks')
storeFile file('../Djrs.jks')
storePassword '123456'
keyAlias 'chinese'
keyPassword '123456'
}
release {
// storeFile file('/Users/cuishan/work/airfly/Mobile-UXSDK-Android-master/sample/Djrs.jks')
storeFile file('../Djrs.jks')
storePassword '123456'
keyAlias 'chinese'
keyPassword '123456'
}
}
compileSdkVersion 30
buildToolsVersion '30.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.dj.ruishi"
minSdkVersion 23
targetSdkVersion 30
versionCode 2
versionName "2.0"
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'
}
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -fexceptions"
}
ndk {
abiFilters 'armeabi-v7a','arm64-v8a'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
// 设置打包后应用名称
android.applicationVariants.all { variant ->
variant.outputs.all {
if (outputFileName.endsWith('.apk')) {
if ("debug".equalsIgnoreCase(variant.buildType.name)) {
outputFileName = "airplane_${getTime()}_${defaultConfig.versionName}_dama.apk"
} else if ("release".equalsIgnoreCase(variant.buildType.name)) {
outputFileName = "airplane_${getTime()}_${defaultConfig.versionName}_dama.apk"
}
}
}
}
}
dexOptions {
incremental = true;
preDexLibraries = false
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 "*/*/libAMapSDK_MAP_v6_9_2.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'
pickFirst 'lib/*/libDJIFlySafeCore.so'
pickFirst 'lib/*/libdjifs_jni.so'
pickFirst 'lib/*/libsfjni.so'
exclude 'META-INF/proguard/okhttp3.pro'
exclude 'META-INF/rxjava.properties'
exclude 'assets/location_map_gps_locked.png'
exclude 'assets/location_map_gps_3d.png'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
//打包时APK文件名使用的获取时间的方法
def static getTime() {
return new Date().format("yyMMdd", TimeZone.getDefault())
}
dependencies {
implementation ('com.dji:dji-uxsdk:4.16.2', {
/**
* 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 'com.google.android.material:material:1.4.0'
compileOnly ('com.dji:dji-sdk-provided:4.16.2')
// AMAP: Do not include if publishing to Google Play Store
implementation 'com.amap.api:3dmap:7.3.0'
implementation 'com.amap.api:search:7.3.0'
implementation 'com.amap.api:location:4.9.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.core:core:1.3.2'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compile 'io.reactivex:rxjava:1.3.3'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.dhh:rxlifecycle:1.6'
//HERE maps
implementation files('libs/HERE-sdk-3.15.0.aar')
implementation files('libs/commons-net-3.3.jar')
implementation 'com.github.smart-fun:XmlToJson:1.4.5'
//导入RxJava 和 RxAndroid
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.x.y'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
//导入retrofit
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//转换器请求结果转换成Model
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
//配合Rxjava 使用
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
//添加HttpLoggingInterceptor进行调试
//butterknife不是必须
implementation 'com.jakewharton:butterknife:7.0.1'
//开源日志库
implementation 'com.orhanobut:logger:1.15'
//事件发布/订阅框架
implementation 'org.greenrobot:eventbus:3.3.1'
implementation 'com.alibaba:fastjson:1.1.72.android'
compile 'com.squareup.picasso:picasso:2.5.2'
//数据库配置
implementation 'org.greenrobot:greendao:3.3.0' // add library
compile 'com.android.support:multidex:1.0.1'
implementation 'org.apache.commons:commons-lang3:3.7'
implementation 'com.quickbirdstudios:opencv-contrib:3.4.5'
implementation 'org.rajawali3d:rajawali:1.1.970'
//websocket
implementation 'org.java-websocket:Java-WebSocket:1.5.3'
}