Skip to content

Commit

Permalink
Merge pull request #51 from InsanusMokrassar/0.6.0
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
InsanusMokrassar authored Feb 4, 2025
2 parents 14e1471 + c043764 commit 6588502
Show file tree
Hide file tree
Showing 6 changed files with 575 additions and 447 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Navigation Changelog

## 0.6.0

* `Versions`:
* `Kotlin`: `2.0.20` -> `2.1.10`
* `Coroutines`: `1.9.0` -> `1.10.1`
* `Serialization`: `1.7.3` -> `1.8.0`
* `MicroUtils`: `0.22.4` -> `0.24.5`
* `KSLog`: `1.3.6` -> `1.4.1`
* `Koin`: `4.0.0` -> `4.0.2`
* `Compose`: `1.7.0-beta02` -> `1.7.3`
* `Android Core KTX`: `1.13.1` -> `1.15.0`
* `Android Compose Activity`: `1.9.2` -> `1.10.0`
* `Core`:
* `NodeFragment` node and config now setting up with synchronization

## 0.5.7

**THIS UPDATE CONTAINS BREAKING CHANGES RELATED TO `NavigationNodeFactory` things**
Expand Down
51 changes: 47 additions & 4 deletions core/src/androidMain/kotlin/fragments/NodeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,55 @@ import dev.inmo.navigation.core.configs.NavigationNodeDefaultConfig
import kotlinx.coroutines.flow.MutableStateFlow

abstract class NodeFragment<Config : Base, Base : NavigationNodeDefaultConfig> : Fragment() {
protected lateinit var node: AndroidFragmentNode<Config, Base>
private set
protected lateinit var _configState: MutableStateFlow<Config>
private var _node: AndroidFragmentNode<Config, Base>? = null
private var _nodeSyncObject: Object? = Object()
protected var node: AndroidFragmentNode<Config, Base>
get() = _nodeSyncObject ?.let {
synchronized(it) {
while (_node == null && _nodeSyncObject != null) {
it.wait()
}
_node!!
}
} ?: _node!!
private set(value) {
_nodeSyncObject ?.let {
synchronized(it) {
_node = value
it.notifyAll()
_nodeSyncObject = null
}
} ?: let {
_node = value
}
}
private var __configState: MutableStateFlow<Config>? = null
private var _configStateSyncObject: Object? = Object()
protected var _configState: MutableStateFlow<Config>
get() = _configStateSyncObject ?.let {
synchronized(it) {
while (__configState == null && _configStateSyncObject != null) {
it.wait()
}
__configState!!
}
} ?: __configState!!
set(value) {
_configStateSyncObject ?.let {
synchronized(it) {
__configState = value
it.notifyAll()
_configStateSyncObject = null
}
} ?: let {
__configState = value
}
}
protected var config: Config
get() = _configState.value
set(value) { _configState.value = value }
set(value) {
_configState.value = value
}

protected open fun onSetNode(
node: AndroidFragmentNode<Config, Base>,
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ org.gradle.jvmargs=-Xmx1g
# Project data

group=dev.inmo
version=0.5.7
android_code_version=46
version=0.6.0
android_code_version=47
24 changes: 11 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
[versions]

kotlin = "2.0.20"
kotlin-coroutines = "1.9.0"
kotlin-serialization = "1.7.3"
dokka = "1.9.20"
kotlin = "2.1.10"
kotlin-coroutines = "1.10.1"
kotlin-serialization = "1.8.0"
dokka = "2.0.0"

microutils = "0.22.4"
kslog = "1.3.6"
microutils = "0.24.5"
kslog = "1.4.1"
uuid = "0.8.4"

koin = "4.0.0"
compose = "1.7.0-beta02"
koin = "4.0.2"
compose = "1.7.3"

dexcount = "4.0.0"
junit_version = "4.12"
test_ext_junit_version = "1.2.1"
espresso_core = "3.6.1"

android-gradle-plugin = "8.2.2"
android-gradle-plugin = "8.7.+"
android-minSdk = "21"
android-compileSdk = "35"
android-buildTools = "35.0.0"
android-multidex = "2.0.1"

android-core-ktx = "1.13.1"
android-core-ktx = "1.15.0"
android-appcompat = "1.7.0"
android-material = "1.12.0"
android-compose-activity = "1.9.2"
android-compose-activity = "1.10.0"

github-release = "2.5.2"

Expand Down Expand Up @@ -69,7 +68,6 @@ koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }

android-tools-build = { module = "com.android.tools.build:gradle", version.ref = "android-gradle-plugin" }
android-dexcount = { module = "com.getkeepsafe.dexcount:dexcount-gradle-plugin", version.ref = "dexcount" }
android-multidex = { module = "androidx.multidex:multidex", version.ref = "android-multidex" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 6588502

Please sign in to comment.