|
|
@ -5,7 +5,7 @@ plugins {
|
|
|
|
// 10,00,000 major-minor-build
|
|
|
|
// 10,00,000 major-minor-build
|
|
|
|
def AppMajorVersion = 1
|
|
|
|
def AppMajorVersion = 1
|
|
|
|
def AppMinorVersion = 3
|
|
|
|
def AppMinorVersion = 3
|
|
|
|
def AppBuildNumber = 66
|
|
|
|
def AppBuildNumber = 70
|
|
|
|
|
|
|
|
|
|
|
|
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
|
|
|
|
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
|
|
|
|
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
|
|
|
|
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
|
|
|
@ -39,6 +39,7 @@ android {
|
|
|
|
cppFlags '-std=c++17 -fexceptions -Wno-error=format-security -fopenmp'
|
|
|
|
cppFlags '-std=c++17 -fexceptions -Wno-error=format-security -fopenmp'
|
|
|
|
// cppFlags '-std=c++17 -Wno-error=format-security'
|
|
|
|
// cppFlags '-std=c++17 -Wno-error=format-security'
|
|
|
|
// arguments "-DANDROID_STL=c++_shared"
|
|
|
|
// 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'
|
|
|
|
abiFilters 'arm64-v8a', 'armeabi-v7a'
|
|
|
|
// setAbiFilters(['arm64-v8a'])
|
|
|
|
// setAbiFilters(['arm64-v8a'])
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -74,34 +75,15 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flavorDimensions "apps"
|
|
|
|
splits {
|
|
|
|
productFlavors {
|
|
|
|
boolean isReleaseTask = gradle.startParameter.taskNames.any { it.contains("Release") }
|
|
|
|
WP {
|
|
|
|
// enabled on release build
|
|
|
|
dimension = "apps"
|
|
|
|
abi {
|
|
|
|
externalNativeBuild {
|
|
|
|
enable isReleaseTask
|
|
|
|
cmake {
|
|
|
|
reset()
|
|
|
|
arguments "-DNCNN_DISABLE_EXCEPTION=OFF", "-DTERM_CORE_ROOT=" + coreroot, "-DOpenCV_DIR=" + opencvsdk + "/sdk/native/jni", "-DHDRPLUS_ROOT=" + hdrplusroot, "-DNCNN_ROOT=" + ncnnroot, "-DHALIDE_ROOT=" + halideroot
|
|
|
|
include "armeabi-v7a", "arm64-v8a"
|
|
|
|
abiFilters "arm64-v8a"
|
|
|
|
// include "arm64-v8a"
|
|
|
|
}
|
|
|
|
universalApk false
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
RP {
|
|
|
|
|
|
|
|
dimension = "apps"
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
|
|
|
|
cmake {
|
|
|
|
|
|
|
|
arguments "-DUSING_PLZ=1", "-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"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
N938 {
|
|
|
|
|
|
|
|
dimension = "apps"
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
|
|
|
|
cmake {
|
|
|
|
|
|
|
|
arguments "-DUSING_N938=1", "-DNCNN_DISABLE_EXCEPTION=OFF", "-DTERM_CORE_ROOT=" + coreroot, "-DOpenCV_DIR=" + opencvsdk + "/sdk/native/jni", "-DHDRPLUS_ROOT=" + hdrplusroot, "-DNCNN_ROOT=" + ncnnroot, "-DHALIDE_ROOT=" + halideroot
|
|
|
|
|
|
|
|
abiFilters "armeabi-v7a"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -109,19 +91,15 @@ android {
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
if (outputFileName.endsWith('.apk')) {
|
|
|
|
if (outputFileName.endsWith('.apk')) {
|
|
|
|
def buildTypeFlag = "dbg"
|
|
|
|
def buildTypeFlag = "dbg"
|
|
|
|
def flavor = variant.flavorName
|
|
|
|
|
|
|
|
def prevFileName = "mpapp"
|
|
|
|
def prevFileName = "mpapp"
|
|
|
|
def buildType = variant.buildType
|
|
|
|
|
|
|
|
if(variant.buildType.name.equals('release')) {
|
|
|
|
if(variant.buildType.name.equals('release')) {
|
|
|
|
buildTypeFlag = "rel"
|
|
|
|
buildTypeFlag = "rel"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (flavor.equals("N938")) prevFileName = "N938"
|
|
|
|
def abi = output.getFilter(com.android.build.OutputFile.ABI)
|
|
|
|
else if (flavor.equals("RP")) prevFileName = "rpapp"
|
|
|
|
if (abi == null) abi = "all"
|
|
|
|
def fileName = "${prevFileName}_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}.apk"
|
|
|
|
if (abi.contains("v7a")) prevFileName = "N938"
|
|
|
|
def outputDir = new File("${project.buildDir}/${buildType}")
|
|
|
|
def fileName = "${prevFileName}_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}_${abi}.apk"
|
|
|
|
outputFileName = fileName
|
|
|
|
outputFileName = fileName
|
|
|
|
|
|
|
|
|
|
|
|
// variant.getPackageApplication().outputDirectory = outputDir // new File(project.rootDir.absolutePath + "/app/build/")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|