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

PiperOrigin-RevId: 613938538
This commit is contained in:
ibaker 2024-03-08 08:13:55 -08:00 committed by Copybara-Service
parent 16ef146482
commit 4bca1ac47b
4 changed files with 30 additions and 2 deletions

View File

@ -154,6 +154,26 @@ implementation project(':media-lib-exoplayer-dash')
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
#### Project branches

View File

@ -87,6 +87,10 @@
* Skip empty session information values (i-tags) in SDP parsing
([#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).
* Leanback extension:
* Cast Extension:
* Test Utilities:

View File

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

View File

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