From 3a443514027417133d7a7e18766720dfea028a87 Mon Sep 17 00:00:00 2001 From: fredboy Date: Sat, 25 May 2024 11:52:14 +0700 Subject: [PATCH] MainComponent in kotlin --- .../deadsoftware/cavedroid/MainComponent.java | 21 ------------------ .../deadsoftware/cavedroid/MainComponent.kt | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 core/src/ru/deadsoftware/cavedroid/MainComponent.java create mode 100644 core/src/ru/deadsoftware/cavedroid/MainComponent.kt diff --git a/core/src/ru/deadsoftware/cavedroid/MainComponent.java b/core/src/ru/deadsoftware/cavedroid/MainComponent.java deleted file mode 100644 index b487c6d..0000000 --- a/core/src/ru/deadsoftware/cavedroid/MainComponent.java +++ /dev/null @@ -1,21 +0,0 @@ -package ru.deadsoftware.cavedroid; - -import dagger.Component; -import ru.deadsoftware.cavedroid.game.GameScreen; -import ru.deadsoftware.cavedroid.menu.MenuScreen; -import ru.deadsoftware.cavedroid.misc.utils.AssetLoader; -import ru.deadsoftware.cavedroid.prefs.PreferencesStore; - -import javax.inject.Singleton; - -@Singleton -@Component(dependencies = {CaveGame.class, PreferencesStore.class}) -public interface MainComponent { - GameScreen getGameScreen(); - - MenuScreen getMenuScreen(); - - MainConfig getMainConfig(); - - AssetLoader getAssetLoader(); -} diff --git a/core/src/ru/deadsoftware/cavedroid/MainComponent.kt b/core/src/ru/deadsoftware/cavedroid/MainComponent.kt new file mode 100644 index 0000000..b2a77ee --- /dev/null +++ b/core/src/ru/deadsoftware/cavedroid/MainComponent.kt @@ -0,0 +1,22 @@ +package ru.deadsoftware.cavedroid + +import dagger.Component +import ru.deadsoftware.cavedroid.game.GameScreen +import ru.deadsoftware.cavedroid.menu.MenuScreen +import ru.deadsoftware.cavedroid.misc.utils.AssetLoader +import ru.deadsoftware.cavedroid.prefs.PreferencesStore +import javax.inject.Singleton + +@Singleton +@Component(dependencies = [CaveGame::class, PreferencesStore::class]) +interface MainComponent { + + val gameScreen: GameScreen + + val menuScreen: MenuScreen + + val mainConfig: MainConfig + + val assetLoader: AssetLoader + +} \ No newline at end of file -- 2.29.2