plugins { id 'com.android.application' } def AppMajorVersion = 1 def AppMinorVersion = 1 def AppBuildNumber = 35 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber android { compileSdk 33 defaultConfig { applicationId "com.xypower.mpmaster" minSdk 28 //noinspection ExpiredTargetSdkVersion targetSdk 28 versionCode AppVersionCode versionName AppVersionName buildConfigField "long","BUILD_TIMESTAMP", System.currentTimeMillis() + "L" // testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { abiFilters 'arm64-v8a', "armeabi-v7a" cppFlags '' arguments "-DTERM_CORE_ROOT=" + coreroot } } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { jniDebuggable true } } 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.18.1' } } android.applicationVariants.all { variant -> variant.outputs.all { output -> if (outputFileName.endsWith('.apk')) { def buildTypeFlag = "dbg" if(variant.buildType.name.equals('release')) { buildTypeFlag = "rel" } def fileName = "MpMaster_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}.apk" outputFileName = fileName } } } buildFeatures { viewBinding true } signingConfigs { release{ storeFile file('../sign.jks') storePassword 'XyMpApp' keyAlias 'xymp' keyPassword 'XyMpApp' } debug{ storeFile file('../sign.jks') storePassword 'XyMpApp' keyAlias 'xymp' keyPassword 'XyMpApp' } } } dependencies { implementation 'androidx.core:core:1.6.0' implementation 'androidx.activity:activity:1.3.0' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' // implementation 'androidx.annotation:annotation:+' implementation 'androidx.annotation:annotation:1.2.0' // implementation 'com.linkedin.dexmaker:dexmaker:2.28.3' implementation project(path: ':common') testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' // implementation 'com.orhanobut:logger:2.2.0' implementation files('libs/devapi.aar') }