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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ jobs:
- name: spotless
run: ./gradlew spotlessCheck

stability_check:
name: Compose stability check
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5.0.0
with:
distribution: 'zulu'
java-version: 21
- name: Run Compose stability analyzer
run: ./gradlew :jetlime:stabilityCheck

build:
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.spotless) apply false
alias(libs.plugins.kotlin.cocoapods) apply false
alias(libs.plugins.compose.compiler.report.generator) apply false
alias(libs.plugins.stability.analyzer) apply false
}

// Compose Compiler Metrics
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Code style
kotlin.code.style=official
# Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options="-Xmx2048M"
# Increase heap size for Kotlin/Wasm compilation
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
# Android
android.nonTransitiveRClass=true
android.useAndroidX=true
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ report = "1.4.2"
junitVersion = "1.3.0"
androidxTest = "1.7.0"
composeBom = "2025.11.01"
stabilityAnalyzer = "0.6.0"

[libraries]
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
Expand All @@ -35,4 +36,5 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref
kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
nexus-vanniktech-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
stability-analyzer = { id = "com.github.skydoves.compose.stability.analyzer", version.ref = "stabilityAnalyzer" }
1 change: 1 addition & 0 deletions jetlime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlin.cocoapods)
alias(libs.plugins.nexus.vanniktech.publish)
alias(libs.plugins.dokka)
alias(libs.plugins.stability.analyzer)
}

// Dokka V2 extension
Expand Down
177 changes: 177 additions & 0 deletions jetlime/stability/jetlime.stability
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
// This file was automatically generated by Compose Stability Analyzer
// https://github.com/skydoves/compose-stability-analyzer
//
// Do not edit this file directly. To update it, run:
// ./gradlew :jetlime:stabilityDump

