mirror of
https://github.com/videojs/video.js.git
synced 2026-11-21 08:24:15 +01:00
Co-authored-by: Emily Dixon <edixon@mux.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Emily Dixon <puterbaugh0@gmail.com>
66 lines
1.6 KiB
Groovy
66 lines
1.6 KiB
Groovy
buildscript {
|
|
ext.VideoJS = [
|
|
kotlinVersion: "2.0.21",
|
|
minSdkVersion: 24,
|
|
compileSdkVersion: 36,
|
|
media3Version: "1.11.0"
|
|
]
|
|
|
|
ext.getExtOrDefault = { prop ->
|
|
if (rootProject.ext.has(prop)) {
|
|
return rootProject.ext.get(prop)
|
|
}
|
|
|
|
return VideoJS[prop]
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// AGP is deliberately not pinned here. This module is only ever built as a
|
|
// subproject of a host app, and a second AGP version on the classpath
|
|
// breaks Android Studio's per-module model ("Missing ExternalProject for :")
|
|
// even though the CLI build tolerates it.
|
|
// noinspection DifferentKotlinGradleVersion
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
|
}
|
|
}
|
|
|
|
apply plugin: "com.android.library"
|
|
|
|
if (project.extensions.findByName("kotlin") == null) {
|
|
apply plugin: "kotlin-android"
|
|
}
|
|
|
|
|
|
apply plugin: "com.facebook.react"
|
|
|
|
android {
|
|
namespace "com.reactnative"
|
|
|
|
compileSdkVersion getExtOrDefault("compileSdkVersion")
|
|
|
|
defaultConfig {
|
|
minSdkVersion getExtOrDefault("minSdkVersion")
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "com.facebook.react:react-android"
|
|
|
|
def media3Version = getExtOrDefault("media3Version")
|
|
|
|
implementation "androidx.media3:media3-exoplayer:${media3Version}"
|
|
// Pulled in for its side effect: DefaultMediaSourceFactory discovers the HLS
|
|
// source reflectively, so no engine code references this artifact.
|
|
implementation "androidx.media3:media3-exoplayer-hls:${media3Version}"
|
|
}
|