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'
|
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
|
2022-12-16 21:16:44 +05:30
|
|
|
versionCode 25
|
|
|
|
versionName '0.9.1'
|
2021-12-12 17:38:23 +05:30
|
|
|
multiDexEnabled true
|
2021-12-09 18:31:47 +05:30
|
|
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
2022-02-17 00:19:36 +05:30
|
|
|
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'
|
|
|
|
}
|
2021-12-12 17:38:23 +05:30
|
|
|
|
2022-02-15 01:42:10 +05:30
|
|
|
debug {
|
2022-10-23 22:29:04 +05:30
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2022-02-15 01:42:10 +05:30
|
|
|
debuggable true
|
|
|
|
applicationIdSuffix ".debug"
|
2022-02-17 00:19:36 +05:30
|
|
|
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 {
|
2022-06-25 13:34:21 +05:30
|
|
|
//debugImplementation libs.square.leakcanary
|
2022-02-05 22:40:43 +05:30
|
|
|
|
2022-08-27 17:27:41 +05:30
|
|
|
/* Android Core */
|
2022-06-25 13:34:21 +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
|
|
|
|
2022-08-27 17:27:41 +05:30
|
|
|
/* Android Lifecycle */
|
|
|
|
implementation libs.lifecycle.viewmodel
|
|
|
|
implementation libs.lifecycle.runtime
|
|
|
|
implementation libs.lifecycle.livedata
|
|
|
|
|
|
|
|
/* Testing */
|
2022-06-25 13:34:21 +05:30
|
|
|
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
|
2021-12-12 17:38:23 +05:30
|
|
|
|
2022-08-27 17:27:41 +05:30
|
|
|
/* ExoPlayer */
|
2022-06-25 13:34:21 +05:30
|
|
|
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
|
|
|
|
2022-08-27 17:27:41 +05:30
|
|
|
/* Retrofit and Jackson */
|
2022-06-25 13:34:21 +05:30
|
|
|
implementation libs.square.retrofit
|
|
|
|
implementation libs.square.retrofit.converterJackson
|
|
|
|
implementation libs.jacksonAnnotations
|
2022-03-16 19:02:42 +05:30
|
|
|
|
2022-08-27 17:27:41 +05:30
|
|
|
/* Cronet and Coil */
|
2022-06-25 13:34:21 +05:30
|
|
|
coreLibraryDesugaring libs.desugaring
|
|
|
|
implementation libs.cronet.embedded
|
2022-07-21 19:06:15 +05:30
|
|
|
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-05-27 01:07:00 +05:30
|
|
|
}
|
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
|
|
|
}
|