Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
839c0fe
fore-core 2.0.0-rc.1
erdo Feb 12, 2025
b1935dd
fore-net ktor plugins
erdo Mar 16, 2025
5d92997
ktor example app
erdo Mar 17, 2025
b9101c1
sample app rename, remove stubbed data ktor plugin code
erdo Mar 18, 2025
5ecfe9b
Apollo examlpe app setup WIP
erdo Mar 21, 2025
5fa0ffd
fixing logging plugin to work with Apollo
erdo Mar 21, 2025
047b6ae
update sample apps to use new logging plugin for ktor
erdo Mar 21, 2025
1c2505a
adding a ktor token for session and removing okhttp interceptor version
erdo Mar 21, 2025
5cdb6ae
fixing up apollo example app
erdo Mar 21, 2025
1f7e902
net test-fixtures code
erdo Mar 22, 2025
fc4e875
removing android UI test examples
erdo Mar 22, 2025
0854791
tidy call wrapper
erdo Mar 22, 2025
0159b41
example app unit tests
erdo Mar 22, 2025
574c3e1
time changes for linux
erdo Mar 22, 2025
56fe1e4
prep compose android and example app
erdo Mar 24, 2025
ec30603
fore-compose and sample app
erdo Mar 29, 2025
b1e41a0
explicit constructors for iOS benefit
erdo Apr 12, 2025
75b1060
compose android sample update
erdo Apr 12, 2025
6cb402c
adding kmp sample with android and ios apps
erdo Apr 12, 2025
a6db8a2
increasing buildSrc jdk toolchain
erdo Apr 13, 2025
31363ff
jdk toolchain to 21
erdo Apr 13, 2025
232ed70
fix typo to fix unit tests
erdo Apr 13, 2025
abb97b1
return missing readFileString function from tests
erdo Apr 13, 2025
d219ba4
fixing dependencies and namespaces
erdo Apr 13, 2025
a307eca
updating location for kmp sample app in CI config
erdo Apr 13, 2025
319855c
remove kmp sample app from CI config
erdo Apr 13, 2025
1e1ebc2
clean up toml file
erdo Apr 15, 2025
88c3bf7
fore-compose appleMain to iosMain with no BackHandler
erdo Apr 15, 2025
1ea6f7e
update version
erdo Apr 15, 2025
f313976
ensuring we have access to Main.immediate from init of ObservableImp
erdo Apr 17, 2025
6b82b28
making sure all android assets have jvm 1.8 as target
erdo Apr 18, 2025
c630e91
bump versions for kmp app sample
erdo Apr 18, 2025
a74d513
add iosFrameworks to gitignore
erdo Apr 18, 2025
9891307
toolchain fix for kmp sample app
erdo Apr 19, 2025
e2283b9
using KClass for KMP sample app
erdo Jun 24, 2025
a7f8ac9
better logging for iOS
erdo Jun 24, 2025
cb54e3c
better KMP error handler for sample app, switching to KSerializer for…
erdo Aug 6, 2025
8cde263
inlining extension functions
erdo Aug 6, 2025
5c58dc9
bumping versions
erdo Aug 6, 2025
b0fbf7c
fixing concurrency issue with ktor plugin that doesn't exist with okh…
erdo Aug 17, 2025
3681efc
updating ForeNetworkLogs Plugin to fix occasional missing body log
erdo Aug 25, 2025
1194602
another attempt at fixing ktor HTTP logging - split the ByteReadChann…
erdo Aug 25, 2025
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
  •  
  •  
  •  
123 changes: 42 additions & 81 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/code
docker:
- image: cimg/android:2023.07
- image: cimg/android:2025.04
environment:
JVM_OPTS: -Xmx3200m
GRADLE_OPTS: -Dorg.gradle.daemon=true
Expand All @@ -12,7 +12,7 @@ jobs:
- checkout
- restore_cache:
# bump the cache version number if you want to wipe the gradle cache
key: v6-gradle-dependencies-cache
key: v7-gradle-dependencies-cache
# - run:
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
# command: sudo chmod +x ./gradlew
Expand All @@ -22,116 +22,77 @@ jobs:
- save_cache:
paths:
- ~/.gradle
key: v6-gradle-dependencies-cache
key: v7-gradle-dependencies-cache

- run:
name: Run Tests fore-jv-android
command: ./gradlew fore-jv:fore-jv-android:lintRelease fore-jv:fore-jv-android:testRelease
name: Run Tests fore-compose
command: ./gradlew lib:fore-compose:lintRelease lib:fore-compose:testRelease
- store_artifacts:
path: fore-jv/fore-jv-android/build/reports
path: lib/fore-compose/build/reports
- store_test_results:
path: fore-jv/fore-jv-android/build/test-results
path: lib/fore-compose/build/test-results

