Skip to content

Commit

Permalink
KTX 1.11.0-rc5 release. #454
Browse files Browse the repository at this point in the history
  • Loading branch information
czyzby committed Feb 24, 2023
2 parents 250e1b5 + 2632b70 commit 203c7b0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
_See also: [the official libGDX changelog](https://github.com/libgdx/libgdx/blob/master/CHANGES)._

#### 1.11.0-rc5

- **[UPDATE]** Updated to Kotlin 1.8.10.
- **[FIX]** (`ktx-assets-async`) `AssetStorage` no longer uses `ConcurrentHashMap.getOrDefault` method unsupported on older Android devices.

#### 1.11.0-rc4

- **[UPDATE]** Updated to Kotlin 1.8.0.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![GitHub Build](https://github.com/libktx/ktx/workflows/build/badge.svg)](https://github.com/libktx/ktx/actions?query=workflow%3Abuild)
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.0-orange.svg)](http://kotlinlang.org/)
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.10-orange.svg)](http://kotlinlang.org/)
[![libGDX](https://img.shields.io/badge/libgdx-1.11.0-red.svg)](https://libgdx.com/)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-async.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.libktx%22)

Expand Down Expand Up @@ -220,7 +220,7 @@ with the `ktx-app` identifier would require the following changes in your `build
// Groovy DSL:
ext {
// Update this version to match the latest KTX release:
ktxVersion = '1.11.0-rc4'
ktxVersion = '1.11.0-rc5'
}
dependencies {
Expand All @@ -234,7 +234,7 @@ dependencies {

```kotlin
// Update this version to match the latest KTX release:
val ktxVersion = "1.11.0-rc4"
val ktxVersion = "1.11.0-rc5"

dependencies {
api(group = "io.github.libktx", name = "ktx-app", version = ktxVersion)
Expand Down
6 changes: 3 additions & 3 deletions assets-async/src/main/kotlin/ktx/assets/async/storage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1209,14 +1209,14 @@ class AssetStorage(
/** Must be called with [lock]. Adds [identifier] to [pathToIdentifiers]. */
private fun registerAssetPath(identifier: Identifier<*>) {
val path = identifier.path
val identifiers = pathToIdentifiers.getOrDefault(path, emptyList())
val identifiers = getAssetIdentifiers(path)
pathToIdentifiers[path] = identifiers + listOf(identifier)
}

/** Must be called with [lock]. Removes [identifier] from [pathToIdentifiers]. */
private fun unregisterAssetPath(identifier: Identifier<*>) {
val path = identifier.path
val identifiers = pathToIdentifiers.getOrDefault(path, emptyList())
val identifiers = getAssetIdentifiers(path)
pathToIdentifiers[path] = identifiers.filterNot { it == identifier }
}

Expand All @@ -1225,7 +1225,7 @@ class AssetStorage(
* Do not attempt to modify the returned list. Changing the list might have an unpredictable effect
* on the asset loaders.
*/
fun getAssetIdentifiers(path: String): List<Identifier<*>> = pathToIdentifiers.getOrDefault(path, emptyList())
fun getAssetIdentifiers(path: String): List<Identifier<*>> = pathToIdentifiers[path] ?: emptyList()

/**
* Creates a deep copy of the internal asset storage. Returns an [AssetStorageSnapshot]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
libGroup=io.github.libktx

kotlinVersion=1.8.0
kotlinVersion=1.8.10

dokkaVersion=1.7.20
junitPlatformVersion=1.2.0
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.0-rc4
1.11.0-rc5

0 comments on commit 203c7b0

Please sign in to comment.