129 lines
4.4 KiB
Groovy
129 lines
4.4 KiB
Groovy
import java.text.SimpleDateFormat
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
|
|
signingConfigs {
|
|
releaseEB5 {
|
|
keyAlias = 'eb5_system'
|
|
storeFile file('./EB5/eb5_system.keystore')
|
|
storePassword 'password'
|
|
keyPassword 'password'
|
|
v1SigningEnabled true
|
|
v2SigningEnabled true
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.mogo.tts"
|
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
buildTypes {
|
|
debug {
|
|
debuggable true
|
|
minifyEnabled false
|
|
zipAlignEnabled true
|
|
shrinkResources false
|
|
signingConfig signingConfigs.releaseEB5
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
release {
|
|
debuggable true
|
|
minifyEnabled false
|
|
zipAlignEnabled true
|
|
shrinkResources false
|
|
signingConfig signingConfigs.releaseEB5
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
|
|
implementation 'com.google.android.material:material:1.3.0'
|
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
|
implementation 'androidx.annotation:annotation:1.2.0'
|
|
implementation 'androidx.core:core-ktx:1.5.0'
|
|
|
|
implementation 'com.blankj:utilcodex:1.30.0'
|
|
implementation "com.bytedance.boost_multidex:boost_multidex:1.0.1"
|
|
|
|
implementation(project(":libraries:mogo-tts:tts-iflytek-offline"))
|
|
implementation(project(":libraries:mogo-tts:tts-base"))
|
|
|
|
// ======================集成 Bugly================================================================
|
|
implementation 'com.tencent.bugly:crashreport:4.1.9.2'
|
|
// implementation 'androidx.activity:activity:1.13.0'
|
|
// ======================集成 Bugly================================================================
|
|
}
|
|
|
|
//
|
|
//
|
|
//// 打包出来的应用文件名称
|
|
//android.applicationVariants.all { variant ->
|
|
// def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00"))
|
|
// def flavor = variant.productFlavors.collect { it.name }.join('-')
|
|
//
|
|
// variant.outputs.all { output ->
|
|
// outputFileName = ["MoGoTTS",
|
|
// "v${variant.versionName}",
|
|
// getWorkingBranchName(),
|
|
// getWorkingBranchHash(),
|
|
// buildTime,
|
|
// flavor.length() > 0 ? "[${flavor}]" : "",
|
|
// variant.buildType.name].findAll { it.length() > 0 }.join('_') << ".apk"
|
|
// }
|
|
//}
|
|
//
|
|
//// 获取当前分支名称
|
|
//def getWorkingBranchName() {
|
|
// def workingBranchName = ""
|
|
// def proc = "git rev-parse --abbrev-ref HEAD".execute()
|
|
// proc.in.eachLine { line -> workingBranchName = line }
|
|
// proc.err.eachLine { line -> println line }
|
|
// proc.waitFor()
|
|
// println "Working branch name: " + workingBranchName
|
|
// return workingBranchName
|
|
//}
|
|
//
|
|
//// 获取当前分支hash
|
|
//def getWorkingBranchHash() {
|
|
// def workingBranchHash = ""
|
|
// def proc = "git log -n1 --format=format:%h".execute()
|
|
// proc.in.eachLine { line -> workingBranchHash = line }
|
|
// proc.err.eachLine { line -> println line }
|
|
// proc.waitFor()
|
|
// println "Working branch hash: " + workingBranchHash
|
|
// return workingBranchHash
|
|
//}
|
|
//
|
|
//// 当前构建时间
|
|
//static def getBuildTime() {
|
|
// def buildTimeFormat = "yyyy-MM-dd HH:mm:ss"
|
|
// //设置时间格式
|
|
// SimpleDateFormat formatter = new SimpleDateFormat(buildTimeFormat, Locale.getDefault())
|
|
// //获取当前时间
|
|
// Date curDate = new Date(System.currentTimeMillis())
|
|
// def buildTime = formatter.format(curDate)
|
|
// return "\"${buildTime}\""
|
|
//}
|
|
|