Skip to content

Releases: freeletics/khonshu

0.18.0

19 Oct 12:59
a1c735f
Compare
Choose a tag to compare

Navigation

  • New: com.freeletics.khonshu.deeplinks Gradle plugin that generates AndroidManifest
    intent-filters based on definitions from a toml file
  • New: The navigation-testing artifact now ships with
    DeepLinkDefinitions.containsAllDeepLinks(Set<DeepLinkHandler>) which checks that the
    deep links defined in the toml are match the given set of DeepLinkHandlers.
  • Breaking: All deep link related classes have been moved to the
    com.freeletics.khonshu.navigation.deeplinks package.

0.17.0

25 Sep 13:51
714975f
Compare
Choose a tag to compare

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 reference NavRoute 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 from com.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 an Activity 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 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 like AppScope
    can now be referenced from Kotlin/JVM modules.

0.16.1

07 Aug 09:02
cecedb7
Compare
Choose a tag to compare

Navigation

  • Added awaitNavigate method to NavigatorTurbine 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

01 Aug 13:20
9801182
Compare
Choose a tag to compare
  • Now uses Kotlin 1.9.0 and Anvil 2.4.7.

Navigation

  • Added navigate method to NavEventNavigator 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 as parentScope.
  • 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 of Closeables

0.15.0

11 Jul 06:54
23076eb
Compare
Choose a tag to compare

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 and BottomSheet destination types haven been replaced by a new Overlay destination.
    This new type generally behaves like the old ones except for not automically wrapping the given content in
    a Dialog or ModalBottomSheetLayout 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's ModalBottomSheet 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 to NavDestinationComponent.

0.14.1

26 May 13:06
beee36f
Compare
Choose a tag to compare

Whetstone

  • Generated composables now you remember when retrieving objects from a component
    to avoid creating new instances on each recomposition.

0.14.0

10 May 10:14
69d3f5c
Compare
Choose a tag to compare

Navigator

  • Removed saveCurrentRootState from navigate(NavRoot, ...) method.
  • Added resetToRoot(NavRoot) as a replacement.
  • Added com.freeletics.mad:navigator-experimental which is an experimental alternative implementation of navigator-compose
    without a dependency on AndroidX navigation. The artifact is source and binary compatible with navigator-compose so it can
    be easily tested by added the following to settings.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

0.13.3

24 Mar 11:59
3eab51f
Compare
Choose a tag to compare

Whetstone

  • Fix calls asComposeState() leading to a crash.

0.13.2

23 Mar 14:57
ea49697
Compare
Choose a tag to compare

Whetstone

  • Fix whetstone-scope artifact being published as aar instead of as jar.

0.13.1

23 Mar 11:29
e01969b
Compare
Choose a tag to compare
  • Updated to Compose 1.4.0 and Accompanist 0.30.0.

StateMachine

  • Added tvosSimulatorArm64 and watchosX64 targets.