Skip to content

Commit

Permalink
Merge pull request #21 from niyajali/test-script-in-fork
Browse files Browse the repository at this point in the history
docs: Add documentation to entry points
  • Loading branch information
niyajali authored Jan 16, 2025
2 parents 89248fd + c7d2b77 commit 5fd0d93
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmp-android/src/main/kotlin/cmp/android/app/AndroidApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.GlobalContext.startKoin

/**
* Android application class.
* This class is used to initialize Koin modules.
*
* @constructor Create empty Android app
* @see Application
*/
class AndroidApp : Application() {
override fun onCreate() {
super.onCreate()

// Start Koin
startKoin {
androidContext(this@AndroidApp)
androidLogger()
Expand Down
11 changes: 11 additions & 0 deletions cmp-android/src/main/kotlin/cmp/android/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,21 @@ import org.mifos.core.data.utils.NetworkMonitor
import org.mifos.core.data.utils.TimeZoneMonitor
import org.mifos.core.ui.utils.ShareUtils

/**
* Main activity class.
* This class is used to set the content view of the activity.
*
* @constructor Create empty Main activity
* @see ComponentActivity
*/
class MainActivity : ComponentActivity() {
private val networkMonitor: NetworkMonitor by inject()
private val timeZoneMonitor: TimeZoneMonitor by inject()

/**
* Called when the activity is starting.
* This is where most initialization should go: calling [setContentView(int)] to inflate the activity's UI,
*/
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand Down
6 changes: 6 additions & 0 deletions cmp-desktop/src/jvmMain/kotlin/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import androidx.compose.ui.window.rememberWindowState
import cmp.shared.SharedApp
import cmp.shared.di.initKoin

/**
* Main function.
* This function is used to start the application.
* @see application
* @see rememberWindowState
*/
fun main() {
application {
initKoin()
Expand Down
6 changes: 6 additions & 0 deletions cmp-web/src/jsMain/kotlin/Application.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import org.jetbrains.skiko.wasm.onWasmReady
import cmp.shared.SharedApp
import cmp.shared.di.initKoin

/**
* Main function.
* This function is used to start the application.
* @see ComposeViewport
* @see SharedApp
*/
@OptIn(ExperimentalComposeUiApi::class)
fun main() {
initKoin()
Expand Down
6 changes: 6 additions & 0 deletions cmp-web/src/wasmJsMain/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import cmp.shared.SharedApp
import cmp.shared.di.initKoin
import org.jetbrains.compose.resources.configureWebResources

/**
* Main function.
* This function is used to start the application.
* @see CanvasBasedWindow
* @see SharedApp
*/
@OptIn(ExperimentalComposeUiApi::class)
fun main() {
initKoin()
Expand Down

0 comments on commit 5fd0d93

Please sign in to comment.