Skip to content

Getting Started

Maven Central

Installation

Gradle (Kotlin DSL)

Add the dependency to your module's build.gradle.kts:

dependencies {
    implementation("com.revenuecat.purchases:placeholder:$version")
}

Gradle (Groovy DSL)

dependencies {
    implementation "com.revenuecat.purchases:placeholder:$version"
}

Version Catalog

If you're using a version catalog, add the entry to gradle/libs.versions.toml:

[versions]
placeholder = "1.0.4"

[libraries]
compose-placeholder = { module = "com.revenuecat.purchases:placeholder", version.ref = "placeholder" }

Then reference it in your module:

dependencies {
    implementation(libs.compose.placeholder)
}

Kotlin Multiplatform

For Kotlin Multiplatform projects, add the dependency to the commonMain source set:

kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation(libs.compose.placeholder)
            }
        }
    }
}

Supported Platforms

Platform Targets Since
Android minSdk 23 1.0.0
JVM Desktop jvm("desktop") 1.0.0
iOS iosArm64, iosX64, iosSimulatorArm64 1.0.0
macOS macosArm64, macosX64 1.0.0
Web js (browser), wasmJs (browser) 1.0.4

One dependency covers every target, and Gradle resolves the right artifact for you.

Try it in the browser

The web playground is a Wasm build of this library. Tweak every option live and copy the Kotlin it generates. Needs a browser with WebAssembly GC: Chrome 119+, Firefox 120+, or Safari 18.2+.

Next Steps