Skip to content

Commit

Permalink
Update kotlinpoet to v2 (major) (#920)
Browse files Browse the repository at this point in the history
* Update kotlinpoet to v2

* update line breaks

* ktlint

* update one more test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Ittner <[email protected]>
  • Loading branch information
renovate[bot] and gabrielittner authored Nov 8, 2024
1 parent 15caef4 commit 614f33e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle,
@BindsInstance testRoute: TestRoute): KhonshuTestComponent
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testRoute: TestRoute): KhonshuTestComponent
}
@ContributesTo(TestParentRoute::class)
Expand All @@ -148,8 +147,7 @@ internal class NavDestinationCodegenTest {
entry: StackEntry<TestRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider,
TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider, TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
parentComponent.khonshuTestComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -200,8 +198,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
KhonshuTest(snapshot, route)
}
}
Expand Down Expand Up @@ -305,8 +302,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle,
@BindsInstance testRoute: TestRoute): KhonshuTestComponent
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testRoute: TestRoute): KhonshuTestComponent
}
@ContributesTo(ActivityScope::class)
Expand All @@ -322,8 +318,7 @@ internal class NavDestinationCodegenTest {
entry: StackEntry<TestRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTestComponent = component(entry, provider, ActivityScope::class) { parentComponent:
KhonshuTestComponent.ParentComponent ->
): KhonshuTestComponent = component(entry, provider, ActivityScope::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
parentComponent.khonshuTestComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -374,8 +369,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
KhonshuTest(snapshot, route)
}
}
Expand Down Expand Up @@ -482,9 +476,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestOverlayRoute::class)
savedStateHandle: SavedStateHandle, @BindsInstance testOverlayRoute: TestOverlayRoute):
KhonshuTestComponent
public fun create(@BindsInstance @ForScope(TestOverlayRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testOverlayRoute: TestOverlayRoute): KhonshuTestComponent
}
@ContributesTo(TestParentRoute::class)
Expand All @@ -494,15 +486,13 @@ internal class NavDestinationCodegenTest {
}
@OptIn(InternalCodegenApi::class)
public object KhonshuTestComponentProvider :
ComponentProvider<TestOverlayRoute, KhonshuTestComponent> {
public object KhonshuTestComponentProvider : ComponentProvider<TestOverlayRoute, KhonshuTestComponent> {
@OptIn(InternalNavigationCodegenApi::class)
override fun provide(
entry: StackEntry<TestOverlayRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider,
TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider, TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
parentComponent.khonshuTestComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -553,8 +543,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
OverlayDestination<TestOverlayRoute>(KhonshuTestComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = OverlayDestination<TestOverlayRoute>(KhonshuTestComponentProvider) { snapshot, route ->
KhonshuTest(snapshot, route)
}
}
Expand Down Expand Up @@ -691,8 +680,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle,
@BindsInstance testRoute: TestRoute): KhonshuTest2Component
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testRoute: TestRoute): KhonshuTest2Component
}
@ContributesTo(TestParentRoute::class)
Expand All @@ -708,8 +696,7 @@ internal class NavDestinationCodegenTest {
entry: StackEntry<TestRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTest2Component = componentFromParentRoute(entry, snapshot, provider,
TestParentRoute::class) { parentComponent: KhonshuTest2Component.ParentComponent ->
): KhonshuTest2Component = componentFromParentRoute(entry, snapshot, provider, TestParentRoute::class) { parentComponent: KhonshuTest2Component.ParentComponent ->
parentComponent.khonshuTest2ComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -768,8 +755,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
ScreenDestination<TestRoute>(KhonshuTest2ComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = ScreenDestination<TestRoute>(KhonshuTest2ComponentProvider) { snapshot, route ->
KhonshuTest2(snapshot, route)
}
}
Expand Down Expand Up @@ -867,8 +853,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle,
@BindsInstance testRoute: TestRoute): KhonshuTestComponent
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testRoute: TestRoute): KhonshuTestComponent
}
@ContributesTo(TestParentRoute::class)
Expand All @@ -884,8 +869,7 @@ internal class NavDestinationCodegenTest {
entry: StackEntry<TestRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider,
TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider, TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
parentComponent.khonshuTestComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -931,8 +915,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
KhonshuTest(snapshot, route)
}
}
Expand Down Expand Up @@ -1033,8 +1016,7 @@ internal class NavDestinationCodegenTest {
@ContributesSubcomponent.Factory
public interface Factory {
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle,
@BindsInstance testRoute: TestRoute): KhonshuTestComponent
public fun create(@BindsInstance @ForScope(TestRoute::class) savedStateHandle: SavedStateHandle, @BindsInstance testRoute: TestRoute): KhonshuTestComponent
}
@ContributesTo(TestParentRoute::class)
Expand All @@ -1050,8 +1032,7 @@ internal class NavDestinationCodegenTest {
entry: StackEntry<TestRoute>,
snapshot: StackSnapshot,
provider: ActivityComponentProvider,
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider,
TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
): KhonshuTestComponent = componentFromParentRoute(entry, snapshot, provider, TestParentRoute::class) { parentComponent: KhonshuTestComponent.ParentComponent ->
parentComponent.khonshuTestComponentFactory().create(entry.savedStateHandle, entry.route)
}
}
Expand Down Expand Up @@ -1101,8 +1082,7 @@ internal class NavDestinationCodegenTest {
@Provides
@IntoSet
@OptIn(InternalNavigationCodegenApi::class)
public fun provideNavDestination(): NavDestination =
ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
public fun provideNavDestination(): NavDestination = ScreenDestination<TestRoute>(KhonshuTestComponentProvider) { snapshot, route ->
KhonshuTest(snapshot, route)
}
}
Expand Down
Loading

0 comments on commit 614f33e

Please sign in to comment.