- run:
name: Run Tests fore-kt-android
command: ./gradlew fore-kt:fore-kt-android:lintRelease fore-kt:fore-kt-android:testRelease
name: Run Tests fore-core
command: ./gradlew lib:fore-core:lintRelease lib:fore-core:testRelease
- store_artifacts:
path: fore-kt/fore-kt-android/build/reports
path: lib/fore-core/build/reports
- store_test_results:
path: fore-kt/fore-kt-android/build/test-results
path: lib/fore-core/build/test-results

- run:
name: Run Tests example-jv-01reactiveui
command: ./gradlew app-examples:example-jv-01reactiveui:lintRelease app-examples:example-jv-01reactiveui:testRelease
name: Run Tests fore-net
command: ./gradlew lib:fore-net:lintRelease lib:fore-net:testRelease
- store_artifacts:
path: app-examples/example-jv-01reactiveui/build/reports
path: lib/fore-net/build/reports
- store_test_results:
path: app-examples/example-jv-01reactiveui/build/test-results
path: lib/fore-net/build/test-results

- run:
name: Run Tests example-jv-02threading
command: ./gradlew app-examples:example-jv-02threading:lintRelease app-examples:example-jv-02threading:testRelease
name: Run Tests example-01-reactiveui
command: ./gradlew app-examples:example-01-reactiveui:lintRelease app-examples:example-01-reactiveui:testRelease
- store_artifacts:
path: app-examples/example-jv-02threading/build/reports
path: app-examples/example-01-reactiveui/build/reports
- store_test_results:
path: app-examples/example-jv-02threading/build/test-results
path: app-examples/example-01-reactiveui/build/test-results

- run:
name: Run Tests example-jv-03adapters
command: ./gradlew app-examples:example-jv-03adapters:lintRelease app-examples:example-jv-03adapters:testRelease
name: Run Tests example-02-coroutine
command: ./gradlew app-examples:example-02-coroutine:lintRelease app-examples:example-02-coroutine:testRelease
- store_artifacts:
path: app-examples/example-jv-03adapters/build/reports
path: app-examples/example-02-coroutine/build/reports
- store_test_results:
path: app-examples/example-jv-03adapters/build/test-results
path: app-examples/example-02-coroutine/build/test-results

- run:
name: Run Tests example-jv-04retrofit
command: ./gradlew app-examples:example-jv-04retrofit:lintRelease app-examples:example-jv-04retrofit:testRelease
name: Run Tests example-03-ktor
command: ./gradlew app-examples:example-03-ktor:lintRelease app-examples:example-03-ktor:testRelease
- store_artifacts:
path: app-examples/example-jv-04retrofit/build/reports
path: app-examples/example-03-ktor/build/reports
- store_test_results:
path: app-examples/example-jv-04retrofit/build/test-results
path: app-examples/example-03-ktor/build/test-results

- run:
name: Run Tests example-jv-06db
command: ./gradlew app-examples:example-jv-06db:lintRelease app-examples:example-jv-06db:testRelease
name: Run Tests example-04-apollo
command: ./gradlew app-examples:example-04-apollo:lintRelease app-examples:example-04-apollo:testRelease
- store_artifacts:
path: app-examples/example-jv-06db/build/reports
path: app-examples/example-04-apollo/build/reports
- store_test_results:
path: app-examples/example-jv-06db/build/test-results
path: app-examples/example-04-apollo/build/test-results

- run:
name: Run Tests example-kt-01reactiveui
command: ./gradlew app-examples:example-kt-01reactiveui:lintRelease app-examples:example-kt-01reactiveui:testRelease
- store_artifacts:
path: app-examples/example-kt-01reactiveui/build/reports
- store_test_results:
path: app-examples/example-kt-01reactiveui/build/test-results

- run:
name: Run Tests example-kt-02coroutine
command: ./gradlew app-examples:example-kt-02coroutine:lintRelease app-examples:example-kt-02coroutine:testRelease
- store_artifacts:
path: app-examples/example-kt-02coroutine/build/reports
- store_test_results:
path: app-examples/example-kt-02coroutine/build/test-results

- run:
name: Run Tests example-kt-03adapters
command: ./gradlew app-examples:example-kt-03adapters:lintRelease app-examples:example-kt-03adapters:testRelease
- store_artifacts:
path: app-examples/example-kt-03adapters/build/reports
- store_test_results:
path: app-examples/example-kt-03adapters/build/test-results

