Skip to content

Commit 8d7567c

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 953edba + 29eebf6 commit 8d7567c

File tree

61 files changed

+394
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+394
-524
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ env:
5555
jobs:
5656

5757
Build:
58-
runs-on: macos-14
58+
runs-on: macos-15
5959
outputs:
6060
status: ${{ steps.status.outputs.status }}
6161
steps:
6262

6363
- name: Setup Gradle Repo
64-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
64+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
6565

6666
- name: Adding secret files
6767
uses: ./.github/actions/add-secret-files

.github/workflows/main.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ env:
6464
jobs:
6565

6666
GradleBuild:
67-
runs-on: macos-14
67+
runs-on: macos-15
6868
outputs:
6969
status: ${{ steps.status.outputs.status }}
7070
steps:
7171

7272
- name: Setup Gradle Repo
73-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
73+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
7474

7575
- name: Adding secret files
7676
uses: ./.github/actions/add-secret-files
@@ -89,7 +89,7 @@ jobs:
8989
run: ./gradlew assemble${{ env.BUILD_TYPE }}
9090

9191
- name: Upload Android ${{ env.BUILD_TYPE }} Artifacts
92-
uses: actions/upload-artifact@v4.4.3
92+
uses: actions/upload-artifact@v4.6.1
9393
if: github.event_name == 'push' || github.event_name == 'schedule'
9494
with:
9595
name: androidArtifacts
@@ -117,7 +117,7 @@ jobs:
117117
uses: actions/[email protected]
118118

119119
- name: Download Android ${{ env.BUILD_TYPE }} Artifacts
120-
uses: actions/[email protected].8
120+
uses: actions/[email protected].9
121121
with:
122122
name: androidArtifacts
123123

@@ -147,13 +147,13 @@ jobs:
147147
run: echo "status=success" >> $GITHUB_OUTPUT
148148

149149
XCodeBuild:
150-
runs-on: macos-14
150+
runs-on: macos-15
151151
outputs:
152152
status: ${{ steps.status.outputs.status }}
153153
steps:
154154

155155
- name: Setup Gradle Repo
156-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
156+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
157157

158158
- name: Adding secret files
159159
uses: ./.github/actions/add-secret-files
@@ -173,7 +173,7 @@ jobs:
173173
run: fastlane build${{ env.BUILD_TYPE }}
174174

175175
- name: Upload iOS Debug Artifacts
176-
uses: actions/upload-artifact@v4.4.3
176+
uses: actions/upload-artifact@v4.6.1
177177
if: github.event_name == 'push'
178178
with:
179179
name: iOSArtifacts
@@ -182,7 +182,7 @@ jobs:
182182
ios/CCC_I.app.dSYM.zip
183183
184184
- name: Upload iOS Artifacts
185-
uses: actions/upload-artifact@v4.4.3
185+
uses: actions/upload-artifact@v4.6.1
186186
if: github.event_name == 'schedule'
187187
with:
188188
name: iOSArtifacts
@@ -209,7 +209,7 @@ jobs:
209209
uses: actions/[email protected]
210210

211211
- name: Download iOS ${{ env.BUILD_TYPE }} Artifacts
212-
uses: actions/[email protected].8
212+
uses: actions/[email protected].9
213213
with:
214214
name: iOSArtifacts
215215
path: ios
@@ -231,13 +231,13 @@ jobs:
231231
run: echo "status=success" >> $GITHUB_OUTPUT
232232

233233
Test:
234-
runs-on: macos-14
234+
runs-on: macos-15
235235
outputs:
236236
status: ${{ steps.status.outputs.status }}
237237
steps:
238238

239239
- name: Setup Gradle Repo
240-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
240+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
241241

242242
- name: Test
243243
run: ./gradlew test
@@ -257,13 +257,13 @@ jobs:
257257
steps:
258258

259259
- name: Setup Gradle Repo
260-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
260+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
261261

262262
- name: Generate Coverage
263263
run: ./gradlew koverXmlReport
264264

265265
- name: Upload coverage to Codecov
266-
uses: codecov/codecov-action@v5.0.6
266+
uses: codecov/codecov-action@v5.4.0
267267
with:
268268
token: ${{ secrets.CODECOV_TOKEN }}
269269
files: build/reports/kover/report.xml
@@ -275,7 +275,7 @@ jobs:
275275
coverage-reports: build/reports/kover/report.xml
276276

