my-tv/app/build.gradle

62 lines
1.4 KiB
Groovy
Raw Normal View History

2023-12-04 19:36:29 +08:00
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.lizongying.mytv'
compileSdk 33
defaultConfig {
applicationId "com.lizongying.mytv"
minSdk 23
targetSdk 33
2023-12-05 13:58:13 +08:00
versionCode getVersionCode()
versionName getVersionName()
2023-12-04 19:36:29 +08:00
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget=17
}
}
2023-12-05 13:58:13 +08:00
static def getVersionCode() {
try {
def process = 'git rev-list --count HEAD'.execute()
process.waitFor()
return process.text.toInteger()
} catch (ignored) {
return 0
}
}
static def getVersionName() {
try {
def process = 'git describe --tags --always'.execute()
process.waitFor()
return process.text.trim()
} catch (ignored) {
return "1.0.0"
}
}
2023-12-04 19:36:29 +08:00
dependencies {
implementation 'androidx.core:core-ktx:1.11.0-beta02'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0-RC")
}