LibreTube/app/build.gradle

130 lines
3.4 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-13 23:41:56 +05:30
id 'kotlin-kapt'
id 'kotlinx-serialization'
2021-12-09 18:01:40 +05:30
}
android {
2022-08-27 18:43:24 +05:30
compileSdk 33
2021-12-09 18:01:40 +05:30
defaultConfig {
2022-02-01 21:22:06 +05:30
applicationId 'com.github.libretube'
2022-02-27 00:27:05 +05:30
minSdk 21
2022-08-27 18:43:24 +05:30
targetSdk 33
2023-02-12 22:14:24 +05:30
versionCode 29
versionName '0.12.0'
2021-12-09 18:31:47 +05:30
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resValue "string", "app_name", "LibreTube"
2022-11-18 22:31:11 +05:30
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
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()
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-08-18 16:59:07 +05:30
universalApk true
2022-02-27 23:21:17 +05:30
}
}
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
2022-08-27 17:27:41 +05:30
/* Android Core */
implementation libs.androidx.appcompat
implementation libs.androidx.constraintlayout
implementation libs.androidx.legacySupport
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
2022-08-27 17:27:41 +05:30
/* Android Lifecycle */
implementation libs.lifecycle.viewmodel
implementation libs.lifecycle.runtime
implementation libs.lifecycle.livedata
2023-02-06 06:47:07 +05:30
implementation libs.lifecycle.service
2022-08-27 17:27:41 +05:30
/* Testing */
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.androidx.test.espressoCore
2021-12-18 16:34:14 +05:30
2022-08-27 17:27:41 +05:30
/* Design */
implementation libs.material
2022-08-27 17:27:41 +05:30
/* ExoPlayer */
implementation libs.exoplayer
implementation(libs.exoplayer.extension.cronet) { exclude group: 'com.google.android.gms' }
implementation libs.exoplayer.extension.mediasession
2022-11-16 19:47:27 +05:30
implementation libs.exoplayer.dash
2022-02-26 22:49:42 +05:30
2023-01-19 14:08:21 +05:30
/* Retrofit and Kotlinx Serialization */
implementation libs.square.retrofit
implementation libs.kotlinx.serialization
implementation libs.kotlinx.datetime
implementation libs.kotlinx.serialization.retrofit
2022-03-16 19:02:42 +05:30
2022-08-27 17:27:41 +05:30
/* Cronet and Coil */
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-27 17:27:41 +05:30
/* Room */
kapt libs.room.compiler
2022-08-13 23:34:07 +05:30
implementation libs.room
}
2022-07-30 16:03:01 +05:30
2022-07-30 16:39:57 +05:30
static def getUnixTime() {
return Instant.now().getEpochSecond()
}