You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ytdl-android/app/build.gradle

246 lines
8.8 KiB
Groovy

plugins {
id 'com.android.application'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1'
id 'org.jetbrains.kotlin.android'
id 'com.google.devtools.ksp'
id "org.jetbrains.kotlin.plugin.serialization" version "2.3.0"
id "org.jetbrains.kotlin.plugin.parcelize" version "2.3.0"
id "org.jetbrains.kotlin.plugin.compose" version "2.3.0"
}
def properties = new Properties()
def versionMajor = 1
def versionMinor = 8
def versionPatch = 9
def versionBuild = 2 // bump for dogfood builds, public betas, etc.
//WHEN RELEASING BETA KEEP THE SAME VERSION AS LATEST STABLE, SO USERS CAN DOWNGRADE
def isBeta = false
def versionExt = ""
if (versionBuild > 0) {
versionExt += ".${versionBuild}"
}
if (isBeta) {
versionExt += "-beta"
}
android {
namespace 'com.deniscerri.ytdl'
compileSdk = 36
try {
def propertiesFile = rootProject.file("keystore.properties")
if(propertiesFile.text != ""){
properties.load(new FileInputStream(propertiesFile))
properties.load(new FileInputStream(propertiesFile))
signingConfigs {
debug {
storeFile file(properties["signingConfig.storeFile"])
storePassword properties["signingConfig.storePassword"]
keyAlias properties["signingConfig.keyAlias"]
keyPassword properties["signingConfig.keyPassword"]
}
}
}
}catch(IOException ignored){}
defaultConfig {
applicationId "com.deniscerri.ytdl"
minSdk 24
targetSdk 36
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}${versionExt}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
archivesBaseName = "YTDLnis-$versionName"
vectorDrawables {
useSupportLibrary true
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
vectorDrawables.generatedDensities = []
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.debug
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.debug
}
}
flavorDimensions "version"
productFlavors {
github {
dimension "version"
isDefault true
}
foss {
dimension "version"
}
}
android.applicationVariants.configureEach { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
} else {
output.versionCodeOverride = 100 * project.android.defaultConfig.versionCode
}
}
}
buildFeatures {
viewBinding true
buildConfig true
compose true
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
splits {
abi {
enable true
reset()
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
universalApk true
}
}
composeOptions {
kotlinCompilerExtensionVersion "1.10.1"
}
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
lint {
disable 'MissingTranslation', 'RestrictedApi'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs_nio:2.1.5"
// implementation "com.github.yausername.youtubedl-android:library:$youtubedlAndroidVer"
// implementation "com.github.yausername.youtubedl-android:ffmpeg:$youtubedlAndroidVer"
// implementation "com.github.yausername.youtubedl-android:aria2c:$youtubedlAndroidVer"
implementation "io.github.junkfood02.youtubedl-android:library:0.18.1"
//implementation "io.github.junkfood02.youtubedl-android:ffmpeg:0.18.1"
implementation "io.github.junkfood02.youtubedl-android:aria2c:0.18.1"
// implementation "io.github.junkfood02.youtubedl-android:library:0.17.4"
//noinspection NewerVersionAvailable
implementation "io.github.junkfood02.youtubedl-android:ffmpeg:0.17.2"
// implementation "io.github.junkfood02.youtubedl-android:aria2c:0.17.2"
implementation "androidx.appcompat:appcompat:1.7.1"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "androidx.navigation:navigation-fragment-ktx:2.9.6"
implementation "androidx.navigation:navigation-ui-ktx:2.9.6"
implementation 'androidx.core:core-ktx:1.17.0'
implementation 'androidx.test.ext:junit-ktx:1.3.0'
implementation 'androidx.compose.ui:ui-android:1.10.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
testImplementation "junit:junit:4.13.2"
androidTestImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.3.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.7.0"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.devbrackets.android:exomedia:5.2.0'
implementation("androidx.cardview:cardview:1.0.0")
implementation("com.squareup.picasso:picasso:2.71828")
implementation("jp.wasabeef:picasso-transformations:2.4.0")
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0"
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.3.0'
implementation 'com.facebook.shimmer:shimmer:0.5.0'
implementation "androidx.work:work-runtime-ktx:2.11.0"
implementation "androidx.room:room-runtime:2.8.4"
implementation "androidx.room:room-ktx:2.8.4"
ksp "androidx.room:room-compiler:2.8.4"
implementation 'androidx.paging:paging-runtime-ktx:3.3.6'
implementation "androidx.room:room-paging:2.8.4"
androidTestImplementation "androidx.room:room-testing:2.8.4"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'
implementation "androidx.compose.runtime:runtime:1.10.1"
androidTestImplementation 'com.google.truth:truth:1.4.5'
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
implementation 'com.google.code.gson:gson:2.13.2'
implementation "com.squareup.okhttp3:okhttp:5.3.2"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0'
implementation 'it.xabaras.android:recyclerview-swipedecorator:1.4'
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.10.0"
implementation "com.neoutils.highlight:highlight-view:2.3.0"
// For media playback using ExoPlayer
implementation("androidx.media3:media3-exoplayer:1.9.0")
// For DASH playback support with ExoPlayer
implementation("androidx.media3:media3-exoplayer-dash:1.9.0")
// For HLS playback support with ExoPlayer
implementation("androidx.media3:media3-exoplayer-hls:1.9.0")
implementation("androidx.media3:media3-ui:1.9.0")
// For RTSP playback support with ExoPlayer
implementation("androidx.media3:media3-exoplayer-rtsp:1.9.0")
implementation "com.anggrayudi:storage:1.5.5"
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
implementation 'com.google.accompanist:accompanist-webview:0.36.0'
implementation 'androidx.compose.material3:material3-android:1.4.0'
implementation "io.noties.markwon:core:4.6.2"
implementation("com.github.teamnewpipe:newpipeextractor:-SNAPSHOT")
implementation("commons-io:commons-io:2.5")
implementation("org.apache.commons:commons-compress:1.12")
implementation("androidx.core:core-splashscreen:1.2.0")
}