Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies #5

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ if [ $EXIT_CODE -ne 0 ]; then
echo " Please fix the above issues before committing "
echo "***********************************************"
exit $EXIT_CODE
fi
fi
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout repositoryy
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand All @@ -42,13 +42,13 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand All @@ -73,13 +73,13 @@ jobs:
ApiLevel: 29
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/download-artifact@v3
with:
Expand All @@ -167,4 +167,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: coverage
folder: html
folder: html
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand Down Expand Up @@ -59,13 +59,13 @@ jobs:
api-level: [ 29 ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand Down Expand Up @@ -125,13 +125,13 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup java 11
- name: Setup java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: ./.github/workflows/gradle-cache
Expand All @@ -154,4 +154,4 @@ jobs:
- name: Publish release
uses: softprops/action-gh-release@v1
with:
files: ./app/build/outputs/apk/release/*.apk
files: ./app/build/outputs/apk/release/*.apk
2 changes: 0 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ dependencies {
implementation(libs.androidx.lifecycle.process)
implementation(libs.retrofit.core)
implementation(libs.accompanist.systemuicontroller)
implementation(libs.accompanist.insets)
implementation(libs.accompanist.insets.ui)
implementation(libs.timber)

debugImplementation(libs.leakcanary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import javax.inject.Inject
internal class FlipperInitializer @Inject constructor(
private val networkFlipperPlugin: NetworkFlipperPlugin,
private val inspectorFlipperPlugin: InspectorFlipperPlugin,
private val crashReporterPlugin: CrashReporterPlugin
private val crashReporterPlugin: CrashReporterPlugin,
) : AppInitializer {

override fun onCreate(application: Application) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import kotlinx.coroutines.asExecutor
import javax.inject.Inject

internal class StrictModeInitializer @Inject constructor(
@DefaultDispatcher private val defaultDispatcher: CoroutineDispatcher
@DefaultDispatcher private val defaultDispatcher: CoroutineDispatcher,
) : AppInitializer {

init {
Expand All @@ -26,14 +26,14 @@ internal class StrictModeInitializer @Inject constructor(
StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLogError(STACKTRACE_WHITELIST_THREAD)
.build()
.build(),
)

StrictMode.setVmPolicy(
StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLogError(STACKTRACE_WHITELIST_VM)
.build()
.build(),
)
}

Expand Down Expand Up @@ -67,10 +67,10 @@ internal class StrictModeInitializer @Inject constructor(

companion object {
private val STACKTRACE_WHITELIST_VM = listOf(
"android.os.strictmode.UntaggedSocketViolation"
"android.os.strictmode.UntaggedSocketViolation",
)
private val STACKTRACE_WHITELIST_THREAD = listOf(
"com.louisfn.somovie.app.initializer.FlipperInitializer.onCreate"
"com.louisfn.somovie.app.initializer.FlipperInitializer.onCreate",
)
}
}
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/louisfn/somovie/app/SoMovieApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class SoMovieApp : Application(), LifecycleObserver {
override fun onStop(owner: LifecycleOwner) {
onBackground()
}
}
},
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.app.Application
import javax.inject.Inject

internal class AppInitializers @Inject constructor(
private val initializers: Set<@JvmSuppressWildcards AppInitializer>
private val initializers: Set<@JvmSuppressWildcards AppInitializer>,
) : AppInitializer {

override fun onCreate(application: Application) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.louisfn.somovie.ui.common.coil.MapperInterceptor
import javax.inject.Inject

internal class CoilInitializer @Inject constructor(
private val imagePathMapper: ImagePathMapper
private val imagePathMapper: ImagePathMapper,
) : AppInitializer {

override fun onCreate(application: Application) {
Expand All @@ -24,9 +24,9 @@ internal class CoilInitializer @Inject constructor(
add(
MapperInterceptor(
listOf(
imagePathMapper to ImagePath::class
)
)
imagePathMapper to ImagePath::class,
),
),
)
}
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import javax.inject.Inject
internal class DataInitializer @Inject constructor(
private val appRouter: AppRouter,
private val appLanguageInteractor: AppLanguageInteractor,
@ApplicationScope private val applicationScope: CoroutineScope
@ApplicationScope private val applicationScope: CoroutineScope,
) : AppInitializer {

override fun onForeground() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.louisfn.somovie.core.logger.Logger
import javax.inject.Inject

internal class LoggerInitializer @Inject constructor(
private val logAdapter: LogAdapter
private val logAdapter: LogAdapter,
) : AppInitializer {

override fun onCreate(application: Application) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal class MainActivity : BaseActivity() {
setContent {
CompositionLocalProvider(
LocalMoshi provides moshi,
LocalAppRouter provides appRouter
LocalAppRouter provides appRouter,
) {
AppTheme {
val systemUiController = rememberSystemUiController()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import com.louisfn.somovie.ui.common.R as commonR

@Composable
internal fun MainScreen(
viewModel: MainViewModel = hiltViewModel()
viewModel: MainViewModel = hiltViewModel(),
) {
Logger.d("Navigation - MainScreen")

Expand All @@ -40,21 +40,21 @@ internal fun MainScreen(
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colors.background)
.background(MaterialTheme.colors.background),
) {
when (uiState) {
is MainUiState.Loading ->
AppLoader()
is MainUiState.Content ->
MainNavHost(
startDestination = HomeDestination,
modifier = Modifier.fillMaxSize()
modifier = Modifier.fillMaxSize(),
)
}

ErrorsLayout(
errors = errors,
modifier = Modifier.padding(top = WindowInsets.statusBars.top.pxToDp())
modifier = Modifier.padding(top = WindowInsets.statusBars.top.pxToDp()),
)
}
}
Expand All @@ -65,11 +65,11 @@ private fun AppLoader() {
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.fillMaxSize()
.fillMaxSize(),
) {
Text(
text = stringResource(id = commonR.string.app_name),
style = MaterialTheme.typography.h2
style = MaterialTheme.typography.h2,
)
ColumnSpacer(space = 32.dp)
IndeterminateProgressIndicator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import javax.inject.Inject
internal class MainViewModel @Inject constructor(
@DefaultDispatcher defaultDispatcher: CoroutineDispatcher,
private val errorsDispatcher: ErrorsDispatcher,
private val configurationInteractor: TmdbConfigurationInteractor
private val configurationInteractor: TmdbConfigurationInteractor,
) : BaseViewModel<NoneAction>(defaultDispatcher) {

private val loadingManager = LoadingManager()
Expand All @@ -37,15 +37,15 @@ internal class MainViewModel @Inject constructor(
.stateIn(
scope = viewModelScope,
started = SharingStarted.WhileSubscribed(),
initialValue = MainUiState.Loading
initialValue = MainUiState.Loading,
)

val errors = errorsDispatcher
.errorChanges()
.stateIn(
viewModelScope,
SharingStarted.WhileSubscribed(),
ImmutableList()
ImmutableList(),
)

init {
Expand All @@ -61,8 +61,11 @@ internal class MainViewModel @Inject constructor(

@AnyThread
private fun createMainUiState(isRefreshing: Boolean) =
if (isRefreshing) MainUiState.Loading
else MainUiState.Content
if (isRefreshing) {
MainUiState.Loading
} else {
MainUiState.Content
}

@AnyThread
private suspend fun refreshAppData() {
Expand Down
14 changes: 7 additions & 7 deletions build-logic/src/main/kotlin/AppConfig.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@file:Suppress("MissingPackageDeclaration")

object AppConfig {
const val minSdkVersion = 26
const val compileSdkVersion = 33
const val targetSdkVersion = 33
const val MIN_SDK_VERSION = 26
const val COMPILE_SDK_VERSION = 34
const val TARGET_SDK_VERSION = 34

const val versionCode = 1
const val versionName = "0.1.0"
const val VERSION_CODE = 1
const val VERSION_NAME = "0.1.0"

const val applicationId = "com.louisfn.somovie"
const val APPLICATION_ID = "com.louisfn.somovie"

const val testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
const val TEST_INSTRUMENTATION_RUNNER = "androidx.test.runner.AndroidJUnitRunner"

const val DEBUG_BUILD_TYPE = "debug"
const val RELEASE_BUILD_TYPE = "release"
Expand Down
Loading