Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
main ▾

Modern-Apps.git / uniflix / build.gradle.kts

build.gradle.kts53 lines · 1.8 KiBRaw
1plugins {
2 id("common-conventions-app")
3 // androidx.tv: the TV entry is built on a design system that knows what a D-pad is.
4 id("common-conventions-tv")
5 id("common-conventions-preview-metadata")
6 alias(libs.plugins.ksp)
7}
8
9launcherIcon {
10 symbol = "movie"
11}
12
13// Google TV hardware runs a 32-bit userspace: an arm64-only APK is rejected at install.
14// Uniflix ships the QuickJS native runtime, so it needs the 32-bit slice too.
15nativeAbis {
16 armv7 = true
17}
18
19android {
20 defaultConfig {
21 applicationId = "com.vayunmathur.uniflix"
22 }
23}
24
25dependencies {
26 implementation(project(":library:tv"))
27 implementation(project(":library:network"))
28 implementation(project(":library:image"))
29 implementRoom(libs)
30 implementation(project(":library:room"))
31 implementation(libs.androidx.media3.exoplayer)
32 implementation(libs.androidx.media3.exoplayer.hls)
33 implementation(libs.androidx.media3.ui.compose.material3)
34 implementation(libs.androidx.datastore.preferences)
35 // JS plugin runtime: QuickJS engine + pure-Java WASM host (Chicory).
36 implementation(libs.quickjs.kt)
37 implementation(libs.chicory.runtime)
38
39 // Mocked ExoPlayer for WatchPlayerState transport tests.
40 testImplementation(libs.mockito.core)
41}
42
43// Desktop JVM unit tests cannot load the Android QuickJS .so: run them against
44// the -jvm artifact (per quickjs-kt README) while the app keeps the -android AAR.
45// configureEach (not named) so this holds however AGP creates the test configs.
46configurations.configureEach {
47 if (name.endsWith("UnitTestRuntimeClasspath")) {
48 resolutionStrategy.dependencySubstitution {
49 substitute(module("io.github.dokar3:quickjs-kt-android"))
50 .using(module("io.github.dokar3:quickjs-kt-jvm:${libs.versions.quickjs.get()}"))
51 }
52 }
53}