Inner is distributed as a local Gradle module — theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/inner/llms.txt
Use this file to discover all available pages before exploring further.
innertube directory inside the repository. There is no Maven or package-registry artifact to fetch; you clone the repository (or copy the directory) and wire the module into your build. This page covers the exact steps for both a pure Android project and a Kotlin Multiplatform project that also targets iOS.
Requirements
Android
| Requirement | Value |
|---|---|
| Minimum SDK | 26 (Android 8.0 Oreo) |
| Compile SDK | 36 |
| JVM target | 21 |
| Kotlin plugin | kotlin("android") or android.kotlin.multiplatform.library |
iOS
| Requirement | Value |
|---|---|
| Targets | iosArm64, iosSimulatorArm64, iosX64 |
| Kotlin plugin | kotlin("multiplatform") |
Shared
- Kotlin Multiplatform Gradle plugin (version compatible with your Kotlin version)
- kotlinx.serialization plugin:
org.jetbrains.kotlin.plugin.serialization - Android Gradle Plugin (AGP) compatible with your
compileSdk = 36 jvmToolchain(21)configured in thekotlin {}block
Android project setup
Clone or copy the innertube module
Clone the Inner repository alongside your project, or copy the After this step your project directory should contain an
innertube directory directly into your project root:innertube/ folder with its own build.gradle.kts.Include the module in settings.gradle.kts
Open your project’s
settings.gradle.kts and add the module:settings.gradle.kts
Add the dependency in your app module
In your app module’s
build.gradle.kts, declare innertube as an implementation dependency:app/build.gradle.kts
Understand the bundled dependencies
The
You do not need to redeclare any of these in your app module — transitive dependency resolution handles them automatically.
innertube module declares all its own dependencies. When you include it you automatically get:commonMain (Android + iOS)| Library | Purpose |
|---|---|
ktor-client-core | Multiplatform HTTP client |
ktor-client-content-negotiation | Content-type negotiation plugin |
ktor-client-encoding | Gzip/deflate content-encoding plugin |
ktor-serialization-kotlinx-json | JSON serialisation via kotlinx.serialization |
androidMain only| Library | Purpose |
|---|---|
ktor-client-okhttp | OkHttp-backed Ktor engine |
brotli | Brotli decompression for Android HTTP responses |
newpipe-extractor | Stream URL extraction and cipher decoding |
re2j | RE2-compatible regex used during stream processing |
rhino | Mozilla Rhino JS engine, used to generate PoTokens |
KMP project setup
For a Kotlin Multiplatform project targeting both Android and iOS, follow the same steps as above but referencePortableInnertube from your commonMain source set instead of the Android-only YouTube singleton.
Clone or copy the innertube module
Same as the Android setup — clone the repository or copy the
innertube directory into your project root.Add the dependency in your shared KMP module
shared/build.gradle.kts
innertube module’s iosMain source set automatically uses ktor-client-darwin (Apple’s URLSession-backed engine). No additional configuration is needed on your side.Use PortableInnertube in commonMain
PortableInnertube is the KMP entry point available in commonMain. It accepts an optional HttpClient and exposes search, browse, home, album, artist, and playlist operations as suspend functions:shared/src/commonMain/kotlin/MusicRepository.kt
iosMain — PortableInnertube covers browse and search on both platforms.Verify the setup
Once Gradle has synced successfully, confirm everything is wired correctly with a minimal smoke test that makes a live network call to the YouTube Music API — no authentication required. Android — callYouTube.visitorData(), which fetches a visitor-data token from the YouTube Music home page:
Cgt or Cgs confirms that the HTTP client is configured correctly and the youtubei/v1/ endpoint is reachable.
KMP (commonMain / iOS) — call PortableInnertube.search() with an empty-ish query:
The
innertube module targets JVM 21. Make sure your project’s jvmToolchain is set to 21, or that your compileOptions / kotlinOptions allow JVM 21 bytecode. Projects configured for an older JVM target will fail to compile with an “unsupported class file major version” error at runtime or a bytecode incompatibility error at build time.