| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- apply plugin: 'com.android.application'
- apply plugin: 'org.jetbrains.kotlin.android'
- android {
- compileSdkVersion 35
- buildToolsVersion '35.0.0'
- namespace 'com.YuyeTech.HeartRate'
-
- defaultConfig {
- minSdkVersion 21
- targetSdkVersion 32 //建议此属性值设为21 io.dcloud.PandoraEntry 作为apk入口时 必须设置 targetSDKVersion>=21 沉浸式才生效
- versionCode 26022702
- versionName "2.3.16"
- multiDexEnabled true
- ndk {
- abiFilters 'x86','x86_64','armeabi', 'armeabi-v7a','arm64-v8a'
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- //修改包名
- applicationId "com.YuyeTech.HeartRate"
- //修改app名字,string资源下不能包含"app_name"
- resValue "string", "app_name", "哔蹦健身"
- manifestPlaceholders = [
- appid:'__UNI__8D02B4B',
- adid:'0123456789'
- ]
- vectorDrawables {
- useSupportLibrary true
- }
- }
- signingConfigs {
- config {
- keyAlias 'key0'
- keyPassword 'heart123456'
- storeFile file('heartRateBand.jks')
- storePassword 'heart123456'
- v1SigningEnabled true
- v2SigningEnabled true
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.config
- zipAlignEnabled false
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- debug {
- signingConfig signingConfigs.config
- zipAlignEnabled false
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- //Add the following configuration
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- //使用uniapp时,需复制下面代码
- /*代码开始*/
- aaptOptions {
- additionalParameters '--auto-add-overlay'
- //noCompress 'foo', 'bar'
- ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- /*代码结束*/
- //多渠道打包
- flavorDimensions "version"
- productFlavors {
- //离线测试包
- android_debug {
- dimension "version"
- manifestPlaceholders = [
- channel:'bbeng'
- ]
- }
- //哔蹦渠道
- app_bbeng {
- dimension "version"
- manifestPlaceholders = [
- channel:'bbeng'
- ]
- }
- //哔蹦pad渠道
- app_bbeng_pad {
- dimension "version"
- manifestPlaceholders = [
- channel:'pad'
- ]
- }
- //哔蹦测试渠道
- // BBengTest {
- // dimension "version"
- //
- // //修改包名
- // applicationId "com.YuyeTech.HeartRateTest"
- // //修改app名字,string资源下不能包含"app_name"
- // resValue "string", "app_name", "哔蹦健身测试版"
- //
- // manifestPlaceholders = [
- // channel:'BBengTest'
- // ]
- // }
- app_yyb {
- dimension "version"
- manifestPlaceholders = [
- channel:'yyb'
- ]
- }
- app_baidu{
- dimension "version"
- manifestPlaceholders = [
- channel:'baidu'
- ]
- }
- app_huawei {
- dimension "version"
- manifestPlaceholders = [
- channel:'huawei'
- ]
- }
- app_xiaomi {
- dimension "version"
- manifestPlaceholders = [
- channel:'xiaomi'
- ]
- }
- app_oppo {
- dimension "version"
- manifestPlaceholders = [
- channel:'oppo'
- ]
- }
- app_vivo {
- dimension "version"
- manifestPlaceholders = [
- channel:'vivo'
- ]
- }
- // app_360 {
- // dimension "version"
- // manifestPlaceholders = [
- // channel:'360'
- // ]
- // }
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.5.1'
- }
- packaging {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
- /**
- * 打包导出apk时候的名字,或者各种服务的key配置等等
- * */
- applicationVariants.all { variant ->
- variant.outputs.all {
- if (variant.buildType.name == "release") {
- // 输出apk名称
- outputFileName = "${variant.flavorName}_v${variant.versionName}_${variant.versionCode}_${releaseTime()}.apk"
- } else {
- if(variant.flavorName == "android_debug"){
- outputFileName = "${variant.flavorName}.apk"
- }else{
- outputFileName = "${variant.flavorName}_v${variant.versionName}_${variant.versionCode}_${releaseTime()}_debug.apk"
- }
- }
- }
- }
- }
- //打包时间
- def static releaseTime() {
- return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
- }
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
- implementation project(":myLockView")
- implementation project(":myWIFIView")
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation fileTree(dir: 'libs', include: ['*.aar'])
- debugImplementation fileTree(includes: ['*.jar', '*.aar'], dir: 'debug/libs')
- /*uniapp所需库-----------------------开始*/
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
- implementation 'com.facebook.fresco:fresco:1.13.0'
- implementation "com.facebook.fresco:animated-gif:1.13.0"
- /*uniapp所需库-----------------------结束*/
- // 基座需要,必须添加
- implementation 'com.github.bumptech.glide:glide:4.9.0'
- implementation 'com.alibaba:fastjson:1.2.83'
- implementation 'androidx.webkit:webkit:1.5.0'
- implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
- implementation 'androidx.core:core:1.1.0'
- implementation "androidx.fragment:fragment:1.1.0"
- implementation 'androidx.appcompat:appcompat:1.1.0'
- // 添加uni-app插件
- implementation project(':uniplugin_module')
- implementation project(path: ':core')
- implementation project(path: ':ICDeviceManager')
- // uts依赖
- implementation "com.squareup.okhttp3:okhttp:3.12.12"
- implementation "androidx.core:core-ktx:1.6.0"
- implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.10"
- implementation "org.jetbrains.kotlin:kotlin-reflect:1.6.0"
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8"
- implementation "com.github.getActivity:XXPermissions:18.0"
- implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
- implementation 'androidx.activity:activity-compose:1.8.0'
- implementation platform('androidx.compose:compose-bom:2024.04.01')
- implementation 'androidx.compose.ui:ui'
- implementation 'androidx.compose.ui:ui-graphics'
- implementation 'androidx.compose.ui:ui-tooling-preview'
- implementation 'androidx.compose.material3:material3'
- androidTestImplementation platform('androidx.compose:compose-bom:2024.04.01')
- androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
- debugImplementation 'androidx.compose.ui:ui-tooling'
- debugImplementation 'androidx.compose.ui:ui-test-manifest'
- //自定义基座添加部分信息
- implementation 'com.squareup.okhttp3:okhttp:3.12.12'
- implementation 'com.squareup.okio:okio:1.15.0'
- }
|