diff --git a/core_settings.gradle b/core_settings.gradle index 205c86c64d..e0629d2496 100644 --- a/core_settings.gradle +++ b/core_settings.gradle @@ -24,6 +24,9 @@ if (gradle.ext.has('androidxMediaModulePrefix')) { include modulePrefix + 'lib-common' project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/common') +include modulePrefix + 'lib-common-ktx' +project(modulePrefix + 'lib-common-ktx').projectDir = new File(rootDir, 'libraries/common_ktx') + include modulePrefix + 'lib-container' project(modulePrefix + 'lib-container').projectDir = new File(rootDir, 'libraries/container') diff --git a/libraries/common_ktx/README.md b/libraries/common_ktx/README.md new file mode 100644 index 0000000000..a2a64265ed --- /dev/null +++ b/libraries/common_ktx/README.md @@ -0,0 +1,11 @@ +# Common Kotlin Extensions module + +Provides Kotlin-specific common code and utilities. Examples include extension +functions and properties, named parameters and coroutines. They help provide +idiomatic Kotlin APIs to be used by Media3 consumers. + +## Links + +* [Javadoc][] + +[Javadoc]: https://developer.android.com/reference/androidx/media3/common/package-summary diff --git a/libraries/common_ktx/build.gradle b/libraries/common_ktx/build.gradle new file mode 100644 index 0000000000..dbf92dd68e --- /dev/null +++ b/libraries/common_ktx/build.gradle @@ -0,0 +1,37 @@ +// 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" + + +android { + namespace 'androidx.media3.common.ktx' + + buildTypes { + debug { + testCoverageEnabled = true + } + } + publishing { + singleVariant('release') { + withSourcesJar() + } + } +} + +ext { + releaseArtifactId = 'media3-common-ktx' + releaseName = 'Media3 common KTX module' +} +apply from: '../../publish.gradle' diff --git a/libraries/common_ktx/src/main/AndroidManifest.xml b/libraries/common_ktx/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..98766dbd9a --- /dev/null +++ b/libraries/common_ktx/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/libraries/common_ktx/src/test/AndroidManifest.xml b/libraries/common_ktx/src/test/AndroidManifest.xml new file mode 100644 index 0000000000..e54638ac6d --- /dev/null +++ b/libraries/common_ktx/src/test/AndroidManifest.xml @@ -0,0 +1,19 @@ + + + + + +