All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.likethesalad.stem.di.AppInjector.kt Maven / Gradle / Ivy

package com.likethesalad.stem.di

import com.likethesalad.stem.ResolvePlaceholdersPlugin
import com.likethesalad.stem.locator.entrypoints.common.CommonResourcesEntryPoint
import com.likethesalad.stem.locator.entrypoints.templates.TemplateResourcesEntryPoint
import com.likethesalad.stem.utils.PlaceholderTasksCreator

object AppInjector {

    private lateinit var component: AppComponent

    fun init(resolvePlaceholdersPlugin: ResolvePlaceholdersPlugin) {
        component = DaggerAppComponent.builder()
            .appModule(AppModule(resolvePlaceholdersPlugin))
            .build()
    }

    fun getPlaceholderTasksCreator(): PlaceholderTasksCreator {
        return component.placeholderTasksCreator()
    }

    fun getCommonResourcesEntryPointFactory(): CommonResourcesEntryPoint.Factory {
        return component.commonResourcesEntryPointFactory()
    }

    fun getTemplateResourcesEntryPointFactory(): TemplateResourcesEntryPoint.Factory {
        return component.templateResourcesEntryPointFactory()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy