Hydra core
The Core library for Hydra modules
In order for the main app to detect and use the module it need to have a class named Module extending HeadModule in the root of the project
Example
Inside the project root (src/main/java|kotlin/<package>/Module.kt) create a class named Module that extends HeadModule.
For more settings check HeadConfig
For more information about the data repository check HeadRepository
class Module: HeadModule() { // Needs to be named Module and extend HeadModule
override val baseUrl: String = "https://example.com/"
override val config: HeadConfig = object : HeadConfig(){ // Check HeadConfig for more settings
init {
isRecentsAvailable = true
isDirectoryAvailable = true
isSearchAvailable = true
searchBarText = "Search here"
customDecoders = listOf()
}
}
override val dataRepository: HeadRepository = ExampleRepository() // Check HeadRepository
override val moduleName: String = "Example module"
override val moduleVersionCode: Int = BuildConfig.VERSION_CODE
override val moduleVersionName: String = BuildConfig.VERSION_NAME
}Content copied to clipboard