AboutLibraries
AboutLibraries copied to clipboard
Exclusionpatterns not working after updating from 8.9.4 to 10.4.0
About this issue
- Briefly describe the issue: The exclusion pattern is not working for me
Build Gradle
aboutLibraries {
exclusionPatterns = [
~"androidx_.*",
~"org_jetbrains_.*",
~"com_google_firebase__.*",
~"com_google_android_gms__.*",
~"com_google_android_datatransport__.*",
~"com_google_guava__listenablefuture",
~"com_google_guava__failureaccess",
~"com_google_code_findbugs__jsr305",
~"com_android_installreferrer__.*",
~"com_squareup_okhttp__okhttp",
~"io_coil_kt__coil_svg",
~"javax_inject_.*"
]
includePlatform = true
duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.LINK
}
Fragment
private fun buildComposeList() {
binding.rvOpenSource.setContent {
LibrariesContainer(
showAuthor = false,
)
}
}
Details
- [10.4.0 ] Used library version
- [ ] Used support library version
- [X ] Used gradle build tools version
- [ ] Used tooling / Android Studio version
- [ ] Other used libraries, potential conflicting libraries
Checklist
- [x] Searched for similar issues
- [x] Checked out the sample application
- [x] Read the README
- [x] Checked out the CHANGELOG
- [ ] Read the MIGRATION GUIDE
Looks this may be due to the change of the exclusion patterns being now on the real package identifier. And no more on the legacy format with .
replaced by _
(which was necessary for the strings.xml
file) - The id is now package name and artifactId: https://github.com/mikepenz/AboutLibraries/blob/f5f95a439920bbb39dea4f7b98c7dd41cea85336/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/LibrariesProcessor.kt#L149
See here: https://github.com/mikepenz/AboutLibraries/blob/af37f4bbf80872d36733199141120df46f41b055/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt#L64-L75
What about the dependencies with two "__" like ~"com_google_android_datatransport__.*"
?
Would this be ~"com.google.android.datatransport...*"?
@Berki2021 this pattern is a regex. which means the .
actually means any character. theoretically in this case we could escape it as we are actually asking for a literal .
.
so at the end the .*
means .
- any character - *
repeated one or more times.