Browse Source

添加签名,添加testonly用于测试安装

master
suliang 2 years ago
parent
commit
485e84eeb8
3 changed files with 44 additions and 4 deletions
  1. 42
    3
      app/build.gradle
  2. 2
    1
      gradle.properties
  3. BIN
      xuekaole.jks

+ 42
- 3
app/build.gradle View File

@@ -5,6 +5,14 @@ plugins {
}
def androidConfig = rootProject.ext.android
android {
signingConfigs {
relese {
storeFile file('../xuekaole.jks')
keyAlias 'XueKaoLe'
keyPassword '1Ucik75SH9uJxPrV'
storePassword '0PuY5usdSTULJxS0'
}
}
compileSdk androidConfig.compile_sdk_version
buildToolsVersion androidConfig.build_tools_version

@@ -27,18 +35,49 @@ android {
// }
// }
//Kotlin环境RoomSchemaLocation配置
kapt{
arguments{
arg("room.schemaLocation","$projectDir/schemas")
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
}
ndk {
// 只接入 armeabi-v7a 和 x86 架构
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
}
}

}
/*构建类型: 定义Gradle在构建阶段和打包应用时使用的某些属性*/


buildTypes {
release {
buildConfigField "int", "PORT", "10006"
buildConfigField "String", "ENVIRONMENT", "\"production\""
minifyEnabled false
shrinkResources false
debuggable = true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.relese
}

debug {
buildConfigField "int", "PORT", "10003"
buildConfigField "String", "ENVIRONMENT", "\"development\""
minifyEnabled false
zipAlignEnabled false
debuggable = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.relese
}
}
applicationVariants.all {
it.outputs.each {
it.outputFileName = "学考乐本地_${defaultConfig.versionName}.apk"
}
}


+ 2
- 1
gradle.properties View File

@@ -19,4 +19,5 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
android.injected.testOnly=false

BIN
xuekaole.jks View File


Loading…
Cancel
Save