277277
- name: SonarCloud Scan
278-
uses: sonarsource/sonarcloud-github-action@v3.1.0
278+
uses: sonarsource/sonarcloud-github-action@v5.0.0
279279
env:
280280
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
281281
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -300,7 +300,7 @@ jobs:
300300
steps:
301301

302302
- name: Setup Gradle Repo
303-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
303+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
304304

305305
- name: Detekt & Lint
306306
run: ./gradlew detektAll lint

.github/workflows/project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
ProjectAutomations:
17-
uses: Oztechan/Global/.github/workflows/reusable-project.yml@f3f5fec1f5562978457d820f6d6c83b81cac28a9
17+
uses: Oztechan/Global/.github/workflows/reusable-project.yml@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
1818
with:
1919
project_id: 2
2020
secrets: inherit

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99

1010
PublishRelease:
11-
uses: Oztechan/Global/.github/workflows/reusable-publish.yml@f3f5fec1f5562978457d820f6d6c83b81cac28a9
11+
uses: Oztechan/Global/.github/workflows/reusable-publish.yml@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
1212
with:
1313
slack_channel: "ccc-github"
1414
secrets: inherit

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
steps:
6262

6363
- name: Setup Gradle Repo
64-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
64+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
6565

6666
- name: Adding secret files
6767
uses: ./.github/actions/add-secret-files
@@ -80,19 +80,19 @@ jobs:
8080
run: ./gradlew :android:app:bundleRelease :backend:app:jar --parallel
8181

8282
- name: Upload Google App Bundle
83-
uses: actions/upload-artifact@v4.4.3
83+
uses: actions/upload-artifact@v4.6.1
8484
with:
8585
name: googleBundle
8686
path: android/app/build/outputs/bundle/googleRelease/app-google-release.aab
8787

8888
- name: Upload Huawei App Bundle
89-
uses: actions/upload-artifact@v4.4.3
89+
uses: actions/upload-artifact@v4.6.1
9090
with:
9191
name: huaweiBundle
9292
path: android/app/build/outputs/bundle/huaweiRelease/app-huawei-release.aab
9393

9494
- name: Upload Backend Jar
95-
uses: actions/upload-artifact@v4.4.3
95+
uses: actions/upload-artifact@v4.6.1
9696
with:
9797
name: backendJar
9898
path: backend/app/build/libs/app-*.jar
@@ -112,7 +112,7 @@ jobs:
112112
uses: actions/[email protected]
113113

114114
- name: Download App Bundle
115-
uses: actions/[email protected].8
115+
uses: actions/[email protected].9
116116
with:
117117
name: googleBundle
118118

@@ -155,7 +155,7 @@ jobs:
155155
steps:
156156

157157
- name: Download App Bundle
158-
uses: actions/[email protected].8
158+
uses: actions/[email protected].9
159159
with:
160160
name: huaweiBundle
161161

@@ -186,7 +186,7 @@ jobs:
186186
steps:
187187

188188
- name: Download Backend Jar
189-
uses: actions/[email protected].8
189+
uses: actions/[email protected].9
190190
with:
191191
name: backendJar
192192
path: artifact
@@ -210,12 +210,12 @@ jobs:
210210
run: echo "status=success" >> $GITHUB_OUTPUT
211211

212212
UploadToAppStore:
213-
runs-on: macos-14
213+
runs-on: macos-15
214214
outputs:
215215
status: ${{ steps.status.outputs.status }}
216216
steps:
217217
- name: Setup Gradle Repo
218-
uses: Oztechan/Global/actions/setup-gradle-repo@f3f5fec1f5562978457d820f6d6c83b81cac28a9
218+
uses: Oztechan/Global/actions/setup-gradle-repo@9ebcfe7cd8670187e6dc14c539718b03d0c07d5b
219219

220220
- name: Adding secret files
221221
uses: ./.github/actions/add-secret-files

android/core/ad/src/google/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING"
1818
android:value="true" />
1919

20+
2021
<!-- TODO can be removed when Google ads updated with a fix, simply remove and build if error is persisting -->
22+
<!-- currently it is fixed in higher version of gsm but it looks like gitlive uses old one so we still need to keep it here -->
2123
<property
2224
android:name="android.adservices.AD_SERVICES_CONFIG"
2325
android:resource="@xml/gma_ad_services_config"

