LibreTube/app/build.gradle

113 lines
3.1 KiB
Groovy
Raw Normal View History

2022-07-30 16:39:57 +05:30
import java.time.Instant
2021-12-09 18:01:40 +05:30
plugins {
id 'com.android.application'
id 'kotlin-android'
2022-08-04 12:38:46 +05:30
id 'kotlin-android-extensions'
2021-12-09 18:01:40 +05:30
}
android {
compileSdk 31
defaultConfig {
2022-02-01 21:22:06 +05:30
applicationId 'com.github.libretube'
2022-02-27 00:27:05 +05:30
minSdk 21
2021-12-09 18:01:40 +05:30
targetSdk 31
2022-08-04 13:02:02 +05:30
versionCode 16
versionName '0.4.2'
multiDexEnabled true
2021-12-09 18:31:47 +05:30
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resValue "string", "app_name", "LibreTube"
2021-12-09 18:01:40 +05:30
}
2022-07-01 00:35:31 +05:30
buildFeatures {
viewBinding true
}
2022-07-30 16:03:01 +05:30
applicationVariants.all { variant ->
// use the date as version for debug builds
if (variant.name == 'debug') {
variant.outputs.each { output ->
2022-07-30 16:39:57 +05:30
output.versionCodeOverride = getUnixTime()
output.versionNameOverride = getUnixTime()
2022-07-30 16:03:01 +05:30
}
}
}
2021-12-09 18:01:40 +05:30
buildTypes {
release {
2022-02-27 23:21:17 +05:30
minifyEnabled true
2021-12-09 18:01:40 +05:30
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
2022-02-15 01:42:10 +05:30
debug {
debuggable true
applicationIdSuffix ".debug"
resValue "string", "app_name", "LibreTube Debug"
2022-02-15 01:42:10 +05:30
}
2021-12-09 18:01:40 +05:30
}
compileOptions {
2022-04-16 11:51:50 +05:30
coreLibraryDesugaringEnabled true
2021-12-09 18:01:40 +05:30
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
2022-02-27 23:21:17 +05:30
splits {
abi {
enable true
reset()
2022-06-07 12:22:11 +05:30
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
2022-02-27 23:21:17 +05:30
universalApk false
}
}
packagingOptions {
2022-04-15 11:45:17 +05:30
jniLibs {
excludes += ['lib/armeabi-v7a/*_neon.so']
}
2022-02-27 23:21:17 +05:30
}
2022-05-12 21:49:52 +05:30
namespace 'com.github.libretube'
2021-12-09 18:01:40 +05:30
}
dependencies {
//debugImplementation libs.square.leakcanary
2022-02-05 22:40:43 +05:30
implementation libs.androidx.appcompat
implementation libs.androidx.constraintlayout
implementation libs.androidx.legacySupport
implementation libs.androidx.multidex
implementation libs.androidx.navigation.fragment
implementation libs.androidx.navigation.ui
implementation libs.androidx.preference
2022-07-28 16:57:52 +05:30
implementation libs.androidx.work.runtime
2021-12-18 16:34:14 +05:30
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.androidx.test.espressoCore
2021-12-18 16:34:14 +05:30
implementation libs.circleimageview
implementation libs.material
implementation libs.exoplayer
implementation(libs.exoplayer.extension.cronet) { exclude group: 'com.google.android.gms' }
implementation libs.exoplayer.extension.mediasession
2022-02-26 22:49:42 +05:30
implementation libs.square.retrofit
implementation libs.square.retrofit.converterJackson
// Do not update jackson annotations! It does not supports < API 26.
implementation libs.jacksonAnnotations
2022-03-16 19:02:42 +05:30
coreLibraryDesugaring libs.desugaring
implementation libs.cronet.embedded
implementation libs.cronet.okhttp
2022-07-21 19:51:43 +05:30
implementation libs.coil
2022-08-04 12:38:46 +05:30
2022-08-04 13:02:02 +05:30
implementation libs.lifecycle.viewmodel
implementation libs.lifecycle.runtime
implementation libs.lifecycle.livedata
}
2022-07-30 16:03:01 +05:30
2022-07-30 16:39:57 +05:30
static def getUnixTime() {
return Instant.now().getEpochSecond()
2022-07-30 16:03:01 +05:30
}