@Composable
internal fun com.pushpal.jetlime.HorizontalEvent(style: com.pushpal.jetlime.JetLimeEventStyle, jetLimeStyle: com.pushpal.jetlime.JetLimeStyle, modifier: androidx.compose.ui.Modifier, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- style: STABLE (marked @Stable or @Immutable)
- jetLimeStyle: STABLE (marked @Stable or @Immutable)
- modifier: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
public fun com.pushpal.jetlime.JetLimeColumn(itemsList: com.pushpal.jetlime.ItemsList<T of com.pushpal.jetlime.JetLimeColumn>, modifier: androidx.compose.ui.Modifier, style: com.pushpal.jetlime.JetLimeStyle, listState: androidx.compose.foundation.lazy.LazyListState, contentPadding: androidx.compose.foundation.layout.PaddingValues, key: kotlin.Function2<@[ParameterName(name = \, itemContent: @[Composable] androidx.compose.runtime.internal.ComposableFunction3<@[ParameterName(name = \): kotlin.Unit
skippable: true
restartable: true
params:
- itemsList: STABLE (marked @Stable or @Immutable)
- modifier: STABLE (marked @Stable or @Immutable)
- style: STABLE (marked @Stable or @Immutable)
- listState: STABLE (marked @Stable or @Immutable)
- contentPadding: STABLE (marked @Stable or @Immutable)
- key: STABLE (function type)
- itemContent: STABLE (composable function type)

@Composable
public fun com.pushpal.jetlime.JetLimeDefaults.columnStyle(contentDistance: androidx.compose.ui.unit.Dp, itemSpacing: androidx.compose.ui.unit.Dp, lineThickness: androidx.compose.ui.unit.Dp, lineBrush: androidx.compose.ui.graphics.Brush, pathEffect: androidx.compose.ui.graphics.PathEffect?, lineVerticalAlignment: com.pushpal.jetlime.VerticalAlignment): com.pushpal.jetlime.JetLimeStyle
skippable: false
restartable: true
params:
- contentDistance: STABLE (marked @Stable or @Immutable)
- itemSpacing: STABLE (marked @Stable or @Immutable)
- lineThickness: STABLE (marked @Stable or @Immutable)
- lineBrush: STABLE (marked @Stable or @Immutable)
- pathEffect: RUNTIME (requires runtime check)
- lineVerticalAlignment: STABLE (marked @Stable or @Immutable)

@Composable
internal fun com.pushpal.jetlime.JetLimeDefaults.jetLimeStyle(contentDistance: androidx.compose.ui.unit.Dp, itemSpacing: androidx.compose.ui.unit.Dp, lineThickness: androidx.compose.ui.unit.Dp, lineBrush: androidx.compose.ui.graphics.Brush, pathEffect: androidx.compose.ui.graphics.PathEffect?, lineHorizontalAlignment: com.pushpal.jetlime.HorizontalAlignment, lineVerticalAlignment: com.pushpal.jetlime.VerticalAlignment): com.pushpal.jetlime.JetLimeStyle
skippable: false
restartable: true
params:
- contentDistance: STABLE (marked @Stable or @Immutable)
- itemSpacing: STABLE (marked @Stable or @Immutable)
- lineThickness: STABLE (marked @Stable or @Immutable)
- lineBrush: STABLE (marked @Stable or @Immutable)
- pathEffect: RUNTIME (requires runtime check)
- lineHorizontalAlignment: STABLE (marked @Stable or @Immutable)
- lineVerticalAlignment: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.pushpal.jetlime.JetLimeDefaults.lineGradientBrush(colors: kotlinx.collections.immutable.ImmutableList<androidx.compose.ui.graphics.Color>, start: androidx.compose.ui.geometry.Offset, end: androidx.compose.ui.geometry.Offset, tileMode: androidx.compose.ui.graphics.TileMode): androidx.compose.ui.graphics.Brush
skippable: true
restartable: true
params:
- colors: STABLE (known stable type)
- start: STABLE (marked @Stable or @Immutable)
- end: STABLE (marked @Stable or @Immutable)
- tileMode: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.pushpal.jetlime.JetLimeDefaults.lineSolidBrush(color: androidx.compose.ui.graphics.Color): androidx.compose.ui.graphics.Brush
skippable: true
restartable: true
params:
- color: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.pushpal.jetlime.JetLimeDefaults.rowStyle(contentDistance: androidx.compose.ui.unit.Dp, itemSpacing: androidx.compose.ui.unit.Dp, lineThickness: androidx.compose.ui.unit.Dp, lineBrush: androidx.compose.ui.graphics.Brush, pathEffect: androidx.compose.ui.graphics.PathEffect?, lineHorizontalAlignment: com.pushpal.jetlime.HorizontalAlignment): com.pushpal.jetlime.JetLimeStyle
skippable: false
restartable: true
params:
- contentDistance: STABLE (marked @Stable or @Immutable)
- itemSpacing: STABLE (marked @Stable or @Immutable)
- lineThickness: STABLE (marked @Stable or @Immutable)
- lineBrush: STABLE (marked @Stable or @Immutable)
- pathEffect: RUNTIME (requires runtime check)
- lineHorizontalAlignment: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.pushpal.jetlime.JetLimeEvent(modifier: androidx.compose.ui.Modifier, style: com.pushpal.jetlime.JetLimeEventStyle, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- modifier: STABLE (marked @Stable or @Immutable)
- style: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
public fun com.pushpal.jetlime.JetLimeEventDefaults.eventStyle(position: com.pushpal.jetlime.EventPosition, pointPlacement: com.pushpal.jetlime.PointPlacement, pointType: com.pushpal.jetlime.EventPointType, pointColor: androidx.compose.ui.graphics.Color, pointFillColor: androidx.compose.ui.graphics.Color, pointRadius: androidx.compose.ui.unit.Dp, pointAnimation: com.pushpal.jetlime.EventPointAnimation?, pointStrokeWidth: androidx.compose.ui.unit.Dp, pointStrokeColor: androidx.compose.ui.graphics.Color): com.pushpal.jetlime.JetLimeEventStyle
skippable: true
restartable: true
params:
- position: STABLE (marked @Stable or @Immutable)
- pointPlacement: STABLE (class with no mutable properties)
- pointType: STABLE (marked @Stable or @Immutable)
- pointColor: STABLE (marked @Stable or @Immutable)
- pointFillColor: STABLE (marked @Stable or @Immutable)
- pointRadius: STABLE (marked @Stable or @Immutable)
- pointAnimation: STABLE (marked @Stable or @Immutable)
- pointStrokeWidth: STABLE (marked @Stable or @Immutable)
- pointStrokeColor: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.pushpal.jetlime.JetLimeEventDefaults.pointAnimation(initialValue: kotlin.Float, targetValue: kotlin.Float, animationSpec: androidx.compose.animation.core.InfiniteRepeatableSpec<kotlin.Float>): com.pushpal.jetlime.EventPointAnimation
skippable: false
restartable: true
params:
- initialValue: STABLE (primitive type)
- targetValue: STABLE (primitive type)
- animationSpec: RUNTIME (requires runtime check)

@Composable
public fun com.pushpal.jetlime.JetLimeExtendedEvent(modifier: androidx.compose.ui.Modifier, style: com.pushpal.jetlime.JetLimeEventStyle, additionalContent: @[Composable] @[ExtensionFunctionType] androidx.compose.runtime.internal.ComposableFunction1<androidx.compose.foundation.layout.BoxScope, kotlin.Unit>, additionalContentMaxWidth: androidx.compose.ui.unit.Dp, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- modifier: STABLE (marked @Stable or @Immutable)
- style: STABLE (marked @Stable or @Immutable)
- additionalContent: STABLE (composable function type)
- additionalContentMaxWidth: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
public fun com.pushpal.jetlime.JetLimeRow(itemsList: com.pushpal.jetlime.ItemsList<T of com.pushpal.jetlime.JetLimeRow>, modifier: androidx.compose.ui.Modifier, style: com.pushpal.jetlime.JetLimeStyle, listState: androidx.compose.foundation.lazy.LazyListState, contentPadding: androidx.compose.foundation.layout.PaddingValues, key: kotlin.Function2<@[ParameterName(name = \, itemContent: @[Composable] androidx.compose.runtime.internal.ComposableFunction3<@[ParameterName(name = \): kotlin.Unit
skippable: true
restartable: true
params:
- itemsList: STABLE (marked @Stable or @Immutable)
- modifier: STABLE (marked @Stable or @Immutable)
- style: STABLE (marked @Stable or @Immutable)
- listState: STABLE (marked @Stable or @Immutable)
- contentPadding: STABLE (marked @Stable or @Immutable)
- key: STABLE (function type)
- itemContent: STABLE (composable function type)

@Composable
private fun com.pushpal.jetlime.PlaceHorizontalEventContent(style: com.pushpal.jetlime.JetLimeEventStyle, jetLimeStyle: com.pushpal.jetlime.JetLimeStyle, alignment: com.pushpal.jetlime.HorizontalAlignment, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- style: STABLE (marked @Stable or @Immutable)
- jetLimeStyle: STABLE (marked @Stable or @Immutable)
- alignment: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
private fun com.pushpal.jetlime.PlaceVerticalEventContent(style: com.pushpal.jetlime.JetLimeEventStyle, jetLimeStyle: com.pushpal.jetlime.JetLimeStyle, alignment: com.pushpal.jetlime.VerticalAlignment, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- style: STABLE (marked @Stable or @Immutable)
- jetLimeStyle: STABLE (marked @Stable or @Immutable)
- alignment: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
internal fun com.pushpal.jetlime.VerticalEvent(style: com.pushpal.jetlime.JetLimeEventStyle, jetLimeStyle: com.pushpal.jetlime.JetLimeStyle, modifier: androidx.compose.ui.Modifier, content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
skippable: true
restartable: true
params:
- style: STABLE (marked @Stable or @Immutable)
- jetLimeStyle: STABLE (marked @Stable or @Immutable)
- modifier: STABLE (marked @Stable or @Immutable)
- content: STABLE (composable function type)

@Composable
internal fun com.pushpal.jetlime.calculateRadiusAnimFactor(style: com.pushpal.jetlime.JetLimeEventStyle): androidx.compose.runtime.State<kotlin.Float>
skippable: true
restartable: true
params:
- style: STABLE (marked @Stable or @Immutable)

1 change: 1 addition & 0 deletions sample/composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlin.cocoapods)
alias(libs.plugins.compose.compiler.report.generator)
alias(libs.plugins.stability.analyzer)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions sample/composeApp/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* MIT License
*
* Copyright (c) 2024 Pushpal Roy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package com.pushpal.jetlime.sample

import android.app.Application
import android.util.Log
import com.skydoves.compose.stability.runtime.ComposeStabilityAnalyzer
import com.skydoves.compose.stability.runtime.RecompositionEvent
import com.skydoves.compose.stability.runtime.RecompositionLogger

class MyApplication : Application() {

override fun onCreate() {
super.onCreate()

// Enable default logger for debug builds
ComposeStabilityAnalyzer.setEnabled(true)
setupCustomLogger()
}

private fun setupCustomLogger() {
ComposeStabilityAnalyzer.setLogger(
object : RecompositionLogger {
override fun log(event: RecompositionEvent) {
val message = buildString {
append("🔄 Recomposition #${event.recompositionCount}")
append(" - ${event.composableName}")
if (event.tag.isNotEmpty()) {
append(" [${event.tag}]")
}
appendLine()

event.parameterChanges.forEach { change ->
append(" • ${change.name}: ${change.type}")
when {
change.changed -> append(" ➡️ CHANGED")
change.stable -> append(" ✅ STABLE")
else -> append(" ⚠️ UNSTABLE")
}
appendLine()
}

if (event.unstableParameters.isNotEmpty()) {
append(" ⚠️ Unstable: ${event.unstableParameters.joinToString()}")
}
}
Log.d("CustomRecomposition", message)
}
},
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ import com.pushpal.jetlime.JetLimeColumn
import com.pushpal.jetlime.JetLimeEvent
import com.pushpal.jetlime.JetLimeEventDefaults
import com.pushpal.jetlime.PointPlacement
import com.skydoves.compose.stability.runtime.TraceRecomposition
import data.getCharacters
import org.jetbrains.compose.ui.tooling.preview.Preview
import timelines.event.VerticalEventContent

@ExperimentalAnimationApi
@TraceRecomposition
@Composable
fun BasicVerticalTimeLine(modifier: Modifier = Modifier, showSnackbar: (message: String) -> Unit) {
val items = remember { getCharacters().subList(0, 4) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import com.pushpal.jetlime.JetLimeColumn
import com.pushpal.jetlime.JetLimeDefaults
import com.pushpal.jetlime.JetLimeEventDefaults
import com.pushpal.jetlime.JetLimeExtendedEvent
import com.skydoves.compose.stability.runtime.TraceRecomposition
import data.Item
import data.activityNames
import data.placeNames
Expand All @@ -61,6 +62,7 @@ import timelines.event.placeInfo

@OptIn(ExperimentalComposeApi::class)
@ExperimentalAnimationApi
@TraceRecomposition
@Composable
fun ExtendedVerticalTimeLine(
modifier: Modifier = Modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ import com.pushpal.jetlime.JetLimeDefaults
import com.pushpal.jetlime.JetLimeEvent
import com.pushpal.jetlime.JetLimeEventDefaults
import com.pushpal.jetlime.PointPlacement
import com.skydoves.compose.stability.runtime.TraceRecomposition
import data.Item
import data.getCharacters
import org.jetbrains.compose.ui.tooling.preview.Preview
import timelines.event.VerticalEventContent

@ExperimentalAnimationApi
@TraceRecomposition
@Composable
fun VerticalDynamicTimeLine(
modifier: Modifier = Modifier,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading