A simple navigation library for Android 🗺️

Related tags

Navigation Bar Enro
Overview

Maven Central

Enro 🗺️

A simple navigation library for Android

"The novices’ eyes followed the wriggling path up from the well as it swept a great meandering arc around the hillside. Its stones were green with moss and beset with weeds. Where the path disappeared through the gate they noticed that it joined a second track of bare earth, where the grass appeared to have been trampled so often that it ceased to grow. The dusty track ran straight from the gate to the well, marred only by a fresh set of sandal-prints that went down, and then up, and ended at the feet of the young monk who had fetched their water." - The Garden Path

Features

  • Navigate between Fragments or Activities seamlessly

  • Describe navigation destinations through annotations or a simple DSL

  • Create beautiful transitions between specific destinations

  • Remove navigation logic from Fragment or Activity implementations

  • (Experimental) @Composable functions as navigation destinations, with full interoperability with Fragments and Activities

Using Enro

Gradle

Enro is published to Maven Central. Make sure your project includes the mavenCentral() repository, and then include the following in your module's build.gradle:

dependencies {
    implementation "dev.enro:enro:1.3.7" // or use 1.4.0-beta04 for experimental Compose support
    kapt "dev.enro:enro-processor:1.3.7" // or use 1.4.0-beta04 for experimental Compose support
}
Information on migration from JCenter and versions of Enro before 1.3.0

Enro was previously published on JCenter, under the group name `nav.enro`. With the move to Maven Central, the group name has been changed to `dev.enro`, and the packages within the project have been updated to reflect this.

If you require older versions of Enro, these remain available on Github Packages.

1. Define your NavigationKeys

@Parcelize
data class MyListKey(val listType: String): NavigationKey

@Parcelize
data class MyDetailKey(val itemId: String, val isReadOnly): NavigationKey

@Parcelize
data class MyComposeKey(val name: String): NavigationKey

2. Define your NavigationDestinations

@NavigationDestination(MyListKey::class)
class ListFragment : Fragment()

@NavigationDestination(MyDetailKey::class)
class DetailActivity : AppCompatActivity()

@Composable
@ExperimentalComposableDestination
@NavigationDestination(MyComposeKey::class)
fun MyComposableScreen() { }

3. Annotate your Application as a NavigationComponent, and implement the NavigationApplication interface

@NavigationComponent
class MyApplication : Application(), NavigationApplication {
    override val navigationController = navigationController()
}

4. Navigate!

@NavigationDestination(MyListKey::class)
class ListFragment : ListFragment() { 
    val navigation by navigationHandle<MyListKey>()
    
    fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        val listType = navigation.key.listType
        view.findViewById<TextView>(R.id.list_title_text).text = "List: $listType"
    }
    
    fun onListItemSelected(selectedId: String) {
        val key = MyDetailKey(itemId = selectedId)
        navigation.forward(key)
    }
}

@Composable
@ExperimentalComposableDestination
@NavigationDestination(MyComposeKey::class)
fun MyComposableScreen() {
    val navigation = navigationHandle<MyComposeKey>()

    Button(
        content = { Text("Hello, ${navigation.key}") },
        onClick = {
            navigation.forward(MyListKey(...))
        }
    )
}

FAQ

Minimum SDK Version

Enro supports a minimum SDK version of 16. However, support for SDK 16 was only recently added and targetting any SDK below 21 should be considered experimental. If you experience issues running on an SDK below 21, please report a GitHub issue.

How well does Enro work alongside "normal" Android Activity/Fragment navigation?

Enro is designed to integrate well with Android's default navigation. It's easy to manually open a Fragment or Activity as if Enro itself had performed the navigation. Create a NavigationInstruction object that represents the navigation, and then add it to the arguments of a Fragment, or the Intent for an Activity, and then open the Fragment/Activity as you normally would.

Example:

val instruction = NavigationInstruction.Forward(
    navigationKey = MyNavigationKey(...)
)
val intent = Intent(this, MyActivity::class).addOpenInstruction(instruction)
startActivity(intent)

How does Enro decide if a Fragment, or the Activity should receive a back button press?

Enro considers the primaryNavigationFragment to be the "active" navigation target, or the current Activity if there is no primaryNavigationFragment. In a nested Fragment situation, the primaryNavigationFragment of the primaryNavigationFragment of the ... is considered "active".

What kind of navigation instructions does Enro support?

Enro supports three navigation instructions: forward, replace and replaceRoot.

If the current navigation stack is A -> B -> C -> then:
forward(D) = A -> B -> C -> D ->
replace(D) = A -> B -> D ->
replaceRoot(D) = D ->

Enro supports multiple arguments to these instructions.
forward(X, Y, Z) = A -> B -> C -> X -> Y -> Z ->
replace(X, Y, Z) = A -> B -> X -> Y -> Z ->
replaceRoot(X, Y, Z) = X -> Y -> Z ->

How does Enro support Activities navigating to Fragments?

When an Activity executes a navigation instruction that resolves to a Fragment, one of two things will happen:

  1. The Activity's navigator defines a "container" that accepts the Fragment's type, in which case, the Fragment will be opened into the container view defined by that container.
  2. The Activity's navigation does not define a fragment host that acccepts the Fragment's type, in which case, the Fragment will be opened into a new, full screen Activity.

How do I deal with Activity results?

Enro supports any NavigationKey/NavigationDestination providing a result. Instead of implementing the NavigationKey interface on the NavigationKey that provides the result, implement NavigationKey.WithResult where T is the type of the result. Once you're ready to navigate to that NavigationKey and consume a result, you'll want to call "registerForNavigationResult" in your Fragment/Activity/ViewModel. This API is very similar to the AndroidX Activity 1.2.0 ActivityResultLauncher.

