From bec537cad504ff2d36aa4ea8636d896003b4dbc9 Mon Sep 17 00:00:00 2001 From: Pushpal Roy Date: Tue, 24 Sep 2024 11:20:54 -0600 Subject: [PATCH 1/2] [lib] add kotlin binary validator for api check --- build.gradle.kts | 1 + gradle/libs.versions.toml | 20 ++--- jetlime/api/android/jetlime.api | 136 ++++++++++++++++++++++++++++++++ jetlime/api/desktop/jetlime.api | 136 ++++++++++++++++++++++++++++++++ jetlime/build.gradle.kts | 1 + 5 files changed, 285 insertions(+), 9 deletions(-) create mode 100644 jetlime/api/android/jetlime.api create mode 100644 jetlime/api/desktop/jetlime.api diff --git a/build.gradle.kts b/build.gradle.kts index da578da..769bc3f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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.kotlin.binary.compatibility) apply false } // Compose Compiler Metrics diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 891809a..5773c86 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,18 +1,19 @@ [versions] -activityCompose = "1.9.2" +kotlin = "2.0.20-RC2" agp = "8.5.2" -compose-plugin = "1.6.11" jetlime = "3.0.1" +jetbrainsCompose = "1.6.11" +activityCompose = "1.9.2" junit = "4.13.2" junitVersion = "1.2.1" -kotlin = "2.0.20-RC2" -kotlinxCollectionsImmutable = "0.3.7" -truth = "1.3.0" -vanniktech = "0.28.0" +immutableCollections = "0.3.7" +truth = "1.4.2" +vanniktech = "0.29.0" dokka = "1.9.20" report = "1.4.0" spotless = "6.25.0" androidxTest = "1.6.2" +kotlinBinaryCompatibility = "0.16.3" [libraries] androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } @@ -22,7 +23,7 @@ androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } truth = { module = "com.google.truth:truth", version.ref = "truth" } -kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlinxCollectionsImmutable" } +kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "immutableCollections" } jetlime = { module = "io.github.pushpalroy:jetlime", version.ref = "jetlime" } junit = { module = "junit:junit", version.ref = "junit" } dokka-android = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka" } @@ -30,11 +31,12 @@ dokka-android = { module = "org.jetbrains.dokka:android-documentation-plugin", v [plugins] android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } -jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } +jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrainsCompose" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } compose-compiler-report-generator = { id = "dev.shreyaspatil.compose-compiler-report-generator", version.ref = "report" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } 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" } \ No newline at end of file +spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } +kotlin-binary-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibility" } \ No newline at end of file diff --git a/jetlime/api/android/jetlime.api b/jetlime/api/android/jetlime.api new file mode 100644 index 0000000..5d8fd17 --- /dev/null +++ b/jetlime/api/android/jetlime.api @@ -0,0 +1,136 @@ +public final class com/pushpal/jetlime/ComposableSingletons$JetLimeExtendedEventKt { + public static final field INSTANCE Lcom/pushpal/jetlime/ComposableSingletons$JetLimeExtendedEventKt; + public static field lambda-1 Lkotlin/jvm/functions/Function3; + public fun ()V + public final fun getLambda-1$jetlime_release ()Lkotlin/jvm/functions/Function3; +} + +public final class com/pushpal/jetlime/EventPointAnimation { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getAnimationSpec ()Landroidx/compose/animation/core/InfiniteRepeatableSpec; + public final fun getInitialValue ()F + public final fun getTargetValue ()F + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/EventPointType { + public static final field $stable I + public static final field Companion Lcom/pushpal/jetlime/EventPointType$Companion; + public synthetic fun (Ljava/lang/String;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getFillPercent ()Ljava/lang/Float; + public final fun getIcon ()Landroidx/compose/ui/graphics/painter/Painter; + public final fun getTint-QN2ZGVo ()Landroidx/compose/ui/graphics/Color; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public final fun isCustom ()Z + public final fun isEmptyOrFilled ()Z + public final fun isFilled ()Z +} + +public final class com/pushpal/jetlime/EventPointType$Companion { + public final fun custom-0Yiz4hI (Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;)Lcom/pushpal/jetlime/EventPointType; + public static synthetic fun custom-0Yiz4hI$default (Lcom/pushpal/jetlime/EventPointType$Companion;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;ILjava/lang/Object;)Lcom/pushpal/jetlime/EventPointType; + public final fun filled (F)Lcom/pushpal/jetlime/EventPointType; + public static synthetic fun filled$default (Lcom/pushpal/jetlime/EventPointType$Companion;FILjava/lang/Object;)Lcom/pushpal/jetlime/EventPointType; + public final fun getDefault ()Lcom/pushpal/jetlime/EventPointType; + public final fun getEMPTY ()Lcom/pushpal/jetlime/EventPointType; +} + +public final class com/pushpal/jetlime/EventPosition { + public static final field $stable I + public static final field Companion Lcom/pushpal/jetlime/EventPosition$Companion; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public final fun isNotEnd ()Z +} + +public final class com/pushpal/jetlime/EventPosition$Companion { + public final fun dynamic (II)Lcom/pushpal/jetlime/EventPosition; +} + +public final class com/pushpal/jetlime/HorizontalAlignment : java/lang/Enum { + public static final field BOTTOM Lcom/pushpal/jetlime/HorizontalAlignment; + public static final field TOP Lcom/pushpal/jetlime/HorizontalAlignment; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/pushpal/jetlime/HorizontalAlignment; + public static fun values ()[Lcom/pushpal/jetlime/HorizontalAlignment; +} + +public final class com/pushpal/jetlime/ItemsList { + public static final field $stable I + public fun (Ljava/util/List;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getItems ()Ljava/util/List; + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/JetLimeDefaults { + public static final field $stable I + public static final field INSTANCE Lcom/pushpal/jetlime/JetLimeDefaults; + public final fun columnStyle-QGmBr7U (FFFLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/PathEffect;Lcom/pushpal/jetlime/VerticalAlignment;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeStyle; + public final fun lineGradientBrush-OcLOKmE (Lkotlinx/collections/immutable/ImmutableList;JJILandroidx/compose/runtime/Composer;II)Landroidx/compose/ui/graphics/Brush; + public final fun lineSolidBrush-Iv8Zu3U (JLandroidx/compose/runtime/Composer;II)Landroidx/compose/ui/graphics/Brush; + public final fun rowStyle-QGmBr7U (FFFLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/PathEffect;Lcom/pushpal/jetlime/HorizontalAlignment;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeStyle; +} + +public final class com/pushpal/jetlime/JetLimeEventDefaults { + public static final field $stable I + public static final field INSTANCE Lcom/pushpal/jetlime/JetLimeEventDefaults; + public final fun eventStyle-Wv_uGHg (Lcom/pushpal/jetlime/EventPosition;Lcom/pushpal/jetlime/EventPointType;JJFLcom/pushpal/jetlime/EventPointAnimation;FJLandroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeEventStyle; + public final fun pointAnimation (FFLandroidx/compose/animation/core/InfiniteRepeatableSpec;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/EventPointAnimation; +} + +public final class com/pushpal/jetlime/JetLimeEventKt { + public static final fun JetLimeEvent (Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeEventStyle;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V +} + +public final class com/pushpal/jetlime/JetLimeEventStyle { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getPointAnimation ()Lcom/pushpal/jetlime/EventPointAnimation; + public final fun getPointColor-0d7_KjU ()J + public final fun getPointFillColor-0d7_KjU ()J + public final fun getPointRadius-D9Ej5fM ()F + public final fun getPointStrokeColor-0d7_KjU ()J + public final fun getPointStrokeWidth-D9Ej5fM ()F + public final fun getPointType ()Lcom/pushpal/jetlime/EventPointType; + public final fun getPosition ()Lcom/pushpal/jetlime/EventPosition; + public fun hashCode ()I + public final fun setPosition (Lcom/pushpal/jetlime/EventPosition;)Lcom/pushpal/jetlime/JetLimeEventStyle; + public final fun setPosition (Lcom/pushpal/jetlime/EventPosition;)V +} + +public final class com/pushpal/jetlime/JetLimeExtendedEventKt { + public static final fun JetLimeExtendedEvent-hGBTI10 (Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeEventStyle;Lkotlin/jvm/functions/Function3;FLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V +} + +public final class com/pushpal/jetlime/JetLimeListKt { + public static final fun JetLimeColumn (Lcom/pushpal/jetlime/ItemsList;Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeStyle;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V + public static final fun JetLimeRow (Lcom/pushpal/jetlime/ItemsList;Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeStyle;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V + public static final fun getLocalJetLimeStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal; +} + +public final class com/pushpal/jetlime/JetLimeStyle { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getContentDistance-D9Ej5fM ()F + public final fun getItemSpacing-D9Ej5fM ()F + public final fun getLineBrush ()Landroidx/compose/ui/graphics/Brush; + public final fun getLineHorizontalAlignment ()Lcom/pushpal/jetlime/HorizontalAlignment; + public final fun getLineThickness-D9Ej5fM ()F + public final fun getLineVerticalAlignment ()Lcom/pushpal/jetlime/VerticalAlignment; + public final fun getPathEffect ()Landroidx/compose/ui/graphics/PathEffect; + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/VerticalAlignment : java/lang/Enum { + public static final field LEFT Lcom/pushpal/jetlime/VerticalAlignment; + public static final field RIGHT Lcom/pushpal/jetlime/VerticalAlignment; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/pushpal/jetlime/VerticalAlignment; + public static fun values ()[Lcom/pushpal/jetlime/VerticalAlignment; +} + diff --git a/jetlime/api/desktop/jetlime.api b/jetlime/api/desktop/jetlime.api new file mode 100644 index 0000000..19e228c --- /dev/null +++ b/jetlime/api/desktop/jetlime.api @@ -0,0 +1,136 @@ +public final class com/pushpal/jetlime/ComposableSingletons$JetLimeExtendedEventKt { + public static final field INSTANCE Lcom/pushpal/jetlime/ComposableSingletons$JetLimeExtendedEventKt; + public static field lambda-1 Lkotlin/jvm/functions/Function3; + public fun ()V + public final fun getLambda-1$jetlime ()Lkotlin/jvm/functions/Function3; +} + +public final class com/pushpal/jetlime/EventPointAnimation { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getAnimationSpec ()Landroidx/compose/animation/core/InfiniteRepeatableSpec; + public final fun getInitialValue ()F + public final fun getTargetValue ()F + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/EventPointType { + public static final field $stable I + public static final field Companion Lcom/pushpal/jetlime/EventPointType$Companion; + public synthetic fun (Ljava/lang/String;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getFillPercent ()Ljava/lang/Float; + public final fun getIcon ()Landroidx/compose/ui/graphics/painter/Painter; + public final fun getTint-QN2ZGVo ()Landroidx/compose/ui/graphics/Color; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public final fun isCustom ()Z + public final fun isEmptyOrFilled ()Z + public final fun isFilled ()Z +} + +public final class com/pushpal/jetlime/EventPointType$Companion { + public final fun custom-0Yiz4hI (Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;)Lcom/pushpal/jetlime/EventPointType; + public static synthetic fun custom-0Yiz4hI$default (Lcom/pushpal/jetlime/EventPointType$Companion;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/Color;ILjava/lang/Object;)Lcom/pushpal/jetlime/EventPointType; + public final fun filled (F)Lcom/pushpal/jetlime/EventPointType; + public static synthetic fun filled$default (Lcom/pushpal/jetlime/EventPointType$Companion;FILjava/lang/Object;)Lcom/pushpal/jetlime/EventPointType; + public final fun getDefault ()Lcom/pushpal/jetlime/EventPointType; + public final fun getEMPTY ()Lcom/pushpal/jetlime/EventPointType; +} + +public final class com/pushpal/jetlime/EventPosition { + public static final field $stable I + public static final field Companion Lcom/pushpal/jetlime/EventPosition$Companion; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public final fun isNotEnd ()Z +} + +public final class com/pushpal/jetlime/EventPosition$Companion { + public final fun dynamic (II)Lcom/pushpal/jetlime/EventPosition; +} + +public final class com/pushpal/jetlime/HorizontalAlignment : java/lang/Enum { + public static final field BOTTOM Lcom/pushpal/jetlime/HorizontalAlignment; + public static final field TOP Lcom/pushpal/jetlime/HorizontalAlignment; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/pushpal/jetlime/HorizontalAlignment; + public static fun values ()[Lcom/pushpal/jetlime/HorizontalAlignment; +} + +public final class com/pushpal/jetlime/ItemsList { + public static final field $stable I + public fun (Ljava/util/List;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getItems ()Ljava/util/List; + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/JetLimeDefaults { + public static final field $stable I + public static final field INSTANCE Lcom/pushpal/jetlime/JetLimeDefaults; + public final fun columnStyle-QGmBr7U (FFFLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/PathEffect;Lcom/pushpal/jetlime/VerticalAlignment;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeStyle; + public final fun lineGradientBrush-OcLOKmE (Lkotlinx/collections/immutable/ImmutableList;JJILandroidx/compose/runtime/Composer;II)Landroidx/compose/ui/graphics/Brush; + public final fun lineSolidBrush-Iv8Zu3U (JLandroidx/compose/runtime/Composer;II)Landroidx/compose/ui/graphics/Brush; + public final fun rowStyle-QGmBr7U (FFFLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/PathEffect;Lcom/pushpal/jetlime/HorizontalAlignment;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeStyle; +} + +public final class com/pushpal/jetlime/JetLimeEventDefaults { + public static final field $stable I + public static final field INSTANCE Lcom/pushpal/jetlime/JetLimeEventDefaults; + public final fun eventStyle-Wv_uGHg (Lcom/pushpal/jetlime/EventPosition;Lcom/pushpal/jetlime/EventPointType;JJFLcom/pushpal/jetlime/EventPointAnimation;FJLandroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/JetLimeEventStyle; + public final fun pointAnimation (FFLandroidx/compose/animation/core/InfiniteRepeatableSpec;Landroidx/compose/runtime/Composer;II)Lcom/pushpal/jetlime/EventPointAnimation; +} + +public final class com/pushpal/jetlime/JetLimeEventKt { + public static final fun JetLimeEvent (Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeEventStyle;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V +} + +public final class com/pushpal/jetlime/JetLimeEventStyle { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getPointAnimation ()Lcom/pushpal/jetlime/EventPointAnimation; + public final fun getPointColor-0d7_KjU ()J + public final fun getPointFillColor-0d7_KjU ()J + public final fun getPointRadius-D9Ej5fM ()F + public final fun getPointStrokeColor-0d7_KjU ()J + public final fun getPointStrokeWidth-D9Ej5fM ()F + public final fun getPointType ()Lcom/pushpal/jetlime/EventPointType; + public final fun getPosition ()Lcom/pushpal/jetlime/EventPosition; + public fun hashCode ()I + public final fun setPosition (Lcom/pushpal/jetlime/EventPosition;)Lcom/pushpal/jetlime/JetLimeEventStyle; + public final fun setPosition (Lcom/pushpal/jetlime/EventPosition;)V +} + +public final class com/pushpal/jetlime/JetLimeExtendedEventKt { + public static final fun JetLimeExtendedEvent-hGBTI10 (Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeEventStyle;Lkotlin/jvm/functions/Function3;FLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V +} + +public final class com/pushpal/jetlime/JetLimeListKt { + public static final fun JetLimeColumn (Lcom/pushpal/jetlime/ItemsList;Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeStyle;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V + public static final fun JetLimeRow (Lcom/pushpal/jetlime/ItemsList;Landroidx/compose/ui/Modifier;Lcom/pushpal/jetlime/JetLimeStyle;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V + public static final fun getLocalJetLimeStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal; +} + +public final class com/pushpal/jetlime/JetLimeStyle { + public static final field $stable I + public fun equals (Ljava/lang/Object;)Z + public final fun getContentDistance-D9Ej5fM ()F + public final fun getItemSpacing-D9Ej5fM ()F + public final fun getLineBrush ()Landroidx/compose/ui/graphics/Brush; + public final fun getLineHorizontalAlignment ()Lcom/pushpal/jetlime/HorizontalAlignment; + public final fun getLineThickness-D9Ej5fM ()F + public final fun getLineVerticalAlignment ()Lcom/pushpal/jetlime/VerticalAlignment; + public final fun getPathEffect ()Landroidx/compose/ui/graphics/PathEffect; + public fun hashCode ()I +} + +public final class com/pushpal/jetlime/VerticalAlignment : java/lang/Enum { + public static final field LEFT Lcom/pushpal/jetlime/VerticalAlignment; + public static final field RIGHT Lcom/pushpal/jetlime/VerticalAlignment; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/pushpal/jetlime/VerticalAlignment; + public static fun values ()[Lcom/pushpal/jetlime/VerticalAlignment; +} + diff --git a/jetlime/build.gradle.kts b/jetlime/build.gradle.kts index c0884be..d6a44c1 100644 --- a/jetlime/build.gradle.kts +++ b/jetlime/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.kotlin.cocoapods) alias(libs.plugins.nexus.vanniktech.publish) alias(libs.plugins.dokka) + alias(libs.plugins.kotlin.binary.compatibility) } kotlin { From 1b02321521cc4909567f51e838149c5e27cb3c13 Mon Sep 17 00:00:00 2001 From: Pushpal Roy Date: Tue, 24 Sep 2024 11:27:49 -0600 Subject: [PATCH 2/2] [ci] add api and spotless checks --- .github/workflows/build.yml | 32 +++++++++++++++++-- .github/workflows/setup/java-setup/action.yml | 2 +- .../kotlin/timelines/BasicVerticalTimeLine.kt | 2 +- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a7c251..8414de6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,34 @@ concurrency: cancel-in-progress: true jobs: + lint: + name: Spotless check + runs-on: macos-latest + steps: + - name: Check out code + uses: actions/checkout@v4.1.7 + - name: Set up JDK + uses: actions/setup-java@v4.3.0 + with: + distribution: 'corretto' + java-version: 17 + - name: spotless + run: ./gradlew spotlessCheck + + api_check: + name: API check + runs-on: macos-latest + steps: + - name: Check out code + uses: actions/checkout@v4.1.7 + - name: Set up JDK + uses: actions/setup-java@v4.3.0 + with: + distribution: 'corretto' + java-version: 17 + - name: API check + run: ./gradlew apiCheck + build: strategy: matrix: @@ -32,7 +60,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.7 - name: Java and Gradle set up if: matrix.platform != 'ios' @@ -69,7 +97,7 @@ jobs: if: matrix.platform == 'web-wasm' run: ./scripts/build_web_wasm.sh - # Web-WASM + # Web-JS - name: Grant execute permission for Web JS script if: matrix.platform == 'web-js' run: chmod +x ./scripts/build_web_js.sh diff --git a/.github/workflows/setup/java-setup/action.yml b/.github/workflows/setup/java-setup/action.yml index 360e3ac..b8ef060 100644 --- a/.github/workflows/setup/java-setup/action.yml +++ b/.github/workflows/setup/java-setup/action.yml @@ -6,7 +6,7 @@ runs: # Setup java - name: Setup JDK 17 id: setup_jdk - uses: actions/setup-java@v4 + uses: actions/setup-java@v4.3.0 with: distribution: "corretto" java-version: 17 diff --git a/sample/composeApp/src/commonMain/kotlin/timelines/BasicVerticalTimeLine.kt b/sample/composeApp/src/commonMain/kotlin/timelines/BasicVerticalTimeLine.kt index 06ead86..24527de 100644 --- a/sample/composeApp/src/commonMain/kotlin/timelines/BasicVerticalTimeLine.kt +++ b/sample/composeApp/src/commonMain/kotlin/timelines/BasicVerticalTimeLine.kt @@ -76,6 +76,6 @@ fun BasicVerticalTimeLine(modifier: Modifier = Modifier, showSnackbar: (message: @ExperimentalAnimationApi @Preview @Composable -private fun PreviewBasicVerticalTimeLine() { +private fun BasicVerticalTimeLinePreview() { BasicVerticalTimeLine {} }