-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add package compatibility for dev.enro.core.synthetic
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
enro-core/src/main/java/dev/enro/compatability/dev.enro.core.synthetic.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@file:Suppress("PackageDirectoryMismatch") | ||
|
||
package dev.enro.core.synthetic | ||
|
||
import dev.enro.core.NavigationBinding | ||
import dev.enro.core.NavigationKey | ||
import dev.enro.core.controller.NavigationModuleScope | ||
import dev.enro.destination.synthetic.SyntheticDestination | ||
import dev.enro.destination.synthetic.SyntheticDestinationProvider | ||
import dev.enro.destination.synthetic.SyntheticDestinationScope | ||
import dev.enro.destination.synthetic.SyntheticNavigationBinding | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public typealias SyntheticNavigationBinding<KeyType> = SyntheticNavigationBinding<KeyType> | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public fun <T : NavigationKey> createSyntheticNavigationBinding( | ||
navigationKeyType: Class<T>, | ||
destination: () -> SyntheticDestination<T> | ||
): NavigationBinding<T, SyntheticDestination<*>> = | ||
dev.enro.destination.synthetic.createSyntheticNavigationBinding(navigationKeyType, destination) | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey> createSyntheticNavigationBinding( | ||
noinline destination: () -> SyntheticDestination<KeyType> | ||
): NavigationBinding<KeyType, SyntheticDestination<*>> = | ||
dev.enro.destination.synthetic.createSyntheticNavigationBinding(destination) | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public fun <T : NavigationKey> createSyntheticNavigationBinding( | ||
navigationKeyType: Class<T>, | ||
provider: SyntheticDestinationProvider<T>, | ||
): NavigationBinding<T, SyntheticDestination<*>> = | ||
dev.enro.destination.synthetic.createSyntheticNavigationBinding(navigationKeyType, provider) | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey> createSyntheticNavigationBinding( | ||
provider: SyntheticDestinationProvider<KeyType>, | ||
): NavigationBinding<KeyType, SyntheticDestination<*>> = | ||
dev.enro.destination.synthetic.createSyntheticNavigationBinding(provider) | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey, reified DestinationType : SyntheticDestination<KeyType>> createSyntheticNavigationBinding(): NavigationBinding<KeyType, SyntheticDestination<*>> = | ||
dev.enro.destination.synthetic.createSyntheticNavigationBinding() | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey, reified DestinationType : SyntheticDestination<KeyType>> NavigationModuleScope.syntheticDestination() { | ||
binding(dev.enro.destination.synthetic.createSyntheticNavigationBinding<KeyType, DestinationType>()) | ||
} | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey> NavigationModuleScope.syntheticDestination( | ||
noinline destination: () -> SyntheticDestination<KeyType> | ||
) { | ||
binding(dev.enro.destination.synthetic.createSyntheticNavigationBinding(destination)) | ||
} | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey> NavigationModuleScope.syntheticDestination( | ||
noinline block: SyntheticDestinationScope<KeyType>.() -> Unit | ||
) { | ||
val provider: SyntheticDestinationProvider<KeyType> = | ||
dev.enro.destination.synthetic.syntheticDestination(block) | ||
binding(dev.enro.destination.synthetic.createSyntheticNavigationBinding(provider)) | ||
} | ||
|
||
@Deprecated("use dev.enro.destination.synthetic") | ||
public inline fun <reified KeyType : NavigationKey> NavigationModuleScope.syntheticDestination( | ||
provider: SyntheticDestinationProvider<KeyType> | ||
) { | ||
binding(dev.enro.destination.synthetic.createSyntheticNavigationBinding(provider)) | ||
} |