Skip to content

Commit

Permalink
#7: Add Home module
Browse files Browse the repository at this point in the history
  • Loading branch information
majorkik committed Jul 11, 2021
1 parent 2e8fab8 commit 8711aec
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 17 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ android {
}

buildFeatures {
compose = true
compose = false
viewBinding = false
dataBinding = false

// Disable unused AGP features
aidl = false
Expand All @@ -45,11 +47,8 @@ dependencies {
implementation(project(ModuleDependency.Core.ui))

implementation(project(ModuleDependency.UI.main))
implementation(project(ModuleDependency.UI.home))

implementation(Libs.Kotlin.stdlib)
implementation(Libs.Coroutines.android)

implementation(Libs.AndroidX.coreKtx)
implementation(Libs.AndroidX.compat)

implementation(Libs.Koin.android)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.majorkik.movieboxcompose

import android.app.Application
import com.majorkik.ui.main.uiMainModule
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger
import org.koin.android.ext.koin.androidContext
Expand All @@ -24,7 +25,7 @@ class MovieBoxApplication : Application() {
startKoin {
androidLogger()
androidContext(this@MovieBoxApplication)
modules()
modules(uiMainModule,)
}
}
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/AndroidConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ object AndroidConfig {
const val targetSdk = 30
const val buildTools = "30.0.2"

const val versionCode = 47
const val versionName = "0.6.1"
const val versionCode = 48
const val versionName = "0.7.1"

const val applicationId = "com.majorkik.movieboxcompose"
}
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/ModuleDependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ object ModuleDependency {

object UI {
const val main = ":ui:main"
const val home = ":ui:home"
}

object Core {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ private class SystemUiControllerImpl(private val window: Window) : SystemUIContr
@Suppress("DEPRECATION")
if (darkIcons) {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
} else {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
}
}

Expand Down Expand Up @@ -101,10 +101,10 @@ private class SystemUiControllerImpl(private val window: Window) : SystemUIContr
@Suppress("DEPRECATION")
if (darkIcons) {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
} else {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
}
}
}
Expand Down
13 changes: 11 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ rootProject.name = "moviebox-compose"

// Main module
include(":app")

// Core modules
include(":core:network", ":core:ui", ":core:base")
include(
":core:network",
":core:ui",
":core:base"
)

// UI modules
include(":ui:main")
include(
":ui:main",
":ui:home"
)
2 changes: 2 additions & 0 deletions ui/home/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.majorkik.ui.main" />
6 changes: 6 additions & 0 deletions ui/home/src/main/kotlin/com/majorkik/ui/main/KoinModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.majorkik.ui.main

import org.koin.dsl.module

val uiHomeModule = module {
}
3 changes: 0 additions & 3 deletions ui/main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@ android {
dependencies {
implementation(project(ModuleDependency.Core.ui))

implementation(Libs.AndroidX.Activity.activityCompose)
implementation(Libs.AndroidX.compat)

implementation(Libs.Koin.android)
}

0 comments on commit 8711aec

Please sign in to comment.