Example:

@Parcelize
class RequestDataKey(...) : NavigationKey.WithResult<Boolean>()

@NavigationDestination(RequestDataKey::class)
class MyResultActivity : AppCompatActivity() {
    val navigation by navigationHandle<RequestSomeData>()

    fun onSendResultButtonClicked() {
        navigation.closeWithResult(false)
    }
}

@NavigationDestination(...)
class MyActivity : AppCompatActivity() {
    val requestData by registerForNavigationResult<Boolean> {
        // do something!
    }

    fun onRequestDataButtonClicked() {
        requestData.open(RequestDataKey(/*arguments*/))
    }
}

How do I do Master/Detail navigation

Enro has a built in component for this. If you want to build something more complex than what the built-in component provides, you'll be able to use the built-in component as a reference/starting point, as it is built purely on Enro's public API

How do I handle multiple backstacks on each page of a BottomNavigationView?

Enro has a built in component for this. If you want to build something more complex than what the built-in component provides, you'll be able to use the built-in component as a reference/starting point, as it is built purely on Enro's public API

I'd like to do shared element transitions, or do something special when navigating between certain screens

Enro allows you to define "NavigationExecutors" as overrides for the default behaviour, which handle these situations.

There will be an example project that shows how this all works in the future, but for now, here's a basic explanation:

  1. A NavigationExecutor is typed for a "From", an "Opens", and a NavigationKey type.
  2. Enro performs navigation on a "NavigationContext", which is basically either a Fragment or a FragmentActivity
  3. A NavigationExecutor defines two methods
    • open, which takes a NavigationContext of the "From" type, a Navigator for the "Opens" type, and a NavigationInstruction (i.e. the From context is attempting to open the Navigator with the input NavigationInstruction)
    • close, which takes a NavigationContext of the "Opens" type (i.e. you're closing what you've already opened)
  4. By creating a NavigationExecutor between two specific screens and registering this with the NavigationController, you're able to override the default navigation behaviour (although you're still able to call back to the DefaultActivityExecutor or DefaultFragmentExecutor if you need to)
  5. See the method in NavigationControllerBuilder for override
  6. When a NavigationContext decides what NavigationExecutor to execute an instruction on, Enro will look at the NavigationContext originating the NavigationInstruction and then walk up toward's it's root NavigationContext (i.e. a Fragment will check itself, then its parent Fragment, and then that parent Fragment's Activity), checking for an appropriate override along the way. If it finds no override, the default will be used. NavigationContexts that are the children of the current NavigationContext will not be searched, only the parents.

Example:

// This override will place the "DetailFragment" into the container R.id.detail, 
// and when it's closed, will set whatever Fragment is in the R.id.master container as the primary navigation fragment
override<MasterDetailActivity, DetailFragment>(
    launch = {
        val fragment =  DetailFragment().addOpenInstruction(it.instruction)
        it.fromContext.childFragmentManager.beginTransaction()
            .replace(R.id.detail, fragment)
            .setPrimaryNavigationFragment(fragment)
            .commitNow()
    },
    close = { context ->
        context.fragment.parentFragmentManager.beginTransaction()
            .remove(context.fragment)
            .setPrimaryNavigationFragment(context.parentActivity.supportFragmentManager.findFragmentById(R.id.master))
            .commitNow()
    }
)

My Activity crashes on launch, what's going on?!

It's possible for an Activity to be launched from multiple places. Most of these can be controlled by Enro, but some of them cannot. For example, an Activity that's declared in the manifest as a MAIN/LAUNCHER Activity might be launched by the Android operating system when the user opens your application for the first time. Because Enro hasn't launched the Activity, it's not going to know what the NavigationKey for that Activity is, and won't be able to read it from the Activity's intent.

Luckily, there's an easy solution! When you declare an Activty or Fragment, you are able to do a small amount of configuration inside the navigationHandle block using the defaultKey method. This method takes a NavigationKey as an argument, and if the Fragment or Activity is opened without being passed a NavigationKey as part of its arguments, the value passed will be treated as the NavigationKey. This could occur because of an Activity being launched via a MAIN/LAUNCHER intent filter, via a standard Intent, or via a Fragment being added directly to a FragmentManager without any NavigationInstruction being applied. In other words, any situation where Enro is not used to launch the Activity or Fragment.

Example:

@Parcelize
class MainKey(isDefaultKey: Boolean = false) : NavigationKey

@NavigationDestination(MainKey::class)
class MainActivity : AppCompatActivity() {
    private val navigation by navigationHandle<MainKey> {
        defaultKey(
            MainKey(isDefaultKey = true)
        )
    }
}

Why would I want to use Enro?

Support the navigation requirements of large multi-module Applications, while allowing flexibility to define rich transitions between specific destinations

A multi-module application has different requirements to a single-module application. Individual modules will define Activities and Fragments, and other modules will want to navigate to these Activities and Fragments. By detatching the NavigationKeys from the destinations themselves, this allows NavigationKeys to be defined in a common/shared module which all other modules depend on. Any module is then able to navigate to another by using one of the NavigationKeys, without knowing about the Activity or Fragment that it is going to. FeatureOneActivity and FeatureTwoActivity don't know about each other, but they both know that FeatureOneKey and FeatureTwoKey exist. A simple version of this solution can be created in less than 20 lines of code.

However, truly beautiful navigation requires knowledge of both the originator and the destination. Material design's shared element transitions are an example of this. If FeatureOneActivity and FeatureTwoActivity don't know about each other, how can they collaborate on a shared element transition? Enro allows transitions between two navigation destinations to be overridden for that specific case, meaning that FeatureOneActivity and FeatureTwoActivity might know nothing about each other, but the application that uses them will be able to define a navigation override that adds shared element transitions between the two.

Allow navigation to be triggered at the ViewModel layer of an Application

Enro provides a custom extension function similar to AndroidX's by viewModels(), called by enroViewModels(), which works in the exact same way. However, when you use by enroViewModels() to construct a ViewModel, you are able to use a by navigationHandle<NavigationKey>() statement within your ViewModel. This NavigationHandle works in the exact same way as an Activity or Fragment's NavigationHandle, and can be used in the exact same way.

This means that your ViewModel can be put in charge of the flow through your Application, rather than needing to use a LiveData<NavigationEvent>() (or similar) in your ViewModel. When we use things like LiveData<NavigationEvent>() we are able to test the ViewModel's intent to navigate, but there's still the reliance on the Activity/Fragment implementing the response to the navigation event correctly. In the case of retrieving a result from another screen, this gap grows even wider, and there becomes an invisible contract between the ViewModel and Activity/Fragment: The ViewModel expects that if it sets a particular NavigationEvent in the LiveData, that the Activity/Fragment will navigate to the correct place, and then once the navigation has been successful and a result has been returned, that the Activity/Fragment will call the correct method on the ViewModel to provide the result. This invisible contract results in extra boilerplate "wiring" code, and a gap for bugs to slip through. Instead, using Enro's ViewModel integration, you allow your ViewModel to be precise and clear about it's intention, and about how to handle a result.

Experimental Compose Support

The most recent version of Enro (1.4.0-beta04) adds experimental support for directly marking @Composable functions as Navigation Destinations.

To support a Composable destination, you will need to add both an @NavigationDestination annotation, and a @ExperimentalComposableDestination annotation. Once the Composable support moves from the "experimental" stage into a stable state, the @ExperimentalComposableDestination annotation will be removed.

Here is an example of a Composable function being used as a NavigationDestination:

@Composable
@ExperimentalComposableDestination
@NavigationDestination(MyComposeKey::class)
fun MyComposableScreen() {
    val navigation = navigationHandle<MyComposeKey>()

    Button(
        content = { Text("Hello, ${navigation.key}") },
        onClick = {
            navigation.forward(MyListKey(...))
        }
    )
}

Nested Composables

Enro's Composable support is based around the idea of an "EnroContainer" Composable, which can be added to a Fragment, Activity or another Composable. The EnroContainer works much like a FrameLayout being used as a container for Fragments.

Here is an example of creating a Composable that supports nested Composable navigation in Enro:

@Composable
@ExperimentalComposableDestination
@NavigationDestination(MyComposeKey::class)
fun MyNestedComposableScreen() {
    val navigation = navigationHandle<MyComposeKey>()
    val containerController = rememberEnroContainerController(
        accept = { it is NestedComposeKey }
    )

    Column {
        EnroContainer(
            controller = containerController
        )
        Button(
            content = { Text("Open Nested") },
            onClick = {
                navigation.forward(NestedComposeKey())
            }
        )
    }
}

@Composable
@ExperimentalComposableDestination
@NavigationDestination(NestedComposeKey::class)
fun NestedComposableScreen() = Text("Nested Screen!")

In the example above, we have defined an Enro Container Controller which will accept Navigation Keys of type "NestedComposeKey". When the user clicks on the button "Open Nested", we execute a forward instruction to a NestedComposeKey. Because there is an available container which accepts NestedComposeKey instructions, the Composable for the NestedComposeKey (NestedComposableScreen in the example above) will be placed inside the EnroContainer defined in MyNestedComposableScreen.

EnroContainerControllers can be configured to have some instructions pre-launched as their initial state, can be configured to accept some/all/no keys, and can be configured with an "EmptyBehavior" which defines what will happen when the container becomes empty due to a close action. The default close behavior is "AllowEmpty", but this can be set to "CloseParent", which will pass the close instruction up to the Container's parent, or "Action", which will allow any custom action to occur when the container becomes empty.

Dialog and BottomSheet support

Composable functions declared as NavigationDestinations can be used as Dialog or ModalBottomSheet type destinations. To do this, make the Composable function an extension function on either DialogDestination or BottomSheetDestination. This will cause the Composable to be launched as a dialog, escaping the current navigation context of the screen.

Here's an example:

@Composable
@ExperimentalComposableDestination
@NavigationDestination(DialogComposableKey::class)
fun DialogDestination.DialogComposableScreen() {
    configureDialog { ... }
}

@Composable
@OptIn(ExperimentalMaterialApi::class)
@ExperimentalComposableDestination
@NavigationDestination(BottomSheetComposableKey::class)
fun BottomSheetDestination.BottomSheetComposableScreen() {
    configureBottomSheet { ... }
}
Comments
  • In DefaultFragmentExecutor.open, fromContext childFragmentManager can be null

    In DefaultFragmentExecutor.open, fromContext childFragmentManager can be null

    I'm seeing some issues around this line in the library: https://github.com/isaac-udy/Enro/blob/5464e1f4df4137289c84df72ede3c8801ea7fbe4/enro-core/src/main/java/dev/enro/core/fragment/DefaultFragmentExecutor.kt#L40

    I haven't been able to find reproduction steps yet, but I'm wondering if it's related to switching this from commitNow to commit: https://github.com/isaac-udy/Enro/blob/5464e1f4df4137289c84df72ede3c8801ea7fbe4/enro-core/src/main/java/dev/enro/core/fragment/DefaultFragmentExecutor.kt#L75

    It seems like I run into this in cases where I have several navigation instructions happening in a row, so it seems like maybe child keys are starting to execute before the parent key transaction has finished. I'm inclined to do some experimenting with swapping this back to commitNow and see if that stops this crash in production, but I can't figure out why this changed. Was there a bug when using commitNow or is it just avoiding using the slower call?

    opened by mgod 8
  • Incompatible with Hilt

    Incompatible with Hilt

    Hi!

    I'd like to use this library in my project but it seems to be incompatible with Hilt. Just by adding the dependency kapt starts to fail with cannot access GeneratedComponentManagerHolder.

    I've seen in the modularised-example that there is an EnroHilt plugin but adding it to the navigation controller doesn't change anything for me.

    I'm currently using:

    • Hilt version: 1.0.0-alpha02
    • Enro version: 1.2.4
    fixed 
    opened by Cotel 5
  • ViewModel onClear not called when do bottom navigation with compose

    ViewModel onClear not called when do bottom navigation with compose

    Background:

    Using enro version: 1.6.0 Setup Bottom Navigation with Enro, UI is 100% built using Compose. The MainActivity's code is similar with sample code here: https://github.com/isaac-udy/Enro/blob/b4ecd50c9acdf01ce2a003038ea4b87e01d720f0/example/src/main/java/dev/enro/example/MultistackCompose.kt

    Each tab's content UI is built with Compose, and has its own ViewModel.

    The issue

    The onCleared() method of each tab's ViewModel will never be invoked, even if hitting back button until MainActivity destroy.

    The code:

    If one of my tab's UI code is like this:

    @Composable
    @ExperimentalComposableDestination
    @NavigationDestination(DashboardKey::class)
    fun DashboardScreen() {
        val viewModel: DashboardViewModel = viewModel()
        val text = viewModel.text.observeAsState()
        Text(text = text.value ?: "")
    }
    

    And the ViewModel is injected by Hilt:

    @HiltViewModel
    class DashboardViewModel @Inject constructor() : ViewModel() {
    
        private val _text = MutableLiveData<String>().apply {
            value = "This is dashboard Fragment"
        }
        val text: LiveData<String> = _text
    
        init {
            Log.i("viewmodel", "DashboardViewModel init ${hashCode()}")
        }
    
        override fun onCleared() {
            super.onCleared()
            Log.i("viewmodel", "DashboardViewModel onClear ${hashCode()}")
        }
    }
    

    Some clues

    Dive into the code for a while, found the ViewModel clear logic is located here: https://github.com/isaac-udy/Enro/blob/b4ecd50c9acdf01ce2a003038ea4b87e01d720f0/enro-core/src/main/java/dev/enro/core/compose/ComposableDestination.kt#L75 It waits an ON_DESTROY event to trigger the clear action.

    But actually the lifecycle events only hitted ON_PAUSE: https://github.com/isaac-udy/Enro/blob/b4ecd50c9acdf01ce2a003038ea4b87e01d720f0/enro-core/src/main/java/dev/enro/core/compose/ComposableDestination.kt#L161

    Not sure under which condition it will hit ON_DESTROY: https://github.com/isaac-udy/Enro/blob/b4ecd50c9acdf01ce2a003038ea4b87e01d720f0/enro-core/src/main/java/dev/enro/core/compose/ComposableDestination.kt#L137

    opened by mengdd 4
  • Crash when setting minifyEnabled true

    Crash when setting minifyEnabled true

    Hi, great work!

    Met a small issue when setting minifyEnabled true

    The Crash

    I'm using the multi stack for bottom navigation. If set minifyEnabled true for release build, the app will crash on launch.

    The stack looks like this:

        f.g: null cannot be cast to non-null type nav.enro.core.navigator.FragmentNavigator<*, *>
            at g.a.b.c.s0(:33)
            at g.a.b.c.M(Unknown Source:10)
            at androidx.fragment.app.Fragment.e0(Unknown Source:15)
            at c.k.d.r.U(:33)
            at c.k.d.r.S(:1)
            at c.k.d.r.T(Unknown Source:47)
            at c.k.d.a.m(:2)
            at c.k.d.r.D(:7)
            at c.k.d.r.Z(Unknown Source:84)
            at c.k.d.r.B(:4)
            at c.k.d.r.v(Unknown Source:14)
            at c.k.d.e.onStart(:2)
            at c.b.k.h.onStart(Unknown Source:0)
    

    It happens on File MultistackControllerFragment at this line:

    navigator as FragmentNavigator<*, *>
    

    Because no navigator is found, so it's null.

    The Reason

    After digging the reason, I found it's because during the setup, reflection is used:

    private val NavigationApplication.generatedComponent get(): NavigationComponentBuilderCommand? =
        runCatching {
            Class.forName(this::class.java.name + "Navigation")
                .newInstance() as NavigationComponentBuilderCommand
        }.getOrNull()
    

    The Solution

    Problem get resolve after adding:

    -keep class * extends nav.enro.core.controller.NavigationComponentBuilderCommand
    

    in app/proguard-rules.pro

    I'm not sure if it's the best way?

    Maybe we could package some rules in the library or list them at readme?

    fixed 
    opened by mengdd 4
  • When an Activity has child Fragments in a container, and navigation is executed on the Activity's NavigationHandle, child history can be overwritten

    When an Activity has child Fragments in a container, and navigation is executed on the Activity's NavigationHandle, child history can be overwritten

    Problem: Given an Activity with a container to hold Fragments, imagine a scenario where the following navigation is executed (assuming that all Fragments are accepted by the Activity's container): Activity executes forward action to Fragment A Fragment A executes forward action to Fragment B Fragment B executes forward action to Fragment C Activity executes forward action to Fragment D

    If you press the "back" button while Fragment D is active, Fragment D would close back to the Activity, leaving the container empty, because technically it was the Activity that opened Fragment D, so Fragment D does not re-open Fragment C into the container.

    I feel like this behaviour isn't quite right, and I think that closing Fragment D should go back to Fragment C. I am thinking about adjusting the navigation system, so that if a navigation action is executed, that action will be passed to the currently active destination for execution. In the example above, that would mean when the Activity goes forward to Fragment D, the Activity would find the currently active Fragment C, and ask Fragment C's navigation handle to actually execute the instruction.

    @mgod I'd be interested in your thoughts as to what should happen here, or if you see any problems with my proposed changes.

    bug resolved (next major) 
    opened by isaac-udy 3
  • Fix crash on close when previous fragment has been destroyed

    Fix crash on close when previous fragment has been destroyed

    If you're using a fragment host container, you can hit cases where the previous fragment has been destroyed. When this happens, the navigation system will create a new fragment to go back to and the call to parentFragmentManager in the close process will throw an IllegalStateException as this fragment has not be attached to a fragment manager yet.

    The deprecated fragmentManager method does not have this problem, but is deprecated. The context on a fragment gets set when it is attached, so this works as a reasonable proxy for detecting if the fragment will have a parent fragment manager for this case.

    It might make more sense to handle this in the getPreviousFragment method by making sure the new fragment has a parent fragment manager or return information about if this is a new fragment, but this also seems tricky.

    I'm happy to take another approach on this - I'm using this solution to fix some navigation crashes in my current project.

    opened by mgod 3
  • Customize animations for multistack fragment changes

    Customize animations for multistack fragment changes

    Probably there is a way for doing this but I don't see it clearly.

    I'm testing the multistack component in my project and eveytime I perform openStack a fragment enter animation is performed (except the first time I open a stack, which doesn't trigger any animation).

    I'd like to remove that animation or use one of my own.

    fixed 
    opened by Cotel 3
  • Bump runtime-livedata from 1.2.0-rc03 to 1.3.0-alpha02

    Bump runtime-livedata from 1.2.0-rc03 to 1.3.0-alpha02

    Bumps runtime-livedata from 1.2.0-rc03 to 1.3.0-alpha02.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • The use of ViewModelExtensions.putNavigationHandleForViewModel requires tests that are aware of application context.

    The use of ViewModelExtensions.putNavigationHandleForViewModel requires tests that are aware of application context.

    Issue

    Currently, using putNavigationHandleForViewModel(NavigationKey) on unit tests that are not using AndroidJUnit4 runner would result in failure. This is due to TestNavigationHandle that's created inside this extension function relies on being aware of the application context itself.

    Both of these function calls will throw some kind of NPE: https://github.com/isaac-udy/Enro/blob/bcde0c349e8ad326ba418c3697154c99ca513ade/enro-test/src/main/java/dev/enro/test/TestNavigationHandle.kt#L54

    LifecycleRegistry(this).apply {
           currentState = Lifecycle.State.RESUMED
    }
    

    and https://github.com/isaac-udy/Enro/blob/bcde0c349e8ad326ba418c3697154c99ca513ade/enro-test/src/main/java/dev/enro/test/TestNavigationHandle.kt#L62

    ApplicationProvider
        .getApplicationContext<Application>()
        .navigationController
    

    Proposal

    Enable passing in a null-able NavigationHandle to putNavigationHandleForViewModel in which a user can pass in any kind of mock-able NavigationHandle. If it's null, then use the current way of creating TestNavigationHandle as a default parameter. Pros: More flexibility for the usages of this extension method, it's backwards compatible to any existing usages. Cons: Passing around the same thing multiple times down multiple functions. This might be hard to read later on.

    Other alternatives

    1. Passing null-able NavigationController and null-able Lifecycle into to putNavigationHandleForViewModel in which a user can pass in any kind of mock. If any of them are null, then the default values would be like what they currently are. Pros: TestNavigationHandle is always used in the test context for a specific view model with only specific properties are changeable Cons: extension function signature becomes a bit more confusing as it's not self explanatory.
    2. Some other ways I haven't thought of. Feel free for anyone to give more suggestions.
    fixed 
    opened by committedteadrinker 2
  • Modularised:

    Modularised: "multistack" button has strange behavior and "all messages" crash app

    untitled

    When multistack click:

    2020-10-18 02:13:17.760 8920-8920/nav.enro.example W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@302f367 2020-10-18 02:13:17.769 8920-8920/nav.enro.example D/Enro: Opened: nav.enro.example.core.navigation.MultiStackKey@1abad98 2020-10-18 02:13:17.878 8920-8920/nav.enro.example D/Enro: Active: nav.enro.example.core.navigation.MultiStackKey@1abad98 2020-10-18 02:13:18.054 8920-8920/nav.enro.example D/Enro: Opened: nav.enro.example.multistack.MultiStackItem@3f22721 2020-10-18 02:13:18.064 8920-8920/nav.enro.example D/Enro: Active: nav.enro.example.multistack.MultiStackItem@3f22721 2020-10-18 02:13:18.111 8920-8920/nav.enro.example D/Enro: Active: DashboardKey(userId=Isaac) 2020-10-18 02:13:18.188 8920-8920/nav.enro.example D/Enro: Closed: nav.enro.example.multistack.MultiStackItem@3f22721

    fixed 
    opened by logan23 2
  • Bump robolectric from 4.8.1 to 4.9.1

    Bump robolectric from 4.8.1 to 4.9.1

    Bumps robolectric from 4.8.1 to 4.9.1.

    Release notes

    Sourced from robolectric's releases.

    Robolectric 4.9.1

    This is a minor release that fixes several issues:

    • Fixes sdk levels in ShadowAppOpsManager (50e2cfa4294c5dcfb7127f51f355a366f947c89a, thanks @​paulsowden)
    • Fixes an issue loading the native runtime on concurrent threads (0b4e996c27b85f05f7f52f75bc9d5109be7ef767)
    • Fixes some uses of LineBreaker and StaticLayout in Compose (ed2d7d3d600972090de29bcf9ad37d65a4d7ef47, thanks @​samliu000)
    • Added proxy settings for fetching artifacts (bed3ca5a4ea314f730a9d58331b0099ca4c0abeb, thanks @​sebastienrussell)
    • Avoid referring to Android S TelephonyCallback (d43ae9ad7b74512dbf89518247769ca5c2c4128c, thanks @​styluo)
    • Fix data race in ShadowPausedLooper (cb231c8c133b6f2ed4e46148d1a4f551fdd52dd2)
    • Add shadow for LocaleManager#getSystemLocales (24d49f41227c35e0e3ce8564e404a39481c312e6, thanks @​utzcoz)
    • Use uninterruptibly acquire for ResTable's lock (a221f6829110fd40b124527bde5317123f1737d9, thanks @​utzcoz)
    • Update androidx.test dependencies to latest stable releases (0bdf89b884ac7c50c0e4d7a2b2fff848d795bf16, thanks @​utzcoz)
    • Support zip files where EOCD's offset to central dir is -1 (0bdf89b884ac7c50c0e4d7a2b2fff848d795bf16)

    Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.9...robolectric-4.9.1

    Robolectric 4.9 adds support for Android T (API level 33).

    This release removes shadows supportv4 module fully.

    It also installs the Conscrypt as the primary Security provider. See http://robolectric.org/blog/2022/09/06/Umesh-GSoC-on-ConscryptMode/ for details.

    4.9 also turns on NATIVE sqlite mode by default for Mac and Linux. Windows will continue to use the LEGACY SQLite mode.

    What's Changed

    ... (truncated)

    Commits
    • 53c4498 Bump version to 4.9.1.
    • 9b36bc6 Support zip files where EOCD's offset to central dir is -1
    • 73b8c53 Bump errorproneVersion from 2.9.0 to 2.16
    • 0bdf89b Update to androidx.test 11.04.2022 stable release
    • c718f94 Update to androidx.test 10.26.2022 RC release
    • f0fa28d Upgrade androidx.test and androidx.fragment versions to latest.
    • f9a2312 Make Robolectric works with Kotlin 1.7.x
    • 8a4bb62 Disable gradle metadata of utils module
    • a221f68 Use uninterruptibly acquire for ResTable's lock
    • 24d49f4 Add shadow for LocaleManager#getSystemLocales
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotlin-gradle-plugin from 1.7.10 to 1.8.0

    Bump kotlin-gradle-plugin from 1.7.10 to 1.8.0

    Bumps kotlin-gradle-plugin from 1.7.10 to 1.8.0.

    Release notes

    Sourced from kotlin-gradle-plugin's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from kotlin-gradle-plugin's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kotlin-reflect from 1.7.10 to 1.8.0

    Bump kotlin-reflect from 1.7.10 to 1.8.0

    Bumps kotlin-reflect from 1.7.10 to 1.8.0.

    Release notes

    Sourced from kotlin-reflect's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from kotlin-reflect's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump robolectric from 4.8.1 to 4.9.2

    Bump robolectric from 4.8.1 to 4.9.2

    Bumps robolectric from 4.8.1 to 4.9.2.

    Release notes

    Sourced from robolectric's releases.

    Robolectric 4.9.2 is a minor release that primarily fixes robolectric/robolectric#7879, which was an issue using native SQLite with older Linux machines.

    It also includes:

    • A fix for ShadowSpeechRecognizer in SDK <= 28 (0df34bf0cb5423afb64d7f4340c95e741ba26aa6, thanks @​utzcoz)
    • Some fixes for instrumenting Jacoco-instrumented classes (7534d628fd69caab623b1ed31bf2096fd3c914db and 4e6047d88f7e8d9c83b13842a0d584d7eccd068a). Note there are still known issues with running Robolectric instrumentation on Jacoco-instrumented classes which should hopefully be fixed in 4.10.

    Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.9.1...robolectric-4.9.2

    Robolectric 4.9.1 is a minor release that fixes several issues:

    • Fixes sdk levels in ShadowAppOpsManager (50e2cfa4294c5dcfb7127f51f355a366f947c89a, thanks @​paulsowden)
    • Fixes an issue loading the native runtime on concurrent threads (0b4e996c27b85f05f7f52f75bc9d5109be7ef767)
    • Fixes some uses of LineBreaker and StaticLayout in Compose (ed2d7d3d600972090de29bcf9ad37d65a4d7ef47, thanks @​samliu000)
    • Added proxy settings for fetching artifacts (bed3ca5a4ea314f730a9d58331b0099ca4c0abeb, thanks @​sebastienrussell)
    • Avoid referring to Android S TelephonyCallback (d43ae9ad7b74512dbf89518247769ca5c2c4128c, thanks @​styluo)
    • Fix data race in ShadowPausedLooper (cb231c8c133b6f2ed4e46148d1a4f551fdd52dd2)
    • Add shadow for LocaleManager#getSystemLocales (24d49f41227c35e0e3ce8564e404a39481c312e6, thanks @​utzcoz)
    • Use uninterruptibly acquire for ResTable's lock (a221f6829110fd40b124527bde5317123f1737d9, thanks @​utzcoz)
    • Update androidx.test dependencies to latest stable releases (0bdf89b884ac7c50c0e4d7a2b2fff848d795bf16, thanks @​utzcoz)
    • Support zip files where EOCD's offset to central dir is -1 (9b36bc6b013db9e9eef5c509b2471cc8b0a7395a)

    Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.9...robolectric-4.9.1

    Robolectric 4.9 adds support for Android T (API level 33).

    This release removes shadows supportv4 module fully.

    It also installs the Conscrypt as the primary Security provider. See http://robolectric.org/blog/2022/09/06/Umesh-GSoC-on-ConscryptMode/ for details.

    4.9 also turns on NATIVE sqlite mode by default for Mac and Linux. Windows will continue to use the LEGACY SQLite mode.

    What's Changed

    ... (truncated)

    Commits
    • fb2d148 Bump version to 4.9.2.
    • 0df34bf Ensure ShadowSpeechRecognizer can work with SDK 28
    • 4e6047d Change where addCallToRoboInit() inserts call to $$robo$init
    • 7534d62 Add call to $$robo$init for Jacoco-instrumented constructors
    • 81dda2f Enable CI when commits are pushed to release branches
    • 53c4498 Bump version to 4.9.1.
    • 9b36bc6 Support zip files where EOCD's offset to central dir is -1
    • 73b8c53 Bump errorproneVersion from 2.9.0 to 2.16
    • 0bdf89b Update to androidx.test 11.04.2022 stable release
    • c718f94 Update to androidx.test 10.26.2022 RC release
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kotlin-stdlib from 1.7.10 to 1.8.0

    Bump kotlin-stdlib from 1.7.10 to 1.8.0

    Bumps kotlin-stdlib from 1.7.10 to 1.8.0.

    Release notes

    Sourced from kotlin-stdlib's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from kotlin-stdlib's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump fragment-testing from 1.5.3 to 1.5.5

    Bump fragment-testing from 1.5.3 to 1.5.5

    Bumps fragment-testing from 1.5.3 to 1.5.5.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump ui-test-junit4 from 1.1.0 to 1.3.2

    Bump ui-test-junit4 from 1.1.0 to 1.3.2

    Bumps ui-test-junit4 from 1.1.0 to 1.3.2.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(2.0.0-alpha10)
  • 2.0.0-alpha10(Nov 1, 2022)

    Allowed generic NavigationKey types for Activities, Fragments and Composables. Added functionality to allow a result interceptor to deliver the result without closing the active navigation destination.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-alpha09(Oct 29, 2022)

  • 2.0.0-alpha08(Oct 25, 2022)

    Updated ComposableNavigationContainer to use movableContentOf for rendering. Added NavigationContainerGroup and rememberNavigationContainerGroup to help manage groups of navigation containers inside Compose

    Source code(tar.gz)
    Source code(zip)
  • 1.17.5(Oct 25, 2022)

    Fix bug where Activities/Fragments that are opened outside of Enro, but are targeted by Enro overrides will cause crashes when onBackPressed is called

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-alpha07(Oct 24, 2022)

  • 2.0.0-alpha06(Oct 18, 2022)

  • 2.0.0-alpha05(Oct 18, 2022)

    Alpha release of Enro 2.0.0, with refactored navigation containers, and updated navigation directions. Some minor breaking API changes (naming) are still to come.

    Source code(tar.gz)
    Source code(zip)
  • 1.17.4(Oct 11, 2022)

  • 1.17.3(Oct 10, 2022)

    Fixed a bug with interoperability between Enro and AndroidX Navigation to ensure that back presses directed towards a Fragment hosted in a NavHostFragment correctly pop the NavController's back stack

    Source code(tar.gz)
    Source code(zip)
  • 1.17.2(Aug 7, 2022)

  • 1.17.1(Aug 5, 2022)

  • 1.17.0(Aug 4, 2022)

  • 1.16.0(Aug 2, 2022)

  • 1.16.0-rc04(Jul 27, 2022)

  • 1.16.0-rc03(Jul 26, 2022)

  • 1.15.1(Jul 19, 2022)

  • 1.16.0-rc02(Jun 25, 2022)

  • 1.15.0(Jun 25, 2022)

  • 1.14.0(May 29, 2022)

  • 1.13.0(May 29, 2022)

    Added ability to directly configure a dialog window from a dialog/bottomsheet destination, deprecated setWindowInputMode in favor of using configureWindow

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-alpha04(May 22, 2022)

  • 2.0.0-alpha03(May 22, 2022)

  • 2.0.0-alpha02(May 22, 2022)

  • 1.12.1(May 22, 2022)

  • 2.0.0-alpha01(May 21, 2022)

  • 1.12.0(May 21, 2022)

    Allowed registerForNavigationResult to optionally be aware of the Key type that is being used, removed the need for a ViewModel to provide a navigationHandle when using registerForNavigationResult, allowed ViewModels to access their navigationHandle with "getNavigationHandle" at any time, added improved assertions for testing, including asserts that return Key types (for verification), assertions for results being delivered, and enabled the onCloseRequested behavior to be tested in a ViewModel test

    Source code(tar.gz)
    Source code(zip)
  • 1.11.1(May 18, 2022)

    Allow Composables to optionally provide an id to registerForNavigationResult for cases in Compose/View interoperability where the instance state of individual Composables is managed outside of a composition. Allow DialogConfiguration and BottomSheetConfiguration to set a windowSoftInputMode for the Dialog Window that is used for presentation. Moved the NavigationLifecycleController's activeNavigationHandle property to a WeakReference to prevent erroneous memory leak warnings from LeakCanary. Updated the DefaultFragmentExecutor to delay navigation events if the target FragmentManager has already saved its state.

    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Apr 27, 2022)

    Fixed a bug with result flows that are rooted in a DialogFragment (and cause the DialogFragment to close due to nested fragments returning results), and backported the skipHalfExpanded functionality for ModalBottomSheet from Compose 1.2.0-alpha01.

    Source code(tar.gz)
    Source code(zip)
  • 1.10.1(Apr 25, 2022)

  • 1.10.0(Apr 22, 2022)

    Allowed EnroTest to be used from non-instrumented unit tests. Moved result ids from the additional data bundle into the main open instruction data.

    Source code(tar.gz)
    Source code(zip)
Owner
Isaac Udy
Android Engineer @ Xero, builds and maintains Enro, likes coffee and large Android projects.
Isaac Udy
Alligator is a modern Android navigation library that will help to organize your navigation code in clean and testable way.

Alligator Alligator is a modern Android navigation library that will help to organize your navigation code in clean and testable way. Features Any app

Artur Artikov 290 Dec 9, 2022
Android multi-module navigation built on top of Jetpack Navigation Compose

MultiNavCompose Android library for multi-module navigation built on top of Jetpack Navigation Compose. The goal of this library is to simplify the se

Jeziel Lago 21 Dec 10, 2022
DSC Moi University session on using Navigation components to simplify creating navigation flow in our apps to use best practices recommended by the Google Android Team

Navigation Components Navigate between destination using safe args How to use the navigation graph and editor How send data between destinations Demo

Breens Mbaka 6 Feb 3, 2022
Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android - Bottom App Bar with Bottom Navigation in Jetpack compose

Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android This is simple

Shruti Patel 1 Jul 11, 2022
Navigation Component: THE BEST WAY to create navigation flows for your app

LIVE #017 - Navigation Component: A MELHOR FORMA de criar fluxos de navegação para o seu app! Código fonte do projeto criado na live #017, ensinando c

Kaique Ocanha 4 Jun 15, 2022
Navigation Drawer Bottom Navigation View

