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

161 lines
5.5 KiB
Groovy

plugins {
id 'com.android.application'
}
// 10,00,000 major-minor-build
def AppMajorVersion = 1
def AppMinorVersion = 1
def AppBuildNumber = 19
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
android {
signingConfigs {
debug {
storeFile file('../sign.jks')
storePassword 'XyMpApp'
keyAlias 'xymp'
keyPassword 'XyMpApp'
}
}
namespace 'com.xypower.mpapp'
compileSdk 33
defaultConfig {
applicationId "com.xypower.mpapp"
if (com.android.build.OutputFile.ABI.equalsIgnoreCase('arm64-v8a')) {
minSdk COMPILE_MIN_SDK_VERSION as int
//noinspection ExpiredTargetSdkVersion
targetSdk TARGET_SDK_VERSION as int
} else {
minSdk COMPILE_MIN_SDK_VERSION_N938 as int
//noinspection ExpiredTargetSdkVersion
targetSdk TARGET_SDK_VERSION_N938 as int
}
versionCode AppVersionCode
versionName AppVersionName
buildConfigField "long","BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
externalNativeBuild {
cmake {
// cppFlags '-std=c++17 -frtti -fexceptions -Wno-error=format-security'
cppFlags '-std=c++17 -fexceptions -Wno-error=format-security -fopenmp'
// cppFlags '-std=c++17 -Wno-error=format-security'
// arguments "-DANDROID_STL=c++_shared"
arguments "-DNCNN_DISABLE_EXCEPTION=OFF", "-DTERM_CORE_ROOT=" + coreroot, "-DOpenCV_DIR=" + opencvsdk + "/sdk/native/jni", "-DHDRPLUS_ROOT=" + hdrplusroot, "-DNCNN_ROOT=" + ncnnroot, "-DHALIDE_ROOT=" + halideroot
abiFilters 'arm64-v8a', 'armeabi-v7a'
// setAbiFilters(['arm64-v8a'])
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
jniDebuggable true
testCoverageEnabled false
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.22.1'
}
}
splits {
boolean isReleaseTask = gradle.startParameter.taskNames.any { it.contains("Release") }
// enabled on release build
abi {
enable isReleaseTask
reset()
include "armeabi-v7a", "arm64-v8a"
universalApk false
}
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
if (outputFileName.endsWith('.apk')) {
def buildTypeFlag = "dbg"
if(variant.buildType.name.equals('release')) {
buildTypeFlag = "rel"
}
def abi = output.getFilter(com.android.build.OutputFile.ABI)
if (abi == null) abi = "all"
def fileName = "mpapp_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}_${abi}.apk"
outputFileName = fileName
}
}
}
buildFeatures {
viewBinding true
}
ndkVersion '26.1.10909125'
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/io.netty.versions.properties'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE-notice.md'
exclude 'META-INF/LICENSE.md'
jniLibs {
useLegacyPackaging true
}
}
}
dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.8.0'
implementation project(path: ':common')
// implementation 'androidx.camera:camera-video:1.2.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.googlecode.mp4parser:isoparser:1.1.21'
// implementation 'com.tencent.mars:mars-core:1.2.5'
// implementation 'com.tencent:mmkv-static:1.3.0'
// implementation project(path: ':opencv')
implementation files('libs/devapi.aar')
// debugImplementation files('libs/rtmp-client-debug.aar')
implementation files('libs/android-openGL-canvas-1.5.4.0.aar')
implementation files('libs/rtmp-client.aar')
api project(':gpuv')
implementation project(':stream')
implementation 'dev.mobile:dadb:1.2.7'
// implementation group: 'io.netty', name: 'netty-all', version: '4.1.96.Final'
// implementation 'io.netty:netty-all:4.1.23.Final'
// implementation 'org.apache.logging.log4j:log4j-api:2.14.0'
// implementation 'org.apache.logging.log4j:log4j-core:2.14.0'
}