Create a new media3-common-ktx
module
It will be used for Kotlin-specific functionality like extension functions on the classes from the `media3-common` module. To import it, add the following to your build.gradle file: `implementation("androidx.media3:media3-common-ktx:1.X.Y")` PiperOrigin-RevId: 658492256
This commit is contained in:
parent
61e68d3f24
commit
018d0488e1
@ -24,6 +24,9 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
|
|||||||
include modulePrefix + 'lib-common'
|
include modulePrefix + 'lib-common'
|
||||||
project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/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'
|
include modulePrefix + 'lib-container'
|
||||||
project(modulePrefix + 'lib-container').projectDir = new File(rootDir, 'libraries/container')
|
project(modulePrefix + 'lib-container').projectDir = new File(rootDir, 'libraries/container')
|
||||||
|
|
||||||
|
11
libraries/common_ktx/README.md
Normal file
11
libraries/common_ktx/README.md
Normal file
@ -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
|
37
libraries/common_ktx/build.gradle
Normal file
37
libraries/common_ktx/build.gradle
Normal file
@ -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'
|
18
libraries/common_ktx/src/main/AndroidManifest.xml
Normal file
18
libraries/common_ktx/src/main/AndroidManifest.xml
Normal 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.common.ktx">
|
||||||
|
<uses-sdk />
|
||||||
|
</manifest>
|
19
libraries/common_ktx/src/test/AndroidManifest.xml
Normal file
19
libraries/common_ktx/src/test/AndroidManifest.xml
Normal 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.common.ktx.test">
|
||||||
|
<uses-sdk/>
|
||||||
|
</manifest>
|
Loading…
x
Reference in New Issue
Block a user