LIVE #019 - Toolbar, Navigation Drawer e BottomNavigationView com Navigation Com

Kaique Ocanha 6 Jun 15, 2022
Animated Tab Bar is an awesome navigation extension that you can use to add cool, animated and fully customizable tab navigation in your apps

Animated Tab Bar is an awesome navigation extension that you can use to add cool, animated and fully customizable tab navigation in your apps. The extension provides handy methods and properties to change the behaviour as well as the appearance of the navigation bar.

Zain Ul Hassan 4 Nov 30, 2022
A simple navigation library for Android 🗺️

Enro ??️ A simple navigation library for Android "The novices’ eyes followed the wriggling path up from the well as it swept a great meandering arc ar

Isaac Udy 216 Dec 16, 2022
A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

Vitali Olshevski 290 Dec 29, 2022
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.

Bubble Navigation ?? A light-weight library to easily make beautiful Navigation Bars with a ton of ?? customization options. Demos FloatingTopBarActiv

Gaurav Kumar 1.7k Dec 31, 2022
Okuki is a simple, hierarchical navigation bus and back stack for Android, with optional Rx bindings, and Toothpick DI integration.

Okuki A simple, hierarchical navigation bus and back stack for Android, with optional Rx bindings, and Toothpick integration for automatic dependency-

