Skip to content

Commit

Permalink
Update plugin.kotlinter to v4 (major) (#167)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| org.jmailen.kotlinter | `3.16.0` -> `4.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jmailen.kotlinter/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jmailen.kotlinter/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jmailen.kotlinter/3.16.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jmailen.kotlinter/3.16.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[org.jmailen.gradle:kotlinter-gradle](https://togithub.com/jeremymailen/kotlinter-gradle)
| `3.16.0` -> `4.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jmailen.gradle:kotlinter-gradle/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jmailen.gradle:kotlinter-gradle/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jmailen.gradle:kotlinter-gradle/3.16.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jmailen.gradle:kotlinter-gradle/3.16.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>jeremymailen/kotlinter-gradle
(org.jmailen.gradle:kotlinter-gradle)</summary>

###
[`v4.0.0`](https://togithub.com/jeremymailen/kotlinter-gradle/releases/tag/4.0.0)

[Compare
Source](https://togithub.com/jeremymailen/kotlinter-gradle/compare/3.16.0...4.0.0)

Upgrade to ktlint 1.0.0

-   Official stable 1.0 of ktlint 🎉
- Lots of changes, see here:
https://github.com/pinterest/ktlint/releases/tag/1.0.0
- See kotlinter [compatibility
matrix](https://togithub.com/jeremymailen/kotlinter-gradle#compatibility)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/julioromano/mooviez).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <[email protected]>
  • Loading branch information
renovate[bot] and julioromano authored Nov 7, 2023
1 parent c94b8ed commit c99af3e
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ max_line_length = 100
trim_trailing_whitespace = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ktlint_code_style = intellij_idea
ktlint_standard_function-naming = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fun AppNavHost() {
val context = LocalContext.current
NavHost(
navController = navController,
startDestination = TrendingNavigation.route,
startDestination = TrendingNavigation.ROUTE,
modifier = Modifier.fillMaxSize(),
route = "mainGraph",
) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugin-google-firebase-appDistribution = "4.0.1"
plugin-google-firebase-crashlytics = "2.9.9"
plugin-google-ksp = "1.9.20-1.0.14"
plugin-google-services = "4.4.0"
plugin-kotlinter = "3.16.0"
plugin-kotlinter = "4.0.0"
plugin-playPublisher = "3.8.5"
square-moshi = "1.15.0"
square-okhttp = "4.12.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ public interface HttpApi {
): TrendingMovies

@GET("3/movie/{movie_id}")
public suspend fun movie(
@Path("movie_id") movieId: Long,
): Movie
public suspend fun movie(@Path("movie_id") movieId: Long): Movie
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import me.tatarka.inject.annotations.Inject
public class MovieNavigation(
private val movieScreen: MovieScreen,
) {
public fun navGraphBuilder(
navGraphBuilder: NavGraphBuilder,
navBack: () -> Unit,
) {
public fun navGraphBuilder(navGraphBuilder: NavGraphBuilder, navBack: () -> Unit) {
navGraphBuilder.composable(
route = "movie/{id}",
arguments = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public fun MovieScreen(

@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun MovieScreen(
state: MovieState,
navBack: () -> Unit,
) {
private fun MovieScreen(state: MovieState, navBack: () -> Unit) {
val behavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
Scaffold(
modifier = Modifier.nestedScroll(behavior.nestedScrollConnection),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ import net.marcoromano.mooviez.movie.demoMovieStateMovie
import net.marcoromano.mooviez.widgets.UserScore

@Composable
internal fun Movie(
modifier: Modifier = Modifier,
movie: MovieState.Movie,
) {
internal fun Movie(modifier: Modifier = Modifier, movie: MovieState.Movie) {
Column(
modifier = modifier,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ public class TrendingNavigation(
private val trendingScreen: TrendingScreen,
) {
public companion object {
public const val route: String = "feature"
public const val ROUTE: String = "feature"
}

public fun navGraphBuilder(
navGraphBuilder: NavGraphBuilder,
navToDetail: (id: Long) -> Unit,
) {
public fun navGraphBuilder(navGraphBuilder: NavGraphBuilder, navToDetail: (id: Long) -> Unit) {
navGraphBuilder.composable(
route = route,
route = ROUTE,
) {
trendingScreen(
navToDetail,
Expand All @@ -27,6 +24,6 @@ public class TrendingNavigation(
}

public fun navigate(navController: NavController) {
navController.navigate(route)
navController.navigate(ROUTE)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public fun TrendingScreen(
@OptIn(ExperimentalMaterial3Api::class)
@Inject
@Composable
private fun TrendingScreen(
pager: Flow<PagingData<Movie>>,
navToDetail: (id: Long) -> Unit,
) {
private fun TrendingScreen(pager: Flow<PagingData<Movie>>, navToDetail: (id: Long) -> Unit) {
val behavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
Scaffold(
modifier = Modifier.nestedScroll(behavior.nestedScrollConnection),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public class TrendingViewModel(
@OptIn(ExperimentalPagingApi::class)
internal val pager = Pager(
config = PagingConfig(
pageSize = 20, // 20 comes from tmdb api docs
// 20 comes from tmdb api docs
pageSize = 20,
enablePlaceholders = true,
),
remoteMediator = Mediator(httpApi = httpApi, database = database),
Expand All @@ -41,10 +42,7 @@ private class Mediator(
private val httpApi: HttpApi,
private val database: Database,
) : RemoteMediator<Int, Movie>() {
override suspend fun load(
loadType: LoadType,
state: PagingState<Int, Movie>,
): MediatorResult {
override suspend fun load(loadType: LoadType, state: PagingState<Int, Movie>): MediatorResult {
return try {
val loadPage: Long? = when (loadType) {
LoadType.REFRESH -> null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ import net.marcoromano.mooviez.database.Movie
import net.marcoromano.mooviez.widgets.UserScore

@Composable
internal fun Movie(
movie: Movie,
navToDetail: (id: Long) -> Unit,
) {
internal fun Movie(movie: Movie, navToDetail: (id: Long) -> Unit) {
Column(
modifier = Modifier
.padding(8.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
public fun UserScore(
modifier: Modifier = Modifier,
userScore: Int,
) {
public fun UserScore(modifier: Modifier = Modifier, userScore: Int) {
val text = remember(userScore) {
buildAnnotatedString {
withStyle(SpanStyle(fontWeight = FontWeight.Bold)) {
Expand Down

0 comments on commit c99af3e

Please sign in to comment.