Add opt-in flag for the MIDI module for apps with a local dependency

PiperOrigin-RevId: 613938538
(cherry picked from commit 4bca1ac47bda83d43bccc3abd7c38266dcd271a8)
This commit is contained in:
ibaker 2024-03-08 08:13:55 -08:00 committed by SheenaChhabra
parent e55621496c
commit 4db96acee6
4 changed files with 31 additions and 2 deletions

View File

@ -154,6 +154,26 @@ implementation project(':media-lib-exoplayer-dash')
implementation project(':media-lib-ui') implementation project(':media-lib-ui')
``` ```
#### MIDI module
By default the [MIDI module](libraries/decoder_midi) is disabled as a local
dependency, because it requires additional Maven repository config. If you want
to use it as a local dependency, please configure the JitPack repository as
[described in the module README](libraries/decoder_midi/README.md#getting-the-module),
and then enable building the module in your `settings.gradle.kts` file:
```kotlin
gradle.extra.apply {
set("androidxMediaEnableMidiModule", true)
}
```
Or in Gradle Groovy DSL `settings.gradle`:
```groovy
gradle.ext.androidxMediaEnableMidiModule = true
```
## Developing AndroidX Media ## Developing AndroidX Media
#### Project branches #### Project branches

View File

@ -46,6 +46,11 @@
* RTSP Extension: * RTSP Extension:
* Skip empty session information values (i-tags) in SDP parsing * Skip empty session information values (i-tags) in SDP parsing
([#1087](https://github.com/androidx/media/issues/1087)). ([#1087](https://github.com/androidx/media/issues/1087)).
* Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
* Disable the MIDI extension as a local dependency by default because it
requires an additional Maven repository to be configured. Users who need
this module from a local dependency
[can re-enable it](https://github.com/androidx/media/blob/main/README.md#midi-module).
## 1.3 ## 1.3

View File

@ -72,8 +72,10 @@ include modulePrefix + 'lib-decoder-ffmpeg'
project(modulePrefix + 'lib-decoder-ffmpeg').projectDir = new File(rootDir, 'libraries/decoder_ffmpeg') project(modulePrefix + 'lib-decoder-ffmpeg').projectDir = new File(rootDir, 'libraries/decoder_ffmpeg')
include modulePrefix + 'lib-decoder-flac' include modulePrefix + 'lib-decoder-flac'
project(modulePrefix + 'lib-decoder-flac').projectDir = new File(rootDir, 'libraries/decoder_flac') project(modulePrefix + 'lib-decoder-flac').projectDir = new File(rootDir, 'libraries/decoder_flac')
include modulePrefix + 'lib-decoder-midi' if (gradle.ext.has('androidxMediaEnableMidiModule') && gradle.ext.androidxMediaEnableMidiModule) {
project(modulePrefix + 'lib-decoder-midi').projectDir = new File(rootDir, 'libraries/decoder_midi') include modulePrefix + 'lib-decoder-midi'
project(modulePrefix + 'lib-decoder-midi').projectDir = new File(rootDir, 'libraries/decoder_midi')
}
include modulePrefix + 'lib-decoder-opus' include modulePrefix + 'lib-decoder-opus'
project(modulePrefix + 'lib-decoder-opus').projectDir = new File(rootDir, 'libraries/decoder_opus') project(modulePrefix + 'lib-decoder-opus').projectDir = new File(rootDir, 'libraries/decoder_opus')
include modulePrefix + 'lib-decoder-vp9' include modulePrefix + 'lib-decoder-vp9'

View File

@ -21,6 +21,8 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
rootProject.name = 'androidx.media3' rootProject.name = 'androidx.media3'
gradle.ext.rootProjectIsAndroidXMedia3 = true gradle.ext.rootProjectIsAndroidXMedia3 = true
gradle.ext.androidxMediaEnableMidiModule = true
include modulePrefix + 'demo' include modulePrefix + 'demo'
project(modulePrefix + 'demo').projectDir = new File(rootDir, 'demos/main') project(modulePrefix + 'demo').projectDir = new File(rootDir, 'demos/main')
include modulePrefix + 'demo-cast' include modulePrefix + 'demo-cast'