Cain Wong 143 Nov 25, 2022
A simple & curved & material bottom navigation for Android written in Kotlin with ♥ .

A simple & curved & material bottom navigation for Android written in Kotlin with ♥ .

Hamidreza Etebarian 1.2k Dec 30, 2022
A simple, highly customizable compose navigation component for Android & Desktop platform.

介绍 一个简单并提供高度扩展功能的 Compose 导航组件,同时支持 Android 和 Desktop 平台。 常用功能 使用 下载 // Android implementation("io.github.succlz123:compose-screen-android:0.0.1") //

Ning 15 Nov 24, 2022
A simple Floating Action Button that shows an anchored Navigation View

Floating Navigation View A simple Floating Action Button that shows an anchored Navigation View and was inspired by Menu Material Fixed created by Tom

André Mion 1.3k Dec 29, 2022
A Simple App to implement Navigation Architecture Component.

Android Navigation codelab Content: https://codelabs.developers.google.com/codelabs/android-navigation/ License Copyright 2018 The Android Open Source

Gilbert Ngeno 0 Nov 5, 2021
A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

Kaustubh Patange 88 Dec 11, 2022
AndroidBriefActions - Android library for sending and observing non persistent actions such as showing a message; nice readable way to call navigation actions from ViewModel or Activity/Fragment.

implementation "com.vladmarkovic.briefactions:briefactions:$briefActionsVersion" Benefits Why use brief-actions library pattern: Prevent short-term ac

null 2 Dec 22, 2022
🧛 Fragula is a swipe-to-dismiss extension for navigation component library for Android

Fragula is a swipe-to-dismiss extension for navigation component library for Android.

Dmitry Rubtsov 205 Dec 24, 2022
🛸Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Adriel Café 831 Dec 26, 2022