summaryrefslogtreecommitdiff
path: root/app/build.gradle.kts
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-09-21 08:39:10 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-09-21 08:39:10 +0000
commit34f44c0e3f0f934389275f3ac1c48d252d21a69c (patch)
tree9729b0e0df8c7436e9f94563281d7913d23f362f /app/build.gradle.kts
parent5876025559ba0ad287d3a7a4d9fa0246509e668e (diff)
parent433866c912a5dc687c02bf597eff093e3b2615ef (diff)
Merge in-app yt-dlp: verified working end to end, Termux no longer needed
Diffstat (limited to 'app/build.gradle.kts')
-rw-r--r--app/build.gradle.kts23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index a1d1854..585cbc8 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -6,6 +6,7 @@ plugins {
id("com.google.devtools.ksp")
id("io.gitlab.arturbosch.detekt")
id("jacoco")
+ id("com.chaquo.python")
}
android {
@@ -22,6 +23,13 @@ android {
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+
+ ndk {
+ // CPython ships as native code, so every ABI included multiplies the APK size.
+ // arm64 is the phone; x86_64 is the emulator.
+ abiFilters += listOf("arm64-v8a", "x86_64")
+ }
+
}
buildTypes {
@@ -110,6 +118,21 @@ dependencies {
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
+chaquopy {
+ defaultConfig {
+ // Not the default 3.8. yt-dlp dropped Python 3.8 support, so pip silently resolves the
+ // last release that still supported it -- 2024.10.22 -- which is stale enough that
+ // YouTube extraction no longer works. The build succeeds and the feature doesn't.
+ version = "3.12"
+ // The extractor itself. yt-dlp is pure Python and updates independently of this app,
+ // which is the entire reason for embedding it rather than reimplementing YouTube's
+ // stream resolution against a target that changes without notice.
+ pip {
+ install("yt-dlp")
+ }
+ }
+}
+
detekt {
buildUponDefaultConfig = true
config.setFrom(files("$rootDir/config/detekt/detekt.yml"))