Skip to content

Commit

Permalink
Merge pull request #50 from copper-leaf/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
cjbrooks12 authored Sep 5, 2023
2 parents 661f866 + cc91ba3 commit d8d3791
Show file tree
Hide file tree
Showing 328 changed files with 10,942 additions and 4,177 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [11, 16]
java: [17]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
name: 'Test on ${{ matrix.os }} JDK ${{ matrix.java }}'
runs-on: '${{ matrix.os }}'
Expand Down Expand Up @@ -51,11 +51,11 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: 'Assemble Artifacts'
run: './gradlew build --stacktrace'
- name: 'Publish Artifacts to MavenCentral Snapshots Repository'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: 'Build example Compose Web site'
run: './gradlew :examples:web:build --stacktrace -PreleaseDocs -PorchidEnvironment=prod'
- name: 'Publish Documentation'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [11, 16]
java: [17]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
name: 'Test on ${{ matrix.os }} JDK ${{ matrix.java }}'
runs-on: '${{ matrix.os }}'
Expand Down Expand Up @@ -50,11 +50,11 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: 'Assemble Artifacts'
run: './gradlew build --stacktrace'
- name: 'Build IDEA Plugin'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [11, 16]
java: [17]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
name: 'Test on ${{ matrix.os }} JDK ${{ matrix.java }}'
runs-on: '${{ matrix.os }}'
Expand Down Expand Up @@ -50,11 +50,11 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: 'Assemble Artifacts'
run: './gradlew assemble --stacktrace -Prelease -PorchidEnvironment=prod'
- name: 'Publish IDEA Plugin'
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
## 3.0.2 - 2022-06-08
## 4.0.0 - 2023-09-05

- Updates to Kotlin 1.9.10
- The Debugger IntelliJ plugin now has functionality to send States and Inputs to connected ViewModels as JSON, which
gets parsed and handled on the device.
- Several API improvements, including some breaking changes. See [v4 Migration Guide](https://copper-leaf.github.io/ballast/wiki/usage/migration/v4)
for full list of changes and instructions for updating your project.

## 3.0.2 - 2023-06-08

- Fixes regression where `awaitViewModelStart()` never calls a terminal Flow operator and doesn't actually suspend.

## 3.0.1 - 2022-05-13
## 3.0.1 - 2023-05-13

- Fixes regression in BallastSavedStateInterceptor

## 3.0.0 - 2022-05-07
## 3.0.0 - 2023-05-07

- Updates to Kotlin 1.8.20
- Drops support for deprecated KMPP targets:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ object TodosContract {
val todos: List<String> = emptyList(),
)

sealed class Inputs {
object FetchSavedTodos : Inputs()
data class AddTodo(val text: String) : Inputs()
data class RemoveTodo(val text: String) : Inputs()
sealed interface Inputs {
data object FetchSavedTodos : Inputs
data class AddTodo(val text: String) : Inputs
data class RemoveTodo(val text: String) : Inputs
}
}

Expand Down
9 changes: 1 addition & 8 deletions ballast-analytics/api/android/ballast-analytics.api
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,14 @@ public final class com/copperleaf/ballast/analytics/AnalyticsInterceptor : com/c
public fun <init> (Lcom/copperleaf/ballast/analytics/AnalyticsTracker;Lcom/copperleaf/ballast/analytics/AnalyticsAdapter;)V
public fun <init> (Lcom/copperleaf/ballast/analytics/AnalyticsTracker;Lkotlin/jvm/functions/Function1;)V
public fun getKey ()Lcom/copperleaf/ballast/BallastInterceptor$Key;
public fun onNotify (Lcom/copperleaf/ballast/BallastLogger;Lcom/copperleaf/ballast/BallastNotification;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun start (Lcom/copperleaf/ballast/BallastInterceptorScope;Lkotlinx/coroutines/flow/Flow;)V
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/copperleaf/ballast/analytics/AnalyticsTracker {
public abstract fun trackAnalyticsEvent (Ljava/lang/String;Ljava/util/Map;)V
}

public final class com/copperleaf/ballast/analytics/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class com/copperleaf/ballast/analytics/DefaultAnalyticsAdapter : com/copperleaf/ballast/analytics/AnalyticsAdapter {
public fun <init> (Lkotlin/jvm/functions/Function1;)V
public fun getEventIdForInput (Ljava/lang/Object;)Ljava/lang/String;
Expand Down
2 changes: 1 addition & 1 deletion ballast-analytics/api/jvm/ballast-analytics.api
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public final class com/copperleaf/ballast/analytics/AnalyticsInterceptor : com/c
public fun <init> (Lcom/copperleaf/ballast/analytics/AnalyticsTracker;Lcom/copperleaf/ballast/analytics/AnalyticsAdapter;)V
public fun <init> (Lcom/copperleaf/ballast/analytics/AnalyticsTracker;Lkotlin/jvm/functions/Function1;)V
public fun getKey ()Lcom/copperleaf/ballast/BallastInterceptor$Key;
public fun onNotify (Lcom/copperleaf/ballast/BallastLogger;Lcom/copperleaf/ballast/BallastNotification;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun start (Lcom/copperleaf/ballast/BallastInterceptorScope;Lkotlinx/coroutines/flow/Flow;)V
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/copperleaf/ballast/analytics/AnalyticsTracker {
Expand Down
5 changes: 1 addition & 4 deletions ballast-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ kotlin {
dependencies { }
}
val androidMain by getting {
dependencies {
implementation(project.dependencies.platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
}
dependencies { }
}
val jsMain by getting {
dependencies { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ public class AnalyticsInterceptor<Inputs : Any, Events : Any, State : Any>(
.collect()
}
}

override fun toString(): String {
return "AnalyticsInterceptor(tracker=$tracker)"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.copperleaf.ballast.analytics

import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe

class BallastAnalyticsTests : StringSpec({
"check toString values" {
AnalyticsInterceptor<Any, Any, Any>(
tracker = TestAnalyticsTracker(),
shouldTrackInput = { true },
).toString() shouldBe "AnalyticsInterceptor(tracker=TestAnalyticsTracker)"
}
})

private class TestAnalyticsTracker : AnalyticsTracker {
override fun trackAnalyticsEvent(eventId: String, eventParameters: Map<String, String>) {
TODO("Not yet implemented")
}

override fun toString(): String {
return "TestAnalyticsTracker"
}
}
Loading

0 comments on commit d8d3791

Please sign in to comment.