- run:
name: Run Tests example-kt-04retrofit
command: ./gradlew app-examples:example-kt-04retrofit:lintRelease app-examples:example-kt-04retrofit:testRelease
- store_artifacts:
path: app-examples/example-kt-04retrofit/build/reports
- store_test_results:
path: app-examples/example-kt-04retrofit/build/test-results

- run:
name: Run Tests example-kt-07apollo3
command: ./gradlew app-examples:example-kt-07apollo3:lintRelease app-examples:example-kt-07apollo3:testRelease
- store_artifacts:
path: app-examples/example-kt-07apollo3/build/reports
- store_test_results:
path: app-examples/example-kt-07apollo3/build/test-results
# - run:
# name: Run Tests example-05-db
# command: ./gradlew app-examples:example-05-db:lintRelease app-examples:example-05-db:testRelease
# - store_artifacts:
# path: app-examples/example-05-db/build/reports
# - store_test_results:
# path: app-examples/example-05-db/build/test-results

- run:
name: Run Tests example-kt-08ktor
command: ./gradlew app-examples:example-kt-08ktor:lintRelease app-examples:example-kt-08ktor:testRelease
name: Run Tests example-06-compose
command: ./gradlew app-examples:example-06-compose:lintRelease app-examples:example-06-compose:testRelease
- store_artifacts:
path: app-examples/example-kt-08ktor/build/reports
path: app-examples/example-06-compose/build/reports
- store_test_results:
path: app-examples/example-kt-08ktor/build/test-results
path: app-examples/example-06-compose/build/test-results

- run:
name: Run Tests example-kt-09compose
command: ./gradlew app-examples:example-kt-09compose:lintRelease app-examples:example-kt-09compose:testRelease
- store_artifacts:
path: app-examples/example-kt-09compose/build/reports
- store_test_results:
path: app-examples/example-kt-09compose/build/test-results
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ secret_key_ring.gpg

# passwords
secrets.properties

# Ignore Kotlin/Native metadata and build artifacts
.kotlin/

**/iosApp/Frameworks/
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import co.early.fore.Shared
import co.early.fore.Shared.BuildTypes

plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
kotlin("kapt")
alias(libs.plugins.androidAppPlugin)
alias(libs.plugins.kotlinAndroidPlugin)
alias(libs.plugins.kotlinKaptPlugin)
}


Expand All @@ -18,7 +18,7 @@ println("[$appId testBuildType:${getTestBuildType()}]")

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Shared.Versions.jvm_toolchain))
languageVersion.set(JavaLanguageVersion.of(libs.versions.jvm.toolchain.get().toInt()))
}
}

