TiebaLite/app/build.gradle

154 lines
5.7 KiB
Groovy

plugins {
id "com.android.application"
id "kotlin-android"
id "kotlin-kapt"
}
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(rootProject.file("keystore.properties")))
def applicationProperties = new Properties()
applicationProperties.load(new FileInputStream(rootProject.file("application.properties")))
def SHA1 = System.getenv("CIRCLE_SHA1")
def applicationVersionCode = applicationProperties["versionCode"].toInteger()
def applicationVersionName = applicationProperties["versionName"]
def isPerVersion = applicationProperties["isPerRelease"] == "true"
if (SHA1 != null) {
applicationVersionName = applicationVersionName + ".${SHA1.substring(0, 7)}"
}
if (isPerVersion) {
applicationVersionName = applicationVersionName + ".${applicationProperties["preReleaseName"]}-${applicationProperties["preReleaseVer"]}"
}
project.ext.set("archivesBaseName", "${applicationVersionName}(${applicationVersionCode})".toString())
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.huanchengfly.tieba.post"
minSdkVersion 21
//noinspection OldTargetApi
targetSdkVersion 30
versionCode applicationVersionCode
versionName applicationVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
signingConfigs {
release {
keyAlias keystoreProperties["releaseKeyAlias"]
keyPassword keystoreProperties["releaseKeyPassword"]
storeFile file(rootDir.getCanonicalPath() + "/" + keystoreProperties["releaseKeyStore"])
storePassword keystoreProperties["releaseStorePassword"]
v2SigningEnabled true
enableV3Signing true
enableV4Signing true
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
zipAlignEnabled true
multiDexEnabled true
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation "org.jetbrains:annotations:19.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
//Local Files
implementation fileTree(include: ["*.jar"], dir: "libs")
//滑动返回
implementation "me.imid.swipebacklayout.lib:library:1.3.0"
//兼容 Glide
implementation "com.android.support:support-annotations:28.0.0"
implementation "androidx.work:work-runtime:2.5.0"
kapt "com.android.support:support-annotations:28.0.0"
//AndroidX
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.core:core-ktx:1.6.0"
implementation "androidx.annotation:annotation:1.2.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.1"
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.browser:browser:1.3.0"
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "androidx.palette:palette-ktx:1.0.0"
//Test
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test:core:1.4.0"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test:rules:1.4.0"
androidTestImplementation "androidx.test:runner:1.4.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
//Glide
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version"
implementation "com.google.android.material:material:1.4.0"
implementation "com.squareup.okhttp3:okhttp:4.9.1"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.google.code.gson:gson:2.8.7"
implementation "cn.dreamtobe.kpswitch:library:1.6.2"
implementation "org.litepal.android:kotlin:3.0.0"
implementation "com.github.SheHuan:RecyclerViewAdapter:1.2.9"
implementation "com.davemorrissey.labs:subsampling-scale-image-view:3.10.0"
implementation "com.bm.photoview:library:2.0.7"
implementation "cn.jzvd:jiaozivideoplayer:7.7.0"
implementation "com.jrummyapps:colorpicker:2.1.7"
implementation "com.scwang.smart:refresh-layout-kernel:2.0.1"
implementation "com.scwang.smart:refresh-header-material:2.0.1"
implementation "com.zhihu.android:matisse:0.5.3-beta3"
implementation "com.yanzhenjie:permission:2.0.3"
implementation "com.gyf.immersionbar:immersionbar:3.0.0"
api "com.flurry.android:analytics:13.0.0"
implementation "com.github.yalantis:ucrop:2.2.7"
implementation "com.billy.android:pre-loader:2.1.0"
implementation "com.jakewharton:butterknife:10.2.3"
kapt "com.jakewharton:butterknife-compiler:10.2.3"
implementation ("com.alibaba.android:vlayout:1.2.31@aar") {
transitive = true
}
}