android/core/ad/src/google/kotlin/com/oztechan/ccc/android/core/ad/AdManagerImpl.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.content.Context
55
import android.os.Build
66
import android.view.WindowManager
77
import co.touchlab.kermit.Logger
8+
import com.google.android.gms.ads.AdListener
89
import com.google.android.gms.ads.AdRequest
910
import com.google.android.gms.ads.AdSize
1011
import com.google.android.gms.ads.AdView
@@ -112,6 +113,14 @@ internal class AdManagerImpl(context: Context) : AdManager {
112113
val adView = AdView(context).apply {
113114
setAdSize(finalAdSize)
114115
adUnitId = adId
116+
adListener = object : AdListener() {
117+
override fun onAdFailedToLoad(adError: LoadAdError) {
118+
super.onAdFailedToLoad(adError)
119+
Exception("AdManagerImpl getBannerAd onAdFailedToLoad ${adError.message}").let {
120+
Logger.e(it) { it.message.orEmpty() }
121+
}
122+
}
123+
}
115124
loadAd(adRequest)
116125
}
117126

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
34
<uses-permission android:name="android.permission.INTERNET" />
45
</manifest>

android/ui/mobile/android-ui-mobile.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ android {
2020
compileOptions {
2121
sourceCompatibility = JAVA_VERSION
2222
targetCompatibility = JAVA_VERSION
23+
24+
// needed for gitlive remoteconfig, we have it in app module though
25+
isCoreLibraryDesugaringEnabled = true
2326
}
2427
}
2528

@@ -65,6 +68,9 @@ dependencies {
6568
implementation(koinCompose)
6669
implementation(lifecycleRuntime)
6770
implementation(splashScreen)
71+
implementation(rootBeer)
72+
73+
coreLibraryDesugaring(androidDesugaring)
6874
}
6975

7076
android.google.apply {

android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/main/MainActivity.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ package com.oztechan.ccc.android.ui.mobile.content.main
55

66
import android.content.Context
77
import android.content.Intent
8-
import android.net.Uri
98
import android.os.Build
109
import android.os.Bundle
1110
import androidx.appcompat.app.AppCompatDelegate
11+
import androidx.core.net.toUri
1212
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
1313
import androidx.lifecycle.flowWithLifecycle
1414
import androidx.lifecycle.lifecycleScope
@@ -18,10 +18,13 @@ import com.oztechan.ccc.android.core.ad.AdManager
1818
import com.oztechan.ccc.android.ui.mobile.BuildConfig
1919
import com.oztechan.ccc.android.ui.mobile.R
2020
import com.oztechan.ccc.android.ui.mobile.util.getThemeMode
21+
import com.oztechan.ccc.android.ui.mobile.util.isDeviceRooted
2122
import com.oztechan.ccc.android.ui.mobile.util.requestAppReview
2223
import com.oztechan.ccc.android.ui.mobile.util.resolveAndStartIntent
2324
import com.oztechan.ccc.android.ui.mobile.util.showDialog
2425
import com.oztechan.ccc.android.ui.mobile.util.updateBaseContextLocale
26+
import com.oztechan.ccc.client.core.analytics.AnalyticsManager
27+
import com.oztechan.ccc.client.core.analytics.model.UserProperty
2528
import com.oztechan.ccc.client.viewmodel.main.MainEffect
2629
import com.oztechan.ccc.client.viewmodel.main.MainViewModel
2730
import kotlinx.coroutines.flow.launchIn
@@ -34,6 +37,7 @@ class MainActivity : BaseActivity() {
3437

3538
private val adManager: AdManager by inject()
3639
private val viewModel: MainViewModel by viewModel()
40+
private val analyticsManager by inject<AnalyticsManager>()
3741

3842
init {
3943
// use dark mode default for old devices
@@ -44,10 +48,16 @@ class MainActivity : BaseActivity() {
4448

4549
override fun onCreate(savedInstanceState: Bundle?) {
4650
installSplashScreen()
51+
4752
super.onCreate(savedInstanceState)
53+
4854
Logger.i { "MainActivity onCreate" }
55+
4956
setContentView(R.layout.activity_main)
57+
5058
adManager.initAds(this)
59+
analyticsManager.setUserProperty(UserProperty.IsRooted(isDeviceRooted(this)))
60+
5161
observeStates()
5262
observeEffects()
5363
}
@@ -93,7 +103,7 @@ class MainActivity : BaseActivity() {
93103
positiveButton = R.string.update,
94104
cancelable = isCancelable
95105
) {
96-
resolveAndStartIntent(Intent(Intent.ACTION_VIEW, Uri.parse(marketLink)))
106+
resolveAndStartIntent(Intent(Intent.ACTION_VIEW, marketLink.toUri()))
97107
}
98108

99109
private fun setDestination(fragmentId: Int) = with(getNavigationController()) {

0 commit comments

Comments
 (0)