Files
ux/android/build.gradle
agra de4925adf9 video_player + insets: native playback backend + animated viewPadding
- video_player: ExoPlayer (Android) / AVPlayer (iOS/macOS) backend with
  PixelBufferSink, method-channel adapter, Dart-side XVideoPlayer +
  testing fake.
- insets: XInsets singleton + XAnimatedInsets widget lerp the system
  viewPadding over 220ms so OS bar visibility toggles
  (immersiveSticky <-> edgeToEdge) slide bottom-/top-anchored UI into
  place instead of snapping by the nav-bar / status-bar height.
2026-05-23 15:57:15 +03:00

80 lines
2.3 KiB
Groovy

group 'io.swipelab.ux'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
namespace 'io.swipelab.ux'
compileSdk 34
defaultConfig {
minSdk 21
externalNativeBuild {
cmake {
cppFlags ""
}
}
}
externalNativeBuild {
cmake {
path "src/main/jni/CMakeLists.txt"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
// CameraX for scanner preview + frame analysis + ux.camera.
// 1.4.0+ ships 16-KB-aligned `libimage_processing_util_jni.so`
// (Android 15 requirement); 1.3.x failed the elf-alignment check.
def cameraxVersion = '1.4.2'
implementation "androidx.camera:camera-core:$cameraxVersion"
implementation "androidx.camera:camera-camera2:$cameraxVersion"
implementation "androidx.camera:camera-lifecycle:$cameraxVersion"
implementation "androidx.camera:camera-view:$cameraxVersion"
implementation "androidx.camera:camera-video:$cameraxVersion"
// ProcessLifecycleOwner so CameraInstance can release the camera
// when the host app backgrounds (and re-acquire on foreground).
// camera-lifecycle pulls in lifecycle-common but not the process
// observer; this adds it.
implementation 'androidx.lifecycle:lifecycle-process:2.7.0'
// Pure-Kotlin/Java QR decoder. ~470 KB jar, no Play Services dep.
implementation 'com.google.zxing:core:3.5.3'
// Media3 for ux.video_player. Same version line video_player_android
// 2.9.5 pulls in (1.9.x) so the spike fork can coexist during the
// Phase 2/3 migration without dragging in two ExoPlayer copies.
def media3Version = '1.9.2'
implementation "androidx.media3:media3-exoplayer:$media3Version"
implementation "androidx.media3:media3-common:$media3Version"
}