Skip to main content
Anvil2 for Android ships four Gradle modules: :tokens, :icons, :illustrations, and :components. Coordinates are com.servicetitan:anvil2-android-tokens, com.servicetitan:anvil2-android-icons, com.servicetitan:anvil2-android-illustrations, and com.servicetitan:anvil2-android-components. Requires JDK 17 or newer and the Android SDK (platform 36). Modules target JVM 17, compileSdk / minSdk 36 / 26, and the Compose BOM pin listed in the package README.

Modules

Add the dependency

In hammer, the sample app substitutes the components coordinate with the local project:
Until remote publish lands, depend on the local modules (as the sample does) or publish to Maven Local:

First composable

Anvil2Placeholder is a public @Composable that accepts an optional Modifier. It renders the text “Anvil2” with Anvil2Tokens.Semantic.Foreground.Color.standard.

Working in hammer

Do not edit generated token sources under tokens/src/main/kotlin/... by hand; they come from packages/carto-tokens.
Last modified on October 27, 2026