diff --git a/aboutlibraries-core/src/androidMain/kotlin/com/mikepenz/aboutlibraries/util/AndroidExtensions.kt b/aboutlibraries-core/src/androidMain/kotlin/com/mikepenz/aboutlibraries/util/AndroidExtensions.kt
index 51e837b46..66ccdd86c 100644
--- a/aboutlibraries-core/src/androidMain/kotlin/com/mikepenz/aboutlibraries/util/AndroidExtensions.kt
+++ b/aboutlibraries-core/src/androidMain/kotlin/com/mikepenz/aboutlibraries/util/AndroidExtensions.kt
@@ -19,6 +19,15 @@ fun Libs.Builder.withJson(byteArray: ByteArray): Libs.Builder {
* Auto discover the generated library definition data by the default name and location
* `res/raw/aboutlibraries.json`
*
+ * Please remember to disable resource shrinking when using this API.
+ * https://developer.android.com/topic/performance/app-optimization/customize-which-resources-to-keep
+ *
+ * ```
+ *
+ *
+ * ```
+ *
* @param ctx context used to retrieve the resource
*/
fun Libs.Builder.withContext(ctx: Context): Libs.Builder {
@@ -35,10 +44,12 @@ fun Libs.Builder.withJson(ctx: Context, rawResId: Int): Libs.Builder {
try {
withJson(ctx.resources.openRawResource(rawResId).bufferedReader().use { it.readText() })
} catch (t: Throwable) {
- Log.e("AboutLibraries", """
+ Log.e(
+ "AboutLibraries", """
Unable to retrieve library information given the `raw` resource identifier.
Please make sure either the gradle plugin is properly set up, or the file is manually provided.
- """.trimIndent())
+ """.trimIndent()
+ )
println("Could not retrieve libraries")
}
return this
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 3b9e4076e..9a9333dbf 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -7,7 +7,7 @@ cardview = "1.0.0"
constraintLayout = "2.2.1"
core = "1.17.0"
lifecycle = { require = "2.9.3" }
-navigation = "2.9.4"
+navigation = "2.9.5"
recyclerView = "1.4.0"
# google
material = "1.13.0"
@@ -18,7 +18,7 @@ itemAnimators = "1.1.0"
ivy = "2.5.3"
modelBuilder = "3.9.11"
materialDrawer = "9.0.2"
-okhttp = "5.1.0"
+okhttp = "5.2.1"
[plugins]
navSafeArgs = { id = "androidx.navigation.safeargs", version.ref = "navigation" }
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 2a84e188b..2e1113280 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index ef07e0162..adff685a0 100755
--- a/gradlew
+++ b/gradlew
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
-CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
diff --git a/gradlew.bat b/gradlew.bat
index 5eed7ee84..e509b2dd8 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
-set CLASSPATH=
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/plugin-build/plugin/build.gradle.kts b/plugin-build/plugin/build.gradle.kts
index 607a4319b..d29795ed9 100644
--- a/plugin-build/plugin/build.gradle.kts
+++ b/plugin-build/plugin/build.gradle.kts
@@ -1,4 +1,5 @@
import com.vanniktech.maven.publish.GradlePublishPlugin
+import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
id("com.android.lint")
@@ -42,6 +43,10 @@ java {
kotlin {
jvmToolchain(11)
+ compilerOptions {
+ apiVersion.set(KotlinVersion.KOTLIN_1_8)
+ languageVersion.set(KotlinVersion.KOTLIN_1_8)
+ }
}
dependencies {
diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt
index 9b8a198f4..5ac1b1512 100644
--- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt
+++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt
@@ -34,7 +34,7 @@ abstract class AboutLibrariesTask : BaseAboutLibrariesTask() {
abstract val deprecated: Property
override fun getDescription(): String = "Exports dependency meta data from the current module.${variant.orNull?.let { " Filtered by variant: '$it'." } ?: ""}"
- override fun getGroup(): String = super.group ?: org.gradle.language.base.plugins.LifecycleBasePlugin.BUILD_GROUP
+ override fun getGroup(): String = super.getGroup() ?: org.gradle.language.base.plugins.LifecycleBasePlugin.BUILD_GROUP
fun configureOutputFile(outputFile: Provider? = null) {
if (outputFile != null && outputFile.isPresent) {
diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/License.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/License.kt
index 3124f035c..f3217bc0c 100644
--- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/License.kt
+++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/License.kt
@@ -57,7 +57,7 @@ data class License(
* Ensures and applies fixes to the library names (shorten, ...)
*/
private fun resolveLicenseId(name: String, url: String?): String? {
- for (l: SpdxLicense in SpdxLicense.entries) {
+ for (l: SpdxLicense in SpdxLicense.values()) {
val matcher = l.customMatcher
if (l.id.equals(name, true) || l.name.equals(name, true) || l.fullName.equals(name, true) || (matcher != null && matcher.invoke(name, url))) {
return l.id
diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt
index 8e054ff29..114ace11b 100644
--- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt
+++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/mapping/SpdxLicense.kt
@@ -208,13 +208,15 @@ enum class SpdxLicense(
Leptonica("Leptonica License", "Leptonica"),
LGPL_2_0_only("GNU Library General Public License v2 only", "LGPL-2.0-only"),
LGPL_2_0_or_later("GNU Library General Public License v2 or later", "LGPL-2.0-or-later"),
- LGPL_2_1_only("GNU Lesser General Public License v2.1 only", "LGPL-2.1-only",
+ LGPL_2_1_only(
+ "GNU Lesser General Public License v2.1 only", "LGPL-2.1-only",
customMatcher = { name, _ ->
name.equals("GNU Lesser General Public License (LGPL), Version 2.1", true)
}
),
LGPL_2_1_or_later("GNU Lesser General Public License v2.1 or later", "LGPL-2.1-or-later"),
- LGPL_3_0_only("GNU Lesser General Public License v3.0 only", "LGPL-3.0-only",
+ LGPL_3_0_only(
+ "GNU Lesser General Public License v3.0 only", "LGPL-3.0-only",
customMatcher = { name, _ ->
name.equals("GNU General Lesser Public License (LGPL) version 3.0", true)
}
@@ -247,11 +249,12 @@ enum class SpdxLicense(
mpich2("mpich2 License", "mpich2"),
MPL_1_0("Mozilla Public License 1.0", "MPL-1.0"),
MPL_1_1("Mozilla Public License 1.1", "MPL-1.1"),
- MPL_2_0("Mozilla Public License 2.0", "MPL-2.0",
+ MPL_2_0(
+ "Mozilla Public License 2.0", "MPL-2.0",
customMatcher = { name, url ->
name.contains("Mozilla Public License", true)
- && url?.contains("mozilla.org", true) == true
- && url.contains("MPL/2.0", true)
+ && url?.contains("mozilla.org", true) == true
+ && url.contains("MPL/2.0", true)
}
),
MPL_2_0_no_copyleft_exception(
@@ -474,7 +477,7 @@ enum class SpdxLicense(
companion object {
internal fun find(key: String): SpdxLicense? {
- for (l: SpdxLicense in entries) {
+ for (l: SpdxLicense in values()) {
if (l.id.equals(key, true) || l.name.equals(key, true) || l.fullName.equals(key, true)) {
return l
}
@@ -483,7 +486,7 @@ enum class SpdxLicense(
}
internal fun getById(id: String): SpdxLicense {
- return entries.first { it.id.equals(id, true) }
+ return values().first { it.id.equals(id, true) }
}
}
}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index cfb1361f5..135888427 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -25,7 +25,7 @@ dependencyResolutionManagement {
versionCatalogs {
create("baseLibs") {
- from("com.mikepenz:version-catalog:0.8.6")
+ from("com.mikepenz:version-catalog:0.8.7")
}
}
}