Create a new media3-ui-compose module

It will be used for UI components built with Jetpack Compose

`implementation("androidx.media3:media3-ui-compose:1.X.Y")`

PiperOrigin-RevId: 688595899
This commit is contained in:
jbibik 2024-10-22 10:11:31 -07:00 committed by Copybara-Service
parent 36a5a83b22
commit a645f704b8
5 changed files with 127 additions and 0 deletions

View file

@ -52,6 +52,8 @@ include modulePrefix + 'lib-ui'
project(modulePrefix + 'lib-ui').projectDir = new File(rootDir, 'libraries/ui')
include modulePrefix + 'lib-ui-leanback'
project(modulePrefix + 'lib-ui-leanback').projectDir = new File(rootDir, 'libraries/ui_leanback')
include modulePrefix + 'lib-ui-compose'
project(modulePrefix + 'lib-ui-compose').projectDir = new File(rootDir, 'libraries/ui_compose')
include modulePrefix + 'lib-database'
project(modulePrefix + 'lib-database').projectDir = new File(rootDir, 'libraries/database')

View file

@ -0,0 +1,27 @@
# UI module written using Jetpack Compose
Provides UI-related functionality such as Composable functions and Compose State
classes. For example, the Surface for rendering media playback, UI state classes
for widgets, buttons, and other interactive components.
## Getting the module
The easiest way to use the module is to add it as a gradle dependency:
```gradle
implementation 'androidx.media3:media3-ui-compose:1.X.X'
```
where `1.X.X` is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module
locally. Instructions for doing this can be found in the [top level README][].
[top level README]: ../../README.md
## Links
* [Javadoc][]
[Javadoc]: https://developer.android.com/reference/androidx/media3/ui/compose/package-summary

View file

@ -0,0 +1,61 @@
// Copyright (C) 2024 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle"
apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.ui.compose'
buildTypes {
debug {
testCoverageEnabled = true
}
}
buildFeatures {
compose true
}
publishing {
singleVariant('release') {
withSourcesJar()
}
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
kotlinOptions {
jvmTarget = '1.8'
}
// https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility
composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
}
}
dependencies {
api project(modulePrefix + 'lib-common')
api project(modulePrefix + 'lib-common-ktx')
def composeBom = platform('androidx.compose:compose-bom:2024.01.00')
implementation composeBom
}
ext {
releaseArtifactId = 'media3-ui-compose'
releaseName = 'Media3 UI Compose module'
}
apply from: '../../publish.gradle'

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest package="androidx.media3.ui.compose">
<uses-sdk />
</manifest>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest package="androidx.media3.ui.compose.test">
<uses-sdk/>
</manifest>