Releases: freeletics/khonshu
Releases · freeletics/khonshu
0.18.0
Navigation
- New:
com.freeletics.khonshu.deeplinks
Gradle plugin that generates AndroidManifest
intent-filters
based on definitions from atoml
file - New: The navigation-testing artifact now ships with
DeepLinkDefinitions.containsAllDeepLinks(Set<DeepLinkHandler>)
which checks that the
deep links defined in thetoml
are match the given set ofDeepLinkHandlers
. - Breaking: All deep link related classes have been moved to the
com.freeletics.khonshu.navigation.deeplinks
package.
0.17.0
Navigation
com.freeletics.khonshu:navigation
is now a multiplatform module with JVM and Android
targets. The goal is not to support multiplatform navigation (for now at least), but to
make it possible to referenceNavRoute
in Kotlin/JVM modules.
Codegen
- Breaking: Renamed the Compose
@ComposeDestnation
annotation to@NavDestination
and
the Fragment@ComposeDestination
to@ComposeFragmentDestination
. - Breaking: Removed
@ScopeTo
and@ForScope
annotations. They have been replaced by
Anvil's@SingleIn
and@ForScope
fromcom.squareup.anvil:annotations-optional
. - New: The code generation now supports KSP. The functionality is generally the same
- New: A new
@NavHostActivity
annotation was added and will generate anActivity
and the
related boilerplate. Check out the docs for
more details. - It's now possible to use both
@NavDestination
and@ComposeFragmentDestination
at the same
time on the same composable. This allows transitioning from Fragments to Compose more easily. - Removed:
@RendererScreen
and@ComposeScreen
annotations. These allowed generating Fragments
and Composables without relying on Khonshu navigation. We've only ever used this for Activities
which now have a better solution. In the beginning we saw the codegen and navigation as 2
separate things but now the codegen is more of an add-on, so we decided to remove the standalone
mode (codegen without navigation) for codegen. - The following 3 artifacts are now empty and will not be publihshed anymore from the next release
onwards. They have been merged intocom.freeletics.khonshu:codegen-runtime
and depend on it
to make updating easier.com.freeletics.khonshu:codegen-scope
com.freeletics.khonshu:codegen-compose
com.freeletics.khonshu:codegen-fragment
com.freeletics.khonshu:codegen-runtime
is now a multiplatform module with JVM and Android
targets. The code generation still only supports Android but a few classes likeAppScope
can now be referenced from Kotlin/JVM modules.
0.16.1
Navigation
- Added
awaitNavigate
method toNavigatorTurbine
that takes a lambda as parameter. It verifies that one nav event,
containing all navigation actions from the lambda, is being received.
0.16.0
- Now uses Kotlin 1.9.0 and Anvil 2.4.7.
Navigation
- Added
navigate
method toNavEventNavigator
that takes a lambda as parameter. That lambda can
contain multiple navigation actions that will end up being bundled into one event that
Codegen
- Added general
ForScope
annotation. - It's now possible to use the
scope
of another screen using codegen asparentScope
. - The above replace the need to
@NavEntryComponent
and@NavEntry
which have both been removed. - To enable the parent scope mechanism the following the 3 types now need a
ForScope
qualifier:NavEventNavigator
SavedStateHandle
- anything provided into the
Set
ofCloseables
0.15.0
MAD has beed renamed to Khonshu and Whetstone is now just codegen.
Old | New |
---|---|
com.freeletics.mad:navigator-runtime |
com.freeletics.khonshu:navigation |
com.freeletics.mad:navigator-compose |
com.freeletics.khonshu:navigation-compose |
com.freeletics.mad:navigator-experimental |
com.freeletics.khonshu:navigation-experimental |
com.freeletics.mad:navigator-fragment |
com.freeletics.khonshu:navigation-fragment |
com.freeletics.mad:navigator-testing |
com.freeletics.khonshu:navigation-testing |
com.freeletics.mad:whetstone-compiler |
com.freeletics.khonshu:codegen-compiler |
com.freeletics.mad:whetstone-scope |
com.freeletics.khonshu:codegen-scope |
com.freeletics.mad:whetstone-runtime |
com.freeletics.khonshu:codegen-runtime |
com.freeletics.mad:whetstone-runtime-compose |
com.freeletics.khonshu:codegen-compose |
com.freeletics.mad:whetstone-runtime-fragment |
com.freeletics.khonshu:codegen-fragment |
com.freeletics.mad:whetstone-navigation |
Merged into com.freeletics.khonshu:codegen-runtime |
com.freeletics.mad:whetstone-navigation-compose |
Merged into com.freeletics.khonshu:codegen-compose |
com.freeletics.mad:whetstone-navigation-fragment |
Merged into com.freeletics.khonshu:codegen-fragment |
com.freeletics.mad:state-machine |
com.freeletics.khonshu:state-machine |
com.freeletics.mad:state-machine-testing |
com.freeletics.khonshu:state-machine-testing |
com.freeletics.mad:text-resource |
com.freeletics.khonshu:text-resource |
Navigation
- Compose: The
Dialog
andBottomSheet
destination types haven been replaced by a newOverlay
destination.
This new type generally behaves like the old ones except for not automically wrapping the given content in
aDialog
orModalBottomSheetLayout
composable. This gives more flexibility and avoids some issues in the
default implementations, like not being able to show multiple bottom sheet destinations on top of each other.
It is recommended to use something like Material 3'sModalBottomSheet
to display a bottom sheet. - Compose: Removed dependency on Accompanist and usages of experimental APIs.
Codegen
- Updated
DestinationType
for the navigation change above. - Renamed
DestinationComponent
toNavDestinationComponent
.
0.14.1
Whetstone
- Generated composables now you remember when retrieving objects from a component
to avoid creating new instances on each recomposition.
0.14.0
Navigator
- Removed
saveCurrentRootState
fromnavigate(NavRoot, ...)
method. - Added
resetToRoot(NavRoot)
as a replacement. - Added
com.freeletics.mad:navigator-experimental
which is an experimental alternative implementation ofnavigator-compose
without a dependency on AndroidX navigation. The artifact is source and binary compatible withnavigator-compose
so it can
be easily tested by added the following tosettings.gradle
:
gradle.beforeProject {
configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "com.freeletics.mad" && requested.name == "navigator-compose") {
useTarget("com.freeletics.mad:navigator-experimental:${requested.version}")
}
}
}
}
StateMachine
- Added support for all tier 1, 2 and 3 Kotlin/Native targets
0.13.3
Whetstone
- Fix calls
asComposeState()
leading to a crash.
0.13.2
Whetstone
- Fix
whetstone-scope
artifact being published asaar
instead of asjar
.
0.13.1
- Updated to Compose 1.4.0 and Accompanist 0.30.0.
StateMachine
- Added
tvosSimulatorArm64
andwatchosX64
targets.