Skip to content

Document note re resource shrinking for withContext() API#1242

Merged
mikepenz merged 3 commits intodevelopfrom
chore/1239
Oct 10, 2025
Merged

Document note re resource shrinking for withContext() API#1242
mikepenz merged 3 commits intodevelopfrom
chore/1239

Conversation

@mikepenz
Copy link
Owner

add javadoc comment re resource shrinking when using withContext()

@mikepenz mikepenz requested a review from Copilot October 10, 2025 10:49
@mikepenz mikepenz added the other label Oct 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation to the withContext() API to inform developers about the need to disable resource shrinking when using this method. It also includes various dependency version updates and code improvements.

  • Added comprehensive Javadoc comments to the withContext() API explaining resource shrinking requirements
  • Updated multiple dependencies including Gradle wrapper, navigation library, and okhttp
  • Migrated from deprecated Kotlin enum entries to values() method

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
aboutlibraries-core/src/androidMain/kotlin/com/mikepenz/aboutlibraries/util/AndroidExtensions.kt Added documentation about resource shrinking requirements for withContext() API
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt Updated enum access from entries to values() and improved code formatting
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/License.kt Updated enum access from entries to values()
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt Fixed method call to use getGroup() instead of accessing property directly
plugin-build/plugin/build.gradle.kts Added Kotlin compiler options with API and language version settings
settings.gradle.kts Updated version catalog dependency version
gradlew.bat Removed unused CLASSPATH variable
gradlew Removed unused CLASSPATH variable and references
gradle/wrapper/gradle-wrapper.properties Updated Gradle wrapper to version 9.1.0
gradle/libs.versions.toml Updated navigation and okhttp library versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

companion object {
internal fun find(key: String): SpdxLicense? {
for (l: SpdxLicense in entries) {
for (l: SpdxLicense in values()) {
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using values() instead of entries is correct for older Kotlin versions, but consider that entries is the preferred approach in Kotlin 1.8.20+ for better performance and API consistency.

Copilot uses AI. Check for mistakes.

internal fun getById(id: String): SpdxLicense {
return entries.first { it.id.equals(id, true) }
return values().first { it.id.equals(id, true) }
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using values() instead of entries is correct for older Kotlin versions, but consider that entries is the preferred approach in Kotlin 1.8.20+ for better performance and API consistency.

Suggested change
return values().first { it.id.equals(id, true) }
return entries.first { it.id.equals(id, true) }

Copilot uses AI. Check for mistakes.
*/
private fun resolveLicenseId(name: String, url: String?): String? {
for (l: SpdxLicense in SpdxLicense.entries) {
for (l: SpdxLicense in SpdxLicense.values()) {
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using values() instead of entries is correct for older Kotlin versions, but consider that entries is the preferred approach in Kotlin 1.8.20+ for better performance and API consistency.

Suggested change
for (l: SpdxLicense in SpdxLicense.values()) {
for (l: SpdxLicense in SpdxLicense.entries) {

Copilot uses AI. Check for mistakes.
@mikepenz mikepenz merged commit fb91967 into develop Oct 10, 2025
3 checks passed
@mikepenz mikepenz deleted the chore/1239 branch October 10, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

R8 optimizedResourceShrinking crash

2 participants