mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Filter bogus AndroidX Media jar file when creating javadoc
#minor-release
PiperOrigin-RevId: 452282128
(cherry picked from commit bd9bc0f6b7)
This commit is contained in:
parent
501ea8c563
commit
216d971518
1 changed files with 13 additions and 1 deletions
|
|
@ -48,9 +48,21 @@ class CombinedJavadocPlugin implements Plugin<Project> {
|
||||||
libraryModule.android.libraryVariants.all { variant ->
|
libraryModule.android.libraryVariants.all { variant ->
|
||||||
def name = variant.buildType.name
|
def name = variant.buildType.name
|
||||||
if (name == "release") {
|
if (name == "release") {
|
||||||
|
// Works around b/234569640 that causes different versions of the androidx.media
|
||||||
|
// jar to be on the classpath.
|
||||||
|
def allJarFiles = []
|
||||||
|
allJarFiles.addAll(variant.javaCompileProvider.get().classpath.files)
|
||||||
|
def filteredJarFiles = allJarFiles.findAll { file ->
|
||||||
|
if (file ==~ /.*media-.\..\..-api.jar$/
|
||||||
|
&& !file.path.endsWith(
|
||||||
|
"media-" + project.ext.androidxMediaVersion + "-api.jar")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
classpath +=
|
classpath +=
|
||||||
libraryModule.project.files(
|
libraryModule.project.files(
|
||||||
variant.javaCompileProvider.get().classpath.files,
|
filteredJarFiles,
|
||||||
libraryModule.project.android.getBootClasspath())
|
libraryModule.project.android.getBootClasspath())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue