Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/publish_api_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
# ANDROID_SDK_ROOT is exported into the process env by setup-android above.
run: |
export NDK_PATH="${ANDROID_SDK_ROOT}/android-ndk-r27c"
./gradlew kotlin:dokkaHtml
./gradlew kotlin:dokkaGenerate

# v5 specifically: it sends session tags on AssumeRoleWithWebIdentity, which
# the deploy role's trust policy allows (sts:TagSession). v2 would not tag.
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,56 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### Unreleased (next major) — Kotlin Multiplatform

The runtime is now a Kotlin Multiplatform library built around the Compose API.
The legacy View-based API has been removed.

**Coordinates**

- New umbrella coordinate `app.rive:rive` for multiplatform consumers.
- Android consumers keep resolving `app.rive:rive-android` (published as the
KMP Android target; still an AAR with all four ABIs).
- New `app.rive:rive-jvm` desktop target with real rendering on macOS
(Vulkan via bundled MoltenVK). `iosArm64`/`iosSimulatorArm64`/`wasmJs`
publish as compiling stubs; rendering support is planned.

**Removed**

- The entire View-based API (`app.rive.runtime.kotlin.*`): `RiveAnimationView`,
`RiveArtboardRenderer`, controllers, listeners, and the XML attributes.
Use the Compose API (`app.rive.Rive`).
- ReLinker-based native loading (plain `System.loadLibrary` at minSdk 23).

**Breaking changes**

- minSdk raised from 21 to 23.
- Gradle consumers need Kotlin 2.2+ to resolve the KMP metadata; the Android
AAR remains consumable from plain Maven/AGP builds.
- Compose dependencies moved from `androidx.compose` to `org.jetbrains.compose`
(Compose Multiplatform 1.11).
- Package moves: `app.rive.runtime.kotlin.core.File.Enum` →
`app.rive.core.FileEnum`; `ViewModel.Property` / `ViewModel.PropertyDataType` →
`app.rive.core.ViewModelProperty` / `app.rive.core.ViewModelPropertyDataType`;
font helpers → `app.rive.fonts`; `ImageDecoder` → `app.rive.core.ImageDecoder`;
`RiveInitializer` → `app.rive.RiveInitializer`. Resource namespace is now
`app.rive`.
- `RiveFileSource` is an interface with `suspend fun load(): ByteArray`
(was a sealed class); `Bytes` is common, `RawRes` is Android-only.
- `Rive()`'s first-frame callback is `onFrameCaptured: ((ImageBitmap) -> Unit)?`
(was `onBitmapAvailable` with an Android `Bitmap`).
- The default frame ticker uses the Compose frame clock when the calling
context has one, and a ~60 Hz delay otherwise (was `Choreographer`).
`ChoreographerFrameTicker` remains available on Android for vsync-aligned
ticking outside Compose.

**Added**

- Desktop JVM rendering (offscreen Vulkan/MoltenVK), enabling Compose Desktop
apps and real rendering inside Android Studio previews when the desktop
natives are on the preview classpath.
- `RiveLog` is common; `LogcatLogger` remains available on Android.

#### [11.7.2](https://github.com/rive-app/rive-android/compare/11.7.1...11.7.2)

- fix(Android): Lock mutation APIs (#13024) 3c0e143d93 [`dfd4f2f`](https://github.com/rive-app/rive-android/commit/dfd4f2fba6d36e8d71395a91daab6a53ab34e24f)
Expand Down
33 changes: 8 additions & 25 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}

android {
Expand All @@ -10,7 +11,7 @@ android {

defaultConfig {
applicationId "app.rive.runtime.example"
minSdkVersion 21
minSdkVersion 23
targetSdk = 36
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -38,14 +39,6 @@ android {
profileable true
signingConfig = signingConfigs.debug
}
preview {
debuggable true
minifyEnabled false
shrinkResources = false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
getIsDefault().set(true)
signingConfig = signingConfigs.debug
}
}

def javaVersion = JavaVersion.VERSION_11
Expand All @@ -58,14 +51,8 @@ android {
}

buildFeatures {
viewBinding = true
compose = true
}
composeOptions {
// Chosen to match Kotlin version
// https://developer.android.com/jetpack/androidx/releases/compose-kotlin
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -83,23 +70,19 @@ dependencies {
def composeBom = platform(libs.androidx.compose.bom)

implementation(composeBom)
implementation(libs.android.volley)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material.icons.core)
implementation(libs.androidx.compose.ui.tooling.preview.android)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.startup.runtime)
implementation(libs.google.material)

debugImplementation project(path: ":kotlin")
benchmarkImplementation project(path: ":kotlin")
releaseImplementation project(path: ":kotlin")
previewImplementation(libs.rive.android.preview)

androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation project(path: ":kotlin")
implementation project(path: ":kotlin")
// Desktop natives so Android Studio previews can really render Rive
debugImplementation project(path: ":rive-preview")
// Hosts @Preview composables in the Studio preview pane (ComposeViewAdapter)
debugImplementation(libs.androidx.compose.ui.tooling)

debugImplementation(libs.leakcanary)
}

This file was deleted.

Loading