Releases: freeletics/khonshu
Releases · freeletics/khonshu
0.35.0
Navigation
- The deep link Gradle plugin now supports being applied to projects with the
com.android.kotlin.multiplatform.libraryplugin. It will also explicitly fail when being
applied to a project with no compatible plugin. - Removed
kotlinx.collections.immutablesince it's not necessary anymore with strong skipping
in compose. APIs that were expecting these are now just using plain interfaces likeSetorList. - Added new
com.freeletics.khonshu:deeplinks-script-jvmartifact that allows easy testing of defined deep links
from the command line. See docs for more information. - Internal changes to use
retainfrom Compose instead ofViewModelclasses for
making objects survive configuration changes. - Replace internal usages of
LocalContextwithLocalActivity.
Codegen
- Added
GlobalGraphProviderinterface. This needs to be implemented by an app'sApplication
class to provide theAppScopegraph (or other graphs in a more complex hierarchy). Overriding
getSystemServiceis not needed anymore.
0.34.4
- Add
destinationsparameter tobuildIntent,buildTaskStackandbuildPendingIntent.
0.34.3
- Fix crash when serializing empty
NavigationResultinstances.
0.34.2
- Resolve issues when using the navigation result APIs in Android host side tests, which had failures
because ofBundleAPIs being called but them not being mocked.
0.34.1
TextResource
- Make
TextResourceSerializableso that it can be used inNavRoute.
0.34.0
Navigation
- Switch from
ParcelabletoSerializablefor saving routes. This means that
routes now need to be annotated with@Serializableinstead of@Parcelize
0.33.1
Navigation
- Add optional
startRootparameter toTestHotNavigator. - Fix issue which caused
handleDeepLinkto fail in tests that use `TestHostNavigator. - Fix issue with
awaitNavigationResultalways failing
0.33.0
Navigation
NavDestinationis nowNavDestination<T : BaseRoute>, from a consumer perspective
the only change is that it now needs to be referenced asNavDestination<*>.- Moved
com.freeletics.khonshu.navigation.ResultNavigator.Companion.registerForNavigationResult
tocom.freeletics.khonshu.navigation.registerForNavigationResult. deliverNavigationResultis now an extension function and needs to be imported.HostNavigator.handleDeepLinkis now an extension function and needs to be imported.- Added
LaunchInfoandIntent.asLaunchInfo()as abstraction aroundIntentto make
testing easier and added an overload ofhandleDeepLinkfor it. - Removed
backPressesand the testing related APIs. UsePredictiveBackHandler,
BackHandleror thenavigation-eventsAPIs instead. - Improve reliability of navigation result APIs by ensuring that results
are not delivered to a wrong entry on the back stack with the same
route class.
Codegen
@NavHostActivitynow providesLaunchInfoinstead ofIntentinto the graph.@NavDestinationis now expectingDestinationNavigatorinstead ofActivityNavigator
removing the need for an explicit binding.- Optimize performance by avoiding unneeded lookups of classes.
- Fix an error that occurred for classed referenced in the codegen annotations which have a package name
where one of the segments contains a soft Kotlin keyword. - Removed
@SingleIn(T::class)annotation from generatedGraphExtension(T::class)interfaces. It's implicitly
added by Metro for the extension scope.
0.32.0
Navigation
- Removed
ResultOwner, useNavigationResultRequest,ActivityResultRequestand
PermissionResultRequestdirectly - The package of the following classes changed to
com.freeletics.khonshu.activity:ActivityRouteActivityNavigatorActivityResultRequestPermissionResultRequest
Codegen
- Compatibility with Metro 0.6.0.
- Replaced Metro
@ContributesGraphExtensionwith the new@GraphExtensionand
@ContributesToon the factory interface.
0.31.2
Navigation
- Throw exception when navigating to a destination with a parent declared in
@NavDestination
that is not present in the current back stack. This avoids a later exception in theNavHost
which is harder to debug because of not knowing how the back stack got into this state.