Change Log¶
0.29.0 (2024-11-08)¶
Navigation¶
- Replaced
navigateToRoot
andresetToRoot
withswitchBackStack
andshowRoot
which have more predictable behavior and won’t throw exceptions when called in certain back stack states. - Renamed
replaceAll
toreplaceAllBackStacks
. - Fixed an issue that would cause delayed state updates after a predictive back gesture. These delayed state updates could cause the app to be unresponsive for a moment or that the same back navigation was repeated.
- Removed the deprecated
NavEventNavigator
.
Codegen¶
- Remove support for running as an Anvil plugin. Khoshu’s codegen now always needs to be used through KSP.
State Machine¶
- Added Wasm/WASI target.
0.28.3 (2024-08-05)¶
Codegen¶
- Fix crash when
StackSnapshot.entryFor
is called for the start destination while being on a different back stack. - Fix KSP2 support for version 2.0.0-1.0.23 and newer.
0.28.2 (2024-07-22)¶
Navigation¶
- Avoid composable of previous being re-created at the end of the predictive back animation. This was causing a visible blinking in the UI.
- Fix part of the predictive back animation being run when using 3 button navigation.
0.28.1 (2024-07-19)¶
Navigation¶
- Fix race condition that would cause custom back handling to sometimes not work.
0.28.0 (2024-07-17)¶
Navigation¶
- Implement predictive back support. When predictive back is enabled by setting
android:enableOnBackInvokedCallback="true"
in the AndroidManifest, Khonshu will automatically handle back presses with the predictive back animation to the previous destination.
Codegen¶
- Support for KSP2.
0.27.1 (2024-06-21)¶
ActivityRoute.buildIntent()
has been changed toActivityRoute.buildIntent(context: Context)
to make using it easier.
0.27.0 (2024-06-20)¶
The documentation has been updated.
Navigation¶
- Renamed
ActivityResultNavigator
base class toActivityNavigator
and movednavigateTo(ActivityRoute)
to it. With this change the limitation that anyIntent
needs to useFLAG_ACTIVITY_NEW_TASK
is removed. - Removed
ActivityDestination
. InsteadActivityRoute
implementations now are building the fullIntent
. ForInternalActivityRoute
the route is stillIntent
automatically added to theIntent
and theIntent
is automatically limited to the current package to prevent hijacking of actions. - Removed the ability to add
ActivityRoute
to aDeepLink
. The same can be achieved by just launching 2 intents or usingTaskStackBuilder
.
0.26.0 (2024-06-12)¶
Navigation¶
- Introduces
HostNavigator
. This was previously an internal type used withinNavHost
to execute navigation events. It’s now possible to create aHostNavigator
withrememberHostNavigator(...)
, pass that instance toNavHost
and use it to navigate directly without the use of navigation events. It is safe to referenceHostNavigator
outside the UI layer. DestinationNavigator
is a replacement forNavEventNavigator
that delegates toHostNavigator
, which means it also works without navigation events. The advantage of using this over usingHostNavigator
directly is thatDestinationNavigator
supports activity results, whichHostNavigator
doesn’t.- The
navigate {}
function that allows grouping multiple navigation events is now more efficient. TheNavHost
will only be updated once at the end and not between the actions of such a group. NavEventNavigator
will be removed in one of the next releases.
Codegen¶
- A
HostNavigator
is automatically created in theNavHostActivity
component. - It’s required that a
NavRoot
is provided into the scope of aNavHostActivity
. - Each
NavDestination
now requires anActivityResultNavigator
to be provided into the scope (previouslyNavEventNavigator
was required).
0.25.0 (2024-05-17)¶
Navigation¶
- Internal improvements on how the back stack is managed.
Codegen¶
- Remove the need to do a lookup for the current destination on the back stack.
- Improve reliability of finding the parent scope on the back stack.
0.24.0 (2024-05-15)¶
Navigation¶
- The
destinationChangedCallback
parameter ofNavHost
now has(NavRoot, BaseRoute) -> Unit
signature, whereNavRoot
is the current root. If that root is the current destination both parameters are the same. - Khonshu’s own navigation implementation has been moved from
navigation-experimental
into the mainnavigation
artifact. - Removed
navigation-compose
artifact that was based on androidx.navigation.
Codegen¶
- The generated component for
@NavHostActivity
now contains the Activity’sIntent
instead of aBundle
. - Removed
experimentalNavigation
option and@UseExperimentalNavigation
. The generated code will now always use Khonshu’s built-in navigation instead of androidx.navigation. - Updated Anvil to v2.5.0-beta09.
0.23.1 (2024-03-08)¶
Navigation¶
- Fix an issue where
SaveableStateHolder
would not be properly cleared when the destination is removed from the back stack after configuration changes. Thanks to @hoc081098 for the contribution.
Codegen¶
- Add
remember
for the set of destinations, deep link handlers and deep link prefixes obtained from the generated component, to avoid creating a newNavigationExecutor
on re-compositions. - Remove
Experimental
prefix from generated code whenexperimentalNavigation
is `true.
0.23.0 (2024-03-01)¶
- Update Compose to 1.6.0
Codegen¶
- Update to Anvil 2.5.0-beta03 and use new
GeneratedFileWithSources
to support incremental compilation. - When setting
experimentalNavigation
in@NavHostActivity
totrue
the generated code will contain both the setup for androidx.navigation and experimental navigation. This allows switching between them at runtime. For this it’s required to provide a boolean to theNavHostActivity.scope
that uses@UseExperimentalNavigation
as qualifier.
StateMachine¶
- Add
wasmJs
target.
0.22.2 (2024-02-19)¶
Codegen¶
- Fix crash in
StateMachine
collection when lifecycle changes around the same time as the emission of a new state.
0.22.1 (2024-02-16)¶
Codegen¶
- Update
StateMachine
collection to start immediately when the generated composable is added to the composition. Previously this only happened inonResume
for theNavBackStackEntry
that the composable is tied too which caused a visible delay in the content being shown. Whenever the lifecycle is paused afterwards the collection is stopped until the next resume.
0.22.0 (2024-02-02)¶
Navigation¶
- Breaking:
NavDestination
,ScreenDestination
,OverlayDestination
,ActivityDestination
andNavigationSetup
have been moved to thecom.freeletics.khonshu.navigation
package insidenavigation
. Previously these were duplicated betweennavigation-compose
andnavigation-experimental
. - Breaking: Moved
navigation-compose
NavHost
tocom.freeletics.khonshu.navigation.androidx
andnavigation-experimental
NavHost
tocom.freeletics.khonshu.navigation
. This now allows to use the AndroidX based and the experimental navigation implementation in the same app and switch between them with a feature flag. - New: Added
replaceAll
toNavEventNavigator
to replace the current back stack including the start destination with the givenNavRoot
. Thanks to @hoc081098 for the contribution. - Removed: Deprecated overload of
NavHost
that allowed usingNavRoute
as start destination. - Removed:
navigation-fragment
andFragment
navigation support. - Removed:
navigation-androidx
has been inlined intonavigation-compose
.
Codegen¶
- Breaking: The
NavDestination
andNavHostActivity
annotations as well asSimpleNavHost
have been moved tocom.freeletics.khonshu.codegen
. - Added:
NavHostActivity
has anexperimentalNavigation
boolean to generate code with anavigation-experimental
NavHost
. - Added:
ActivityScope
and customActivity
scopes can now be used asparentScope
for destinations. - Reduce the number of re-compositions in the generated code by remembering the
sendAction
lambda. - Generated code for
NavHostActivity
is now usingNavHostTransitionAnimations.noAnimations()
. - Removed:
@ComposeFragmentDestination
andFragment
codegen support.
0.21.0 (2023-12-07)¶
- Note:
Fragment
navigation and codegen have been deprecated and will be removed in the next release. - Updated Kotlin to 1.9.21.
Navigation¶
- Breaking:
navigateBackTo<...>(...)
is now an extension method and might need to be explicitly imported. - Breaking: The
Set
parameters ofNavHost
have been replaced withImmutableSet
to allow the compose compiler to recognize these as immutable. - Breaking: Removed
navController
parameter fromHavHost
. Passing a manually createdNavHostController
introduced issues like breaking deep link handling. - New:
NavHost
(both the AndroidX and the experimental variant) now supports optionally passing aNavEventNavigator
. This can be used instead ofnavController
to navigate from outside theNavHost
(e.g. for bottom navigation). TheNavHost
takes care of callingNavigationSetup
for the passed navigator. - New:
NavHost
fromnavigation-experimental
now also supports passing a Modifier to it. - New: The AndroidX
NavHost
will internally callNavigation.setViewNavController
on the containerView
. This exists primarily for an easier migration fromFragment
navigation to Compose navigation.
Codegen¶
- New: The
NavHostActivity
codegen now supports passing aModifier
toNavHost
. - New: The
NavHostActivity
codegen automatically provides anImmutableSet
for destinations, deep link handlers and deep link prefixes.
0.20.0 (2023-11-17)¶
Navigation¶
- New Add
Modifier
parameter toNavHost
Composable. - New Add
NavHost
overloaded function that acceptsNavRoute
instead ofNavRoot
- New Add optional
transitionAnimations
parameter toNavHost
Composable functions. Animations can be overriden withNavHostDefaults.transitionAnimations
or disabled withNavHostTransitionAnimations.noAnimations
. Default animations are the same as default animations in AndroidX’sNavHost
.
0.19.0 (2023-11-09)¶
Navigation¶
- New: Allow passing an already created
NavController
toNavHost
. This allows controlling the navigation from outside the host, for example from a bottom bavigation or navigation drawer. - Fixed: A crash that happened in
NavHost
on re-compositions. - Improved how nav events are collected internally.
Thanks to @hoc081098 and @hoangchungk53qx1 for the contributions.
Codegen¶
- New: Added an
Overlay
marker interface that can be added to routes to indicate to the code generation that this should use anOverlayDestination
(DialogDestination
for Fragments). - Breaking: Removed
destinationType
in favor of the new interface. - Breaking: Removed support for
@RendererDestination
.
0.18.0 (2023-10-19)¶
Navigation¶
- New:
com.freeletics.khonshu.deeplinks
Gradle plugin that generates AndroidManifestintent-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 (2023-09-25)¶
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 published anymore from the next release
onwards. They have been merged into
com.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 (2023-08-07)¶
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 (2023-08-01)¶
- 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 (2023-07-11)¶
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 (2023-05-26)¶
Whetstone¶
- Generated composables now you remember when retrieving objects from a component to avoid creating new instances on each recomposition.
0.14.0 (2023-05-10)¶
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 (2023-03-24)¶
Whetstone¶
- Fix calls
asComposeState()
leading to a crash.
0.13.2 (2023-03-23)¶
Whetstone¶
- Fix
whetstone-scope
artifact being published asaar
instead of asjar
.
0.13.1 (2023-03-23)¶
- Updated to Compose 1.4.0 and Accompanist 0.30.0.
StateMachine¶
- Added
tvosSimulatorArm64
andwatchosX64
targets.
0.13.0 (2023-03-14)¶
Navigator¶
- Added proguard rules to not obfuscate the names of
NavRoute
,NavRoot
andActivityRoute
subclasses.
Whetstone¶
- The
state
andsendAction
parameters in annotated composables are now optional and only need to be specified if they are needed - The
state
andsendAction
parameters of annotated composables can now have different names - Automatically discover
ViewRenderer.Factory
subclass nested inside the annotatedViewRenderer
and removed the now obsoleterendererFactory
parameter
0.12.0 (2023-02-13)¶
Navigator¶
- Added docs for deep link support.
- Internal changes and refactorings.
Whetstone¶
- BREAKING simplified integration with the navigator library
- removed the
@NavDestination
annotation - added
@ComposeDestination
and@RendererDestination
as replacements - these new annotations also replace
@ComposeScreen
/@ComposeFragment
/@RendererFragment
so that always just one Whetstone annotation is needed per screen route
andscope
are combined into aroute
parameter which removes the need to define scope classes, theNavRoute
orNavRoot
serves both purposes- the previous point means that the same
route
will also need to be used in any place that that requires scope markers like@ScopeTo
,@ContributesTo
or@ContributesBinding
- New
AppScope
scope marker class. This can be used as the scope marker for an app level component. All whetstone annotations use it as default value forparentScope
anddestinationScope
, so those two don’t need to be explicitly specified anymore after adopintAppScope
. - Fixed compiler warning produced by generated code.
- Generated Fragments for compose now use
DisposeOnViewTreeLifecycleDestroyed
.
StateMachine¶
- added Kotlin/JS as target
0.11.0 (2023-02-06)¶
Navigator¶
- new
navigator-testing
artifact to testNavEventNavigator
, see docs NavEvent
and other APIs that were marked as visible for testing are now marked as internal- compose navigation APIs are not annotated with
ExperimentalMaterialNavigationApi
anymore
StateMachine¶
- new
state-machine-testing
artifact, see docs
Whetstone¶
- support for Anvil 2.4.4
- injecting into
Composable
functions now supports generic types - added docs for
Closeable
support which allows cleaning up resources - Internal: clean up and streamline code in the code generator
0.10.1 (2023-01-13)¶
Navigator¶
- fix crash when
DeepLink
contains anActivityRoute
0.10.0 (2023-01-10)¶
Navigator¶
- added support for handling deep links, see
DeepLink
andDeepLinkHandler
(more docs coming soon) navigateToRoot
now has asaveCurrentRootState
parameter which defaults to true (matches the previous implicit behavior). Can be set to false to clear the current back stack.navigateBackTo
now does not allow passing aNavRoot
as target anymore. UsenavigateToRoot<...>(false, false)
insteadActivityRoute
is now alwaysParcelable
and has been split into 2 sub-classes/interfacesInternalActivityRoute
forActivity
classes inside the app andExternalActivityRoute
for Intents that leave the appPermissionResult
is now a sealed class instead of an enum class. TheDENIED
andDENIED_FOREVER
values were merged into a singleDenied
subclass that has ashowRationale
boolean property. This beingfalse
would match the old denied forever value. The reason for this change is thatDenied
withshowRationale
beingfalse
does not necessarily mean denied forever on newer platform versions, it could also mean that the first ever permission prompt was dismissed without making a choice.- Make a few APIs that were not meant to be public internal or mark them as such
- Internal: share more code between the compose and fragment implementations
- Internal: unify handling of permission results and activity results
Whetstone¶
- Remove dependency on AndroidX navigation. Whetstone’s navigation artifacts now only rely on our own navigator APIs
- Internal: Stop generating view models for each annotated screen. Instead use a runtime class to hold on to components
0.9.1 (2022-11-23)¶
Whetstone¶
- Fix action lambda in Compose code generation
0.9.0 (2022-11-22)¶
Whetstone¶
- Add support for injecting dependencies into Composable functions, which are annotated with
@ComposeScreen
or@ComposeFragment
Navigator¶
- Refactor runtime module to remove androidx navigation
0.8.1 (2022-11-08)¶
Whetstone¶
- Update codegen to use new
Bundle.requireRoute
function
Other¶
- New module for shared androidx navigation
- Deploy docs directly from Github Actions
0.8.0 (2022-11-08)¶
Navigator¶
- Add
Activity.getRoute()
function than returns nullableActivityRoute
- Use
requireNotNull
contracts forrequireRoute
functions - Check for route to be not null before adding it to
Intent
inCustomActivityNavigator
- Move generated
DestinationComponent
to the nav entry generator. This reduces how often we generate the contributedDestinationComponent
by generating it only together with theNavEntryComponent
that needs it.
Whetstone¶
- Rename
findDependencies
tofindComponentByScope
. After getting rid of component dependencies in favor of subcomponents our find methods were not named correctly anymore. - Fix
Closeable
typo - Remove unused
SavedStateRegistryOwner
- Explicitly require a renderer factory to extend
ViewRenderer.Factory
. We relied on some custom factories internally. Those are not necessary anymore and we can add the constraint to the annotation.
Dependencies¶
- Update
kotlin
to v1.7.20 - Update dependency
app.cash.turbine:turbine
to v0.12.1 - Update dependency
androidx.fragment:fragment
to v1.5.4 - Update dependency
com.google.accompanist:accompanist-navigation-material
to v0.27.0 - Update
androidx-compose-runtime
to v1.3.0 - Update
androidx-navigation
to v2.5.3 - Update
androidx-activity
to v1.6.1 - Update dependency
org.jetbrains.kotlinx.binary-compatibility-validator
to v0.12.1 - Update dependency
com.android.library
to v7.3.1 - Update dependency
org.jetbrains.dokka
to v1.7.20 - Update dependency
com.google.dagger:dagger
to v2.44 - Update dependency
androidx.core:core
to v1.9.0 - Update dependency
com.vanniktech.maven.publish
to v0.22.0 - Update
androidx-navigation
to v2.5.2 - Update actions/setup-java action to v3
- Update actions/setup-python action to v4
- Update actions/checkout action to v3
- Update dependency
com.autonomousapps.dependency-analysis
to v1.13.1 - Update
anvil
to v2.4.2
Other¶
- Migrate to Gradle version catalog
0.7.2 (2022-08-12)¶
Navigator¶
- Fragment: Fix that the start destination sometimes does not have any arguments
- Fix an issue that caused navigation results to be delivered multiple times
0.7.1 (2022-07-12)¶
- Sources are now visible in Android Studio again
Navigator¶
- Fix a crash in the navigation result APIs
0.7.0 (2022-07-04)¶
Updated to Kotlin 1.7.0 and Compose compiler 1.2.0.
Whetstone¶
- Instead of generating full components Whetstone is now using subcomponents with Anvil’s
@ContributesSubcomponent
with aParentComponent
interface that is automatically contributed to theparentScope
. This allows to removekapt
from modules using Whetstone and let Anvil do all of the factory generation - Because of that the
dependencies
parameter was removed from all annotations - To avoid collisions between subcomponents the
SavedStateHandle
as well as theNavRoute
orBundle
that are automatically available in generated@NavEntryComponent
s now have aNavEntry(ScopeOfNavEntryComponent::class)
qualifier on them - The
rxJavaEnabled
andcoroutinesEnabled
parameters were removed from all annotations. For how to replace them, see the 0.5.0 changelog.
Navigator¶
- removed dependency on
LiveData
0.6.0 (2022-06-28)¶
Whetstone¶
- For components generated through
@NavEntryComponent
the automatically providedSavedStateHandle
,NavRoute
,Set<Closeable>
,CoroutineScope
andCompositeDisposable
objects now use@NavEntry(Scope::class)
as qualifier
0.5.0 (2022-06-21)¶
Navigator¶
- fix an issue where an
ActivityRoute
that is alsoParcelable
would not be added to theIntent
extras
Whetstone¶
- It is now possible to provide
Closeable
objects into a set and have the generatedViewModel
close all of these when it is cleared. This is meant as a replacement for therxJavaEnabled
andcoroutinesEnabled
flags. You can replace the flags with the following snippet:
@ContributesTo(MyScreenScope::class)
object {
@Provides
@ScopeTo(MyScreenScope::class)
fun provideCompositeDisposable() = CompositeDisposable()
@Provides
@IntoSet
fun bindCompositeDisposable(disposable: CompositeDisposable) = Closeable { disposable.clear() }
@Provides
@ScopeTo(MyScreenScope::class)
fun provideCoroutineScope() = MainScope()
@Provides
@IntoSet
fun bindCoroutineScope(scope: CoroutineScope) = Closeable { scope.cancel() }
}
- removed
enableInsetHandling
parameter from@ComposeFragment
, Compose 1.2.0 provides new inset APIs that work out of the box without any special integration and the Accompanist Inset library was deprecated
0.4.0 (2022-06-13)¶
Navigator¶
- New
ActivityRoute
interface that has to be used forActivity
destinations. This allows creating afillInIntent
with parameters to the routes which will be merged with the destinationIntent
. Before this it was not possible to dynamically add values to theIntent
. See the README - New
Activity.requireRoute
extension function that allows obtaining theActivityRoute
that was used to navigate to thisActivity
. NavHost
now has adestinationChangedCallback
parameter to receive destination changes for debugging purposesNavHost
now has parameters to change the styling of its bottom sheet
Whetstone¶
- Added README with documentation
- Fix code generation in Kotlin 1.6.20
0.3.1 (2022-04-20)¶
Whetstone¶
- fix a crash when
@NavEntryComponent
is completely unused - fix a crash when using Whetstone with Compose navigation
0.3.0 (2022-04-13)¶
Navigator¶
A new library that is a wrapper around AndroidX navigation that allows to separate navigation logic from the UI layer and provides a scalable approach to type safe navigation in a highly modularized code base. For more information check out it’s README.
implementation 'com.freeletics.mad:navigator:0.3.0'
// when using composables for navigation
implementation 'com.freeletics.mad:navigator-compose:0.3.0'
// when using fragments for navigation (even if these contain composables)
implementation 'com.freeletics.mad:navigator-fragment:0.3.0'
Whetstone¶
Experimental release of an Anvil plugin that generates components and more for a screen. The experimental status only means that this will have breaking changes in the future and functionality might change significantly and that the documentation is missing (other than comments on the code). It is already being used in production at Freeletics.
0.2.0 (2021-06-18)¶
- update
StateMachine.state
to returnStateFlow<State>
instead ofFlow<State>
0.1.1 (2021-06-16)¶
- fix windows artifact of
state-machine
not being published
0.1.0 (2021-06-16)¶
- initial release of the
state-machine
artifact - initial release of the
text-resource
artifact