init
This commit is contained in:
152
sample/build.gradle
Normal file
152
sample/build.gradle
Normal file
@@ -0,0 +1,152 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
||||
|
||||
android {
|
||||
namespace "dji.sampleV5.aircraft"
|
||||
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.zklh.dronecontroller"
|
||||
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
|
||||
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
manifestPlaceholders["API_KEY"] = project.AIRCRAFT_API_KEY
|
||||
manifestPlaceholders["GMAP_API_KEY"] = project.GMAP_API_KEY
|
||||
manifestPlaceholders["MAPLIBRE_TOKEN"] = project.MAPLIBRE_TOKEN
|
||||
buildConfigField "String", "AIRCRAFT_API_KEY", "\"${project.AIRCRAFT_API_KEY}\""
|
||||
buildConfigField "String", "GMAP_API_KEY", "\"${project.GMAP_API_KEY}\""
|
||||
buildConfigField "String", "MAPLIBRE_TOKEN", "\"${project.MAPLIBRE_TOKEN}\""
|
||||
buildConfigField "boolean", "SAFETY_FLIGHT_COMMANDS_ENABLED", "true"
|
||||
ndk {
|
||||
//noinspection ChromeOsAbiSupport
|
||||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
|
||||
//配置签名信息
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(project.STORE_FILE)
|
||||
storePassword project.STORE_PASSWORD
|
||||
keyAlias project.KEY_ALIAS
|
||||
keyPassword project.KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources false
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
freeCompilerArgs += ["-Xjvm-default=all"]
|
||||
}
|
||||
|
||||
//关闭lint
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
// MSDK requires extracted native libraries when android:extractNativeLibs is true.
|
||||
jniLibs {
|
||||
useLegacyPackaging true
|
||||
}
|
||||
// 因为mrtc库内部使用了NDK的c++_shared的编译参数
|
||||
// 与其他库重复引用了,因此选其中一个即可
|
||||
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||||
doNotStrip "*/*/libconstants.so"
|
||||
doNotStrip "*/*/libdji_innertools.so"
|
||||
doNotStrip "*/*/libdjibase.so"
|
||||
doNotStrip "*/*/libDJICSDKCommon.so"
|
||||
doNotStrip "*/*/libDJIFlySafeCore-CSDK.so"
|
||||
doNotStrip "*/*/libdjifs_jni-CSDK.so"
|
||||
doNotStrip "*/*/libDJIRegister.so"
|
||||
doNotStrip "*/*/libdjisdk_jni.so"
|
||||
doNotStrip "*/*/libDJIUpgradeCore.so"
|
||||
doNotStrip "*/*/libDJIUpgradeJNI.so"
|
||||
doNotStrip "*/*/libDJIWaypointV2Core-CSDK.so"
|
||||
doNotStrip "*/*/libdjiwpv2-CSDK.so"
|
||||
doNotStrip "*/*/libFlightRecordEngine.so"
|
||||
doNotStrip "*/*/libvideo-framing.so"
|
||||
doNotStrip "*/*/libwaes.so"
|
||||
doNotStrip "*/*/libagora-rtsa-sdk.so"
|
||||
doNotStrip "*/*/libc++.so"
|
||||
doNotStrip "*/*/libc++_shared.so"
|
||||
doNotStrip "*/*/libmrtc_28181.so"
|
||||
doNotStrip "*/*/libmrtc_agora.so"
|
||||
doNotStrip "*/*/libmrtc_core.so"
|
||||
doNotStrip "*/*/libmrtc_core_jni.so"
|
||||
doNotStrip "*/*/libmrtc_data.so"
|
||||
doNotStrip "*/*/libmrtc_log.so"
|
||||
doNotStrip "*/*/libmrtc_onvif.so"
|
||||
doNotStrip "*/*/libmrtc_rtmp.so"
|
||||
doNotStrip "*/*/libmrtc_rtsp.so"
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
compose true
|
||||
buildConfig true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** <-----------------依赖MSDK--------------------> **/
|
||||
compileOnly deps.aircraftProvided
|
||||
implementation deps.aircraft
|
||||
|
||||
/** <-----------------sample所需--------------------> **/
|
||||
implementation project(':uxsdk')
|
||||
implementation deps.appcompat
|
||||
implementation deps.constraintLayout
|
||||
implementation deps.aacCommon
|
||||
implementation deps.aacRuntime
|
||||
implementation deps.kotlinLib
|
||||
implementation deps.ktxCore
|
||||
implementation deps.ktxFrag
|
||||
implementation deps.ktxNavigation
|
||||
implementation deps.ktxNavigationUi
|
||||
implementation deps.recyclerview
|
||||
implementation deps.legacySupport
|
||||
implementation deps.lifecycleViewModel
|
||||
implementation deps.lifecycleLiveData
|
||||
implementation deps.leakcanary
|
||||
implementation deps.glide
|
||||
implementation deps.dynamicanimation
|
||||
implementation deps.expandedit
|
||||
implementation deps.rx3Kt
|
||||
implementation deps.dom
|
||||
implementation deps.pahoMqtt
|
||||
kapt deps.glidecompiler
|
||||
implementation deps.lynx
|
||||
|
||||
implementation "androidx.activity:activity-compose:1.9.3"
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.7"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7"
|
||||
implementation "androidx.compose.ui:ui:1.7.6"
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:1.7.6"
|
||||
implementation "androidx.compose.material:material-icons-extended:1.7.6"
|
||||
implementation "androidx.compose.material3:material3:1.3.1"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:1.7.6"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0"
|
||||
}
|
||||
Reference in New Issue
Block a user