Files
astra-mobile/vendor/kotlinaudio/kotlin-audio/build.gradle
T
2026-07-25 16:41:56 -04:00

50 lines
1.6 KiB
Groovy

// Vendored fork of com.github.doublesymmetry:kotlinaudio v2.1.0 (Apache-2.0).
// Substituted in for the Jitpack binary so we can inject a PCM-tap AudioProcessor
// into the ExoPlayer it builds (see players/BaseAudioPlayer.kt + scope/).
//
// Source changes vs upstream v2.1.0 — keep this list accurate, it is what makes
// re-vendoring on a kotlin-audio bump mechanical:
// 1. .setRenderersFactory(buildScopeRenderersFactory(context)) in BaseAudioPlayer's init
// 2. the new scope/ package (taps, EQ, normalization gain)
// 3. GainBridge.activateFor(url) in onMediaItemTransition
// 4. shared per-player media-source factories + the fast path in
// getMediaSourceFromAudioItem (perf: Util.getUserAgent was a PackageManager
// lookup per queue item, which stalled the main thread on large queues)
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android {
namespace = "com.doublesymmetry.kotlinaudio"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
minSdk rootProject.ext.minSdkVersion
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation 'io.coil-kt:coil:2.2.0'
implementation 'androidx.media:media:1.6.0'
api 'com.google.android.exoplayer:exoplayer:2.19.0'
api 'com.google.android.exoplayer:extension-mediasession:2.19.0'
api 'com.jakewharton.timber:timber:5.0.1'
testImplementation 'junit:junit:4.13.2'
// The PCM tap forwards to expo.modules.astrascope.ScopeBridge.
implementation project(':astra-scope')
}