Expand Down Expand Up @@ -68,9 +68,11 @@ android {
dependencies {

if (Shared.Publish.use_published_version) {
implementation("co.early.fore:fore-kt-android-core:${Shared.Publish.published_fore_version_for_examples}")
implementation(libs.fore.core)
testImplementation(libs.fore.test.fixtures)
} else {
implementation(project(":fore-kt:fore-kt-android-core"))
implementation(project(":lib:fore-core"))
testImplementation(project(":lib:fore-test-fixtures"))
}

implementation("androidx.appcompat:appcompat:${Shared.Versions.appcompat}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package foo.bar.example.forereactiveuikt

import android.app.Application
import co.early.fore.kt.core.delegate.DebugDelegateDefault
import co.early.fore.kt.core.delegate.Fore
import co.early.fore.core.delegate.DebugDelegateDefault
import co.early.fore.core.delegate.Fore

/**
* Copyright © 2015-2020 early.co. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package foo.bar.example.forereactiveuikt

import android.app.Application
import co.early.fore.kt.core.logging.AndroidLogger
import co.early.fore.core.logging.AndroidLogger
//import co.early.fore.core.logging.AndroidLogger
import foo.bar.example.forereactiveuikt.feature.wallet.Wallet
import java.util.HashMap

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package foo.bar.example.forereactiveuikt.feature.wallet

import co.early.fore.kt.core.logging.Logger
import co.early.fore.core.logging.Logger
import co.early.fore.core.observer.Observable
import co.early.fore.kt.core.observer.ObservableImp
import co.early.fore.core.observer.ObservableImp

/**
* Copyright © 2015-2020 early.co. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ package foo.bar.example.forereactiveuikt.ui.wallet

import android.os.Bundle
import androidx.fragment.app.FragmentActivity
import co.early.fore.core.delegate.Fore
/**
* example 1/3 without using the LifecycleObserver
*/
//import co.early.fore.core.observer.Observer
import co.early.fore.core.ui.SyncableView
import co.early.fore.kt.core.ui.LifecycleObserver
import co.early.fore.core.ui.ForeLifecycleObserver
import foo.bar.example.forereactiveuikt.OG
import foo.bar.example.forereactiveuikt.databinding.ActivityWalletBinding
import foo.bar.example.forereactiveuikt.feature.wallet.Wallet
Expand All @@ -18,13 +23,20 @@ class WalletsActivity : FragmentActivity(), SyncableView {

private lateinit var binding: ActivityWalletBinding

/**
* example 2/3 without using the LifecycleObserver
*/
// var observer: Observer = Observer { syncView() }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Fore.i("onCreate()")

binding = ActivityWalletBinding.inflate(layoutInflater)
setContentView(binding.root)

lifecycle.addObserver(LifecycleObserver(this, wallet))
lifecycle.addObserver(ForeLifecycleObserver(this, wallet))

setupButtonClickListeners()
}
Expand All @@ -39,9 +51,25 @@ class WalletsActivity : FragmentActivity(), SyncableView {
}

override fun syncView() {

Fore.i("syncView()")

binding.walletIncreaseBtn.isEnabled = wallet.canIncrease()
binding.walletDecreaseBtn.isEnabled = wallet.canDecrease()
binding.walletMobileamountTxt.text = wallet.mobileWalletAmount.toString()
binding.walletSavingsamountTxt.text = wallet.savingsWalletAmount.toString()
}

/**
* example 3/3 without using the LifecycleObserver
*/
// override fun onStart() {
// super.onStart()
// wallet.addObserver(observer)
// syncView() // <- don't forget this
// }
// override fun onStop() {
// super.onStop()
// wallet.removeObserver(observer)
// }
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package foo.bar.example.forereactiveuikt.feature.wallet

import co.early.fore.kt.core.logging.Logger
import co.early.fore.kt.core.logging.SystemLogger
import co.early.fore.core.logging.Logger
import co.early.fore.core.logging.SystemLogger
import co.early.fore.core.observer.Observer
import co.early.fore.kt.core.delegate.TestDelegateDefault
import co.early.fore.kt.core.delegate.Fore
import co.early.fore.core.delegate.TestDelegateDefault
import co.early.fore.core.delegate.Fore
import io.mockk.MockKAnnotations
import io.mockk.impl.annotations.MockK
import io.mockk.verify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import co.early.fore.Shared
import co.early.fore.Shared.BuildTypes

plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
kotlin("kapt")
alias(libs.plugins.androidAppPlugin)
alias(libs.plugins.kotlinAndroidPlugin)
alias(libs.plugins.kotlinKaptPlugin)
}

val appId = "foo.bar.example.forecoroutine"
Expand All @@ -17,7 +17,7 @@ println("[$appId testBuildType:${getTestBuildType()}]")

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Shared.Versions.jvm_toolchain))
languageVersion.set(JavaLanguageVersion.of(libs.versions.jvm.toolchain.get().toInt()))
}
}

Expand Down Expand Up @@ -67,13 +67,14 @@ android {
dependencies {

if (Shared.Publish.use_published_version) {
implementation("co.early.fore:fore-kt-android-core:${Shared.Publish.published_fore_version_for_examples}")
implementation(libs.fore.core)
testImplementation(libs.fore.test.fixtures)
} else {
implementation(project(":fore-kt:fore-kt-android-core"))
implementation(project(":lib:fore-core"))
testImplementation(project(":lib:fore-test-fixtures"))
}

implementation("androidx.appcompat:appcompat:${Shared.Versions.appcompat}")
implementation("androidx.constraintlayout:constraintlayout:${Shared.Versions.constraintlayout}")

testImplementation("junit:junit:${Shared.Versions.junit}")
testImplementation("io.mockk:mockk:${Shared.Versions.mockk}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package foo.bar.example.forecoroutine

import android.app.Application
import co.early.fore.core.WorkMode
import co.early.fore.kt.core.logging.AndroidLogger
import co.early.fore.core.logging.AndroidLogger
import foo.bar.example.forecoroutine.feature.counter.Counter
import foo.bar.example.forecoroutine.feature.counter.CounterWithProgress
import java.util.HashMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package foo.bar.example.forecoroutine.feature.counter


import co.early.fore.core.WorkMode
import co.early.fore.kt.core.logging.Logger
import co.early.fore.core.logging.Logger
import co.early.fore.core.observer.Observable
import co.early.fore.kt.core.coroutine.awaitDefault
import co.early.fore.kt.core.coroutine.launchMain
import co.early.fore.kt.core.delegate.Fore
import co.early.fore.kt.core.observer.ObservableImp
import co.early.fore.core.coroutine.awaitDefault
import co.early.fore.core.coroutine.launchMain
import co.early.fore.core.delegate.Fore
import co.early.fore.core.observer.ObservableImp
import kotlinx.coroutines.delay

/**
Expand Down
Loading