Skip to content

Commit

Permalink
Merge pull request #258 from vivid-money/binary-compatibility-validator
Browse files Browse the repository at this point in the history
use binary compatibility validator
  • Loading branch information
sergei-lapin authored Apr 22, 2024
2 parents 6686192 + e19b283 commit db0d7d1
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Run android lint
run: ./gradlew lint

- name : Run api compatibility check
run: ./gradlew apiCheck

- name: Build project
run: ./gradlew assemble

79 changes: 79 additions & 0 deletions elmslie-android/api/elmslie-android.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
public final class money/vivid/elmslie/android/ElmStoreLazyKt {
public static final fun elmStore (Landroidx/activity/ComponentActivity;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lkotlin/Lazy;
public static final fun elmStore (Landroidx/fragment/app/Fragment;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lkotlin/Lazy;
public static synthetic fun elmStore$default (Landroidx/activity/ComponentActivity;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/Lazy;
public static synthetic fun elmStore$default (Landroidx/fragment/app/Fragment;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/Lazy;
}

public final class money/vivid/elmslie/android/RetainedElmStore : androidx/lifecycle/ViewModel {
public static final field Companion Lmoney/vivid/elmslie/android/RetainedElmStore$Companion;
public static final field StateBundleKey Ljava/lang/String;
public fun <init> (Landroidx/lifecycle/SavedStateHandle;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)V
public final fun getStore ()Lmoney/vivid/elmslie/core/store/EffectCachingElmStore;
}

public final class money/vivid/elmslie/android/RetainedElmStore$Companion {
}

public final class money/vivid/elmslie/android/RetainedElmStoreFactory : androidx/lifecycle/AbstractSavedStateViewModelFactory {
public fun <init> (Landroidx/savedstate/SavedStateRegistryOwner;Landroid/os/Bundle;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)V
}

public final class money/vivid/elmslie/android/logger/DefaultLoggerConfigurationsKt {
public static final fun defaultDebugLogger (Lmoney/vivid/elmslie/core/config/ElmslieConfig;)V
public static final fun defaultReleaseLogger (Lmoney/vivid/elmslie/core/config/ElmslieConfig;)V
}

public final class money/vivid/elmslie/android/logger/DefaultLoggerInitializer : androidx/startup/Initializer {
public fun <init> ()V
public synthetic fun create (Landroid/content/Context;)Ljava/lang/Object;
public fun create (Landroid/content/Context;)V
public fun dependencies ()Ljava/util/List;
}

public final class money/vivid/elmslie/android/logger/strategy/AndroidLog {
public static final field INSTANCE Lmoney/vivid/elmslie/android/logger/strategy/AndroidLog;
public final fun getD ()Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;
public final fun getE ()Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;
public final fun getI ()Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;
public final fun getV ()Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;
public final fun getW ()Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;
}

public final class money/vivid/elmslie/android/logger/strategy/Crash : money/vivid/elmslie/core/logger/strategy/LogStrategy {
public static final field INSTANCE Lmoney/vivid/elmslie/android/logger/strategy/Crash;
public fun log (Lmoney/vivid/elmslie/core/logger/LogSeverity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
}

public final class money/vivid/elmslie/android/processdeath/ProcessDeathDetector {
public static final field INSTANCE Lmoney/vivid/elmslie/android/processdeath/ProcessDeathDetector;
public final fun isRestoringAfterProcessDeath ()Z
}

public final class money/vivid/elmslie/android/processdeath/ProcessDeathDetectorInitializer : androidx/startup/Initializer {
public fun <init> ()V
public synthetic fun create (Landroid/content/Context;)Ljava/lang/Object;
public fun create (Landroid/content/Context;)V
public fun dependencies ()Ljava/util/List;
}

public abstract interface class money/vivid/elmslie/android/renderer/ElmRendererDelegate {
public abstract fun handleEffect (Ljava/lang/Object;)Lkotlin/Unit;
public abstract fun mapList (Ljava/lang/Object;)Ljava/util/List;
public abstract fun render (Ljava/lang/Object;)V
public abstract fun renderList (Ljava/lang/Object;Ljava/util/List;)V
}

public final class money/vivid/elmslie/android/renderer/ElmRendererDelegate$DefaultImpls {
public static fun handleEffect (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/Object;)Lkotlin/Unit;
public static fun mapList (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/Object;)Ljava/util/List;
public static fun renderList (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/Object;Ljava/util/List;)V
}

public final class money/vivid/elmslie/android/renderer/ElmRendererDelegateKt {
public static final fun androidElmStore (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lkotlin/Lazy;
public static final fun androidElmStore (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lkotlin/Lazy;
public static synthetic fun androidElmStore$default (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/Lazy;
public static synthetic fun androidElmStore$default (Lmoney/vivid/elmslie/android/renderer/ElmRendererDelegate;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/Lazy;
}

1 change: 1 addition & 0 deletions elmslie-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("elmslie.android-lib")
alias(libs.plugins.binaryCompatibilityValidator)
}

android {
Expand Down
184 changes: 184 additions & 0 deletions elmslie-core/api/elmslie-core.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
public final class money/vivid/elmslie/core/ElmScopeKt {
public static final fun ElmScope (Ljava/lang/String;)Lkotlinx/coroutines/CoroutineScope;
}

public final class money/vivid/elmslie/core/config/ElmslieConfig {
public static final field INSTANCE Lmoney/vivid/elmslie/core/config/ElmslieConfig;
public final fun getGlobalStoreListeners ()Ljava/util/Set;
public final fun getIoDispatchers ()Lkotlinx/coroutines/CoroutineDispatcher;
public final fun getLogger ()Lmoney/vivid/elmslie/core/logger/ElmslieLogger;
public final fun getShouldStopOnProcessDeath ()Z
public final fun globalStoreListeners (Lkotlin/jvm/functions/Function0;)V
public final fun ioDispatchers (Lkotlin/jvm/functions/Function0;)V
public final fun logger (Lkotlin/jvm/functions/Function1;)V
public final fun shouldStopOnProcessDeath (Lkotlin/jvm/functions/Function0;)V
}

public final class money/vivid/elmslie/core/logger/ElmslieLogConfiguration {
public fun <init> ()V
public final fun always (Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;)Lmoney/vivid/elmslie/core/logger/ElmslieLogConfiguration;
public final fun debug (Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;)Lmoney/vivid/elmslie/core/logger/ElmslieLogConfiguration;
public final fun fatal (Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;)Lmoney/vivid/elmslie/core/logger/ElmslieLogConfiguration;
public final fun nonfatal (Lmoney/vivid/elmslie/core/logger/strategy/LogStrategy;)Lmoney/vivid/elmslie/core/logger/ElmslieLogConfiguration;
}

public final class money/vivid/elmslie/core/logger/ElmslieLogger {
public fun <init> (Ljava/util/Map;)V
public final fun debug (Ljava/lang/String;Ljava/lang/String;)V
public static synthetic fun debug$default (Lmoney/vivid/elmslie/core/logger/ElmslieLogger;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V
public final fun fatal (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
public static synthetic fun fatal$default (Lmoney/vivid/elmslie/core/logger/ElmslieLogger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
public final fun nonfatal (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
public static synthetic fun nonfatal$default (Lmoney/vivid/elmslie/core/logger/ElmslieLogger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
}

public final class money/vivid/elmslie/core/logger/LogSeverity : java/lang/Enum {
public static final field Debug Lmoney/vivid/elmslie/core/logger/LogSeverity;
public static final field Fatal Lmoney/vivid/elmslie/core/logger/LogSeverity;
public static final field NonFatal Lmoney/vivid/elmslie/core/logger/LogSeverity;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lmoney/vivid/elmslie/core/logger/LogSeverity;
public static fun values ()[Lmoney/vivid/elmslie/core/logger/LogSeverity;
}

public final class money/vivid/elmslie/core/logger/strategy/IgnoreLog : money/vivid/elmslie/core/logger/strategy/LogStrategy {
public static final field INSTANCE Lmoney/vivid/elmslie/core/logger/strategy/IgnoreLog;
public fun log (Lmoney/vivid/elmslie/core/logger/LogSeverity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
}

public abstract interface class money/vivid/elmslie/core/logger/strategy/LogStrategy {
public abstract fun log (Lmoney/vivid/elmslie/core/logger/LogSeverity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
}

public abstract class money/vivid/elmslie/core/store/Actor {
public fun <init> ()V
protected final fun asSwitchFlow (Lkotlinx/coroutines/flow/Flow;Ljava/lang/Object;J)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun asSwitchFlow$default (Lmoney/vivid/elmslie/core/store/Actor;Lkotlinx/coroutines/flow/Flow;Ljava/lang/Object;JILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
protected final fun cancelSwitchFlow (Lkotlin/reflect/KClass;)Lkotlinx/coroutines/flow/Flow;
public abstract fun execute (Ljava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public final fun mapEvents (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun mapEvents$default (Lmoney/vivid/elmslie/core/store/Actor;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}

public final class money/vivid/elmslie/core/store/EffectCachingElmStore : money/vivid/elmslie/core/store/Store {
public fun <init> (Lmoney/vivid/elmslie/core/store/Store;)V
public fun accept (Ljava/lang/Object;)V
public fun getEffects ()Lkotlinx/coroutines/flow/Flow;
public fun getScope ()Lkotlinx/coroutines/CoroutineScope;
public fun getStartEvent ()Ljava/lang/Object;
public fun getStates ()Lkotlinx/coroutines/flow/StateFlow;
public fun start ()Lmoney/vivid/elmslie/core/store/Store;
public fun stop ()V
}

public final class money/vivid/elmslie/core/store/ElmStore : money/vivid/elmslie/core/store/Store {
public fun <init> (Ljava/lang/Object;Lmoney/vivid/elmslie/core/store/StateReducer;Lmoney/vivid/elmslie/core/store/Actor;Ljava/util/Set;Ljava/lang/Object;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/Object;Lmoney/vivid/elmslie/core/store/StateReducer;Lmoney/vivid/elmslie/core/store/Actor;Ljava/util/Set;Ljava/lang/Object;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun accept (Ljava/lang/Object;)V
public fun getEffects ()Lkotlinx/coroutines/flow/Flow;
public fun getScope ()Lkotlinx/coroutines/CoroutineScope;
public fun getStartEvent ()Ljava/lang/Object;
public fun getStates ()Lkotlinx/coroutines/flow/StateFlow;
public fun start ()Lmoney/vivid/elmslie/core/store/Store;
public fun stop ()V
}

public final class money/vivid/elmslie/core/store/ElmStoreKt {
public static final fun toCachedStore (Lmoney/vivid/elmslie/core/store/Store;)Lmoney/vivid/elmslie/core/store/EffectCachingElmStore;
}

public final class money/vivid/elmslie/core/store/NoOpActor : money/vivid/elmslie/core/store/Actor {
public fun <init> ()V
public fun execute (Ljava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}

public final class money/vivid/elmslie/core/store/NoOpReducer : money/vivid/elmslie/core/store/StateReducer {
public fun <init> ()V
}

public final class money/vivid/elmslie/core/store/Result {
public fun <init> (Ljava/lang/Object;)V
public fun <init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
public synthetic fun <init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/Object;Ljava/util/List;)V
public fun <init> (Ljava/lang/Object;Ljava/util/List;Ljava/util/List;)V
public final fun component1 ()Ljava/lang/Object;
public final fun component2 ()Ljava/util/List;
public final fun component3 ()Ljava/util/List;
public final fun copy (Ljava/lang/Object;Ljava/util/List;Ljava/util/List;)Lmoney/vivid/elmslie/core/store/Result;
public static synthetic fun copy$default (Lmoney/vivid/elmslie/core/store/Result;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lmoney/vivid/elmslie/core/store/Result;
public fun equals (Ljava/lang/Object;)Z
public final fun getCommands ()Ljava/util/List;
public final fun getEffects ()Ljava/util/List;
public final fun getState ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract class money/vivid/elmslie/core/store/ScreenReducer : money/vivid/elmslie/core/store/StateReducer {
public fun <init> (Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;)V
protected abstract fun internal (Lmoney/vivid/elmslie/core/store/StateReducer$Result;Ljava/lang/Object;)Ljava/lang/Object;
protected fun reduce (Lmoney/vivid/elmslie/core/store/StateReducer$Result;Ljava/lang/Object;)V
protected abstract fun ui (Lmoney/vivid/elmslie/core/store/StateReducer$Result;Ljava/lang/Object;)Ljava/lang/Object;
}

public abstract class money/vivid/elmslie/core/store/StateReducer {
public fun <init> ()V
public final fun reduce (Ljava/lang/Object;Ljava/lang/Object;)Lmoney/vivid/elmslie/core/store/Result;
protected abstract fun reduce (Lmoney/vivid/elmslie/core/store/StateReducer$Result;Ljava/lang/Object;)V
}

protected final class money/vivid/elmslie/core/store/StateReducer$Result : money/vivid/elmslie/core/store/dsl/ResultBuilder {
public fun <init> (Lmoney/vivid/elmslie/core/store/StateReducer;Ljava/lang/Object;)V
}

public abstract interface class money/vivid/elmslie/core/store/Store {
public abstract fun accept (Ljava/lang/Object;)V
public abstract fun getEffects ()Lkotlinx/coroutines/flow/Flow;
public abstract fun getScope ()Lkotlinx/coroutines/CoroutineScope;
public abstract fun getStartEvent ()Ljava/lang/Object;
public abstract fun getStates ()Lkotlinx/coroutines/flow/StateFlow;
public abstract fun start ()Lmoney/vivid/elmslie/core/store/Store;
public abstract fun stop ()V
}

public abstract interface class money/vivid/elmslie/core/store/StoreListener {
public abstract fun onActorError (Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
public abstract fun onAfterEvent (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
public abstract fun onBeforeEvent (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public abstract fun onCommand (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public abstract fun onEffect (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public abstract fun onReducerError (Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
}

public final class money/vivid/elmslie/core/store/StoreListener$DefaultImpls {
public static fun onActorError (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
public static fun onAfterEvent (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
public static fun onBeforeEvent (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public static fun onCommand (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public static fun onEffect (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
public static fun onReducerError (Lmoney/vivid/elmslie/core/store/StoreListener;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
}

public final class money/vivid/elmslie/core/store/dsl/OperationsBuilder {
public fun <init> ()V
public final fun unaryPlus (Ljava/lang/Object;)V
}

public class money/vivid/elmslie/core/store/dsl/ResultBuilder {
public fun <init> (Ljava/lang/Object;)V
public final fun commands (Lkotlin/jvm/functions/Function1;)V
public final fun effects (Lkotlin/jvm/functions/Function1;)V
public final fun getInitialState ()Ljava/lang/Object;
public final fun getState ()Ljava/lang/Object;
public final fun state (Lkotlin/jvm/functions/Function1;)V
}

public final class money/vivid/elmslie/core/switcher/Switcher {
public fun <init> ()V
public final fun cancel (J)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun cancel$default (Lmoney/vivid/elmslie/core/switcher/Switcher;JILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public final fun switch (JLkotlin/jvm/functions/Function0;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun switch$default (Lmoney/vivid/elmslie/core/switcher/Switcher;JLkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}

1 change: 1 addition & 0 deletions elmslie-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("elmslie.kotlin-multiplatform-lib")
alias(libs.plugins.binaryCompatibilityValidator)
}

kotlin {
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ kotlinx-coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-te

[plugins]
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.14.0" }

0 comments on commit db0d7d1

Please sign in to comment.