Provider
Configuration#
This guide assumes you have completed all Getting Started steps. By the end, you will know where to configure:
- Gradle/plugin setup (already provided by the template)
- Which provider modules are included (
settings.gradle.kts) - Provider identity/metadata via
flxProvider { ... }
Gradle setup (provider-template)#
The template repository already sets up everything you need:
- The
flx-providerGradle plugin (adds tasks like:makeand:deployWithAdb) - The
core-stubsprovider SDK dependency
Where to change versions#
In the template, versions are managed in gradle/libs.versions.toml.
[versions]
core-gradle = "..."
core-stubs = "..."When you upgrade core-stubs, you should also consider upgrading core-gradle so the plugin
and SDK stay compatible.
flx-provider plugin wiring#
The template applies the plugin for all provider modules from the root build.gradle.kts.
This is the recommended setup:
subprojects {
apply(plugin = "flx-provider")
android {
// compileSdk/minSdk, etc.
}
flxProvider {
// shared metadata for all providers (author + repo)
}
}If you keep this root subprojects { ... } block, you usually do not need to apply
flx-provider in each module.
core-stubs library dependency#
Each provider module should depend on the provider SDK:
dependencies {
implementation(libs.core.stubs.provider)
}If you are not using the version catalog, look at the template’s gradle/libs.versions.toml
for the exact Maven coordinates.
Configuring settings.gradle.kts#
Every provider module must be included so Gradle/Android Studio recognizes it.
include(
"BasicDummyProvider",
"TestProvider", // <- newly created provider
)
// This template keeps provider modules under the providers/ folder
rootProject.children.forEach {
it.projectDir = file("providers/${it.name}")
}This also applies when renaming or deleting provider modules.
Customizing provider metadata (flxProvider)#
Provider identity + metadata is represented by:
ProviderMetadata(formerlyProviderData)ProviderManifest(runtime manifest)
You do not construct these manually — they’re generated by the Gradle plugin from your
flxProvider { ... } configuration.
Basic identity#
Key fields you should set in each provider module’s build.gradle.kts:
import com.flixclusive.model.provider.ProviderStatus
import com.flixclusive.model.provider.Language
import com.flixclusive.model.provider.ProviderType
flxProvider {
// Required: stable, unique identifier (keep this constant across releases)
id = "prov-test-provider"
// Optional display fields
providerName = "Test Provider"
description = "A sample provider."
// Versioning
versionMajor = 1
versionMinor = 0
versionPatch = 0
versionBuild = 0
status = ProviderStatus.Working
// Content specs
language = Language.Multiple
providerType = ProviderType.All
adult = false
// Build options
requiresResources = true
// excludeFromUpdaterJson = true
}Some projects still use Status as a deprecated alias for ProviderStatus.
Prefer ProviderStatus for new code.
Source information (shared)#
It’s common to configure author info + repository URL once in the root build.gradle.kts,
so every provider module inherits it:
subprojects {
flxProvider {
author(
name = "your-handle",
image = "https://github.com/your-handle.png",
socialLink = "https://github.com/your-handle",
)
setRepository("https://github.com/your-handle/your-providers-repo")
}
}Changelog (optional)#
flxProvider {
changelog = """
# 1.2.3
---
- Added X
- Fixed Y
""".trimIndent()
}Final output#
// ... dependencies + android { namespace = "..." }
flxProvider {
id = "prov-test-provider"
providerName = "Test Provider"
description = "A sample provider."
versionMajor = 1
versionMinor = 0
versionPatch = 0
versionBuild = 0
// See ProviderStatus in core-stubs
status = ProviderStatus.Working
providerType = ProviderType.All
language = Language.Multiple
adult = false
requiresResources = true
}