2021-02-10 06:38:05 +00:00
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
apply plugin: 'kotlin-android'
|
2021-09-25 13:50:44 +00:00
|
|
|
|
//apply plugin: 'kotlin-android-extensions'
|
2021-03-10 10:03:28 +00:00
|
|
|
|
apply from: 'version.gradle'
|
2021-02-10 06:38:05 +00:00
|
|
|
|
|
|
|
|
|
android {
|
2021-03-10 07:17:43 +00:00
|
|
|
|
compileSdkVersion 29
|
2021-02-19 06:27:43 +00:00
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility 1.8
|
|
|
|
|
targetCompatibility 1.8
|
|
|
|
|
}
|
2021-02-10 06:38:05 +00:00
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId "com.idormy.sms.forwarder"
|
2021-03-18 09:05:07 +00:00
|
|
|
|
minSdkVersion 23
|
2021-03-10 07:17:43 +00:00
|
|
|
|
targetSdkVersion 29
|
2021-03-10 10:03:28 +00:00
|
|
|
|
versionCode appVersionCode
|
|
|
|
|
versionName appVersionName
|
2021-02-13 08:52:55 +00:00
|
|
|
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
2021-02-10 06:38:05 +00:00
|
|
|
|
}
|
2021-03-10 07:17:43 +00:00
|
|
|
|
lintOptions {
|
|
|
|
|
checkReleaseBuilds false
|
|
|
|
|
}
|
2021-03-02 09:39:54 +00:00
|
|
|
|
signingConfigs {
|
|
|
|
|
//签名信息保存在 C:\Users\<Username>\.gradle\gradle.properties
|
|
|
|
|
release {
|
|
|
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
|
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
|
|
|
storePassword RELEASE_KEY_PASSWORD
|
|
|
|
|
keyPassword RELEASE_STORE_PASSWORD
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-02-10 06:38:05 +00:00
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2021-03-02 09:39:54 +00:00
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
debug {
|
|
|
|
|
signingConfig signingConfigs.release
|
2021-02-10 06:38:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//apk file name
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
|
variant.outputs.all {
|
|
|
|
|
//def date = new Date().format("yyyyMMdd" , TimeZone.getTimeZone("Asia/Shanghai"))
|
|
|
|
|
def date = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08"))
|
|
|
|
|
if (variant.buildType.name.equals('debug')) {
|
2021-02-10 15:19:09 +00:00
|
|
|
|
outputFileName = "SmsForwarder_debug_${date}_${versionName}.apk"
|
2021-02-10 06:38:05 +00:00
|
|
|
|
}
|
|
|
|
|
if (variant.buildType.name.equals('release')) {
|
2021-02-10 15:19:09 +00:00
|
|
|
|
outputFileName = "SmsForwarder_release_${date}_${versionName}.apk"
|
2021-02-10 06:38:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2021-03-10 07:17:43 +00:00
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
2021-02-13 08:52:55 +00:00
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
2021-03-10 07:17:43 +00:00
|
|
|
|
//testImplementation 'junit:junit:4.12'
|
|
|
|
|
//androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
|
|
|
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
2021-02-11 16:57:33 +00:00
|
|
|
|
|
2021-02-10 06:38:05 +00:00
|
|
|
|
//okhttp
|
2021-02-12 10:34:05 +00:00
|
|
|
|
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
|
|
|
|
|
implementation 'com.squareup.okio:okio:2.10.0'
|
2021-02-11 16:57:33 +00:00
|
|
|
|
|
|
|
|
|
//fastjson
|
|
|
|
|
implementation "com.alibaba:fastjson:1.2.75"
|
|
|
|
|
|
2021-02-10 06:38:05 +00:00
|
|
|
|
//android8.0以上需要使用到反射获取隐藏的系统api和动态代理隐藏的抽象类回调
|
2021-02-11 16:57:33 +00:00
|
|
|
|
//其中动态代理抽象类回调需要使用ProxyBuilder类,故依赖一个库
|
|
|
|
|
//implementation 'com.linkedin.dexmaker:dexmaker-mockito:2.12.1'
|
|
|
|
|
|
|
|
|
|
//友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
|
2021-06-14 09:48:58 +00:00
|
|
|
|
implementation 'com.umeng.umsdk:common:9.3.8'
|
|
|
|
|
implementation 'com.umeng.umsdk:asms:1.2.2'
|
|
|
|
|
implementation 'com.umeng.umsdk:abtest:1.0.0'
|
2021-02-10 06:38:05 +00:00
|
|
|
|
|
2021-02-14 09:17:34 +00:00
|
|
|
|
//XUpdate
|
2021-09-25 13:50:44 +00:00
|
|
|
|
implementation 'com.github.xuexiangjys:XUpdate:2.1.0'
|
2021-02-14 09:17:34 +00:00
|
|
|
|
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-easy:1.0.0'
|
|
|
|
|
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-downloader-aria:1.0.0'
|
|
|
|
|
|
2021-02-19 06:27:43 +00:00
|
|
|
|
//EmailKit
|
|
|
|
|
implementation 'com.github.mailhu:emailkit:4.2.2'
|
2021-09-25 14:57:29 +00:00
|
|
|
|
implementation 'androidx.test.ext:junit-ktx:1.1.2'
|
|
|
|
|
testImplementation 'junit:junit:4.12'
|
2021-02-19 06:27:43 +00:00
|
|
|
|
|
2021-09-25 13:50:44 +00:00
|
|
|
|
//Lombok
|
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.20'
|
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.20'
|
2021-02-10 06:38:05 +00:00
|
|
|
|
}
|