From 98cf52e5eed7d0460b55150bff31dc382dd69e75 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Sun, 3 May 2026 17:37:29 -0300 Subject: [PATCH 01/10] Update Gradle and Android Gradle Plugin versions - Update Gradle wrapper to 8.13 in `gradle-wrapper.properties`. - Update `android_gradle_plugin` to 8.13.2 in `libs.versions.toml`. --- gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e75e8b2c..b08f4235 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.3.10" -android_gradle_plugin = "8.9.1" +android_gradle_plugin = "8.13.2" koin = "4.2.0" koin-annotations = "2.3.1" ksp = "2.3.5" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f6742b47..83c4a861 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,8 @@ #Thu Mar 05 21:58:53 BRT 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 3fb7c42659149f689c813ed31840894ab7a5a9c8 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 13:44:48 -0300 Subject: [PATCH 02/10] Refactor project structure to separate Android application logic into a dedicated module - Create new `:androidApp` module to serve as the main Android entry point. - Convert `:composeApp` from an application module to a KMP library. - Move `MainActivity`, `CustomApplication`, and Android-specific configuration files (Manifest, Firebase, Kotzilla) from `:composeApp` to `:androidApp`. - Update `CommonExtensions` visibility to `public` to support the new module configuration. - Pin `kotlin_android` version to `2.2.20` in the version catalog. - Update `:composeApp` dependency declarations to use `api` for core shared modules. --- androidApp/build.gradle.kts | 45 +++++++++++++++++++ .../src => androidApp}/google-services.json | 0 {composeApp => androidApp}/kotzilla.json | 0 .../src/main}/AndroidManifest.xml | 0 .../presentation/CustomApplication.kt | 0 .../presentation/MainActivity.kt | 1 - .../main/java/extensions/CommonExtensions.kt | 8 ++-- composeApp/build.gradle.kts | 14 ++---- gradle/libs.versions.toml | 2 +- settings.gradle.kts | 2 +- 10 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 androidApp/build.gradle.kts rename {composeApp/src => androidApp}/google-services.json (100%) rename {composeApp => androidApp}/kotzilla.json (100%) rename {composeApp/src/androidMain => androidApp/src/main}/AndroidManifest.xml (100%) rename {composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp => androidApp/src/main/kotlin/com/codandotv/streamplayerapp}/presentation/CustomApplication.kt (100%) rename {composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp => androidApp/src/main/kotlin/com/codandotv/streamplayerapp}/presentation/MainActivity.kt (95%) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts new file mode 100644 index 00000000..bd79cc9c --- /dev/null +++ b/androidApp/build.gradle.kts @@ -0,0 +1,45 @@ +import extensions.setupAndroidDefaultConfig +import extensions.setupCompileOptions +import extensions.setupPackingOptions + +plugins { + id("com.android.application") + alias(libs.plugins.jetbrains.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.google.services) + alias(libs.plugins.firebase.crashlytics) + alias(libs.plugins.kotzilla) + alias(libs.plugins.kotlin.android) +} + +kotzilla { + versionName = Config.versionName +} + +android { + namespace = Config.applicationId + + setupCompileOptions() + setupPackingOptions() + setupAndroidDefaultConfig() + + defaultConfig { + applicationId = Config.applicationId + minSdk = Config.minSdkVersion + targetSdk = Config.targetSdkVersion + versionCode = Config.versionCode + versionName = Config.versionName + multiDexEnabled = true + } + + dependencies { + implementation(libs.core.ktx) + implementation(projects.composeApp) + implementation(libs.koin.android) + implementation(libs.lottie) + implementation(project.dependencies.platform(libs.firebase.bom)) + implementation(libs.firebase.analytics) + implementation(libs.firebase.crashlytics) + implementation(libs.koin.core) + } +} \ No newline at end of file diff --git a/composeApp/src/google-services.json b/androidApp/google-services.json similarity index 100% rename from composeApp/src/google-services.json rename to androidApp/google-services.json diff --git a/composeApp/kotzilla.json b/androidApp/kotzilla.json similarity index 100% rename from composeApp/kotzilla.json rename to androidApp/kotzilla.json diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml similarity index 100% rename from composeApp/src/androidMain/AndroidManifest.xml rename to androidApp/src/main/AndroidManifest.xml diff --git a/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt similarity index 100% rename from composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt rename to androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt diff --git a/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/MainActivity.kt b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/MainActivity.kt similarity index 95% rename from composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/MainActivity.kt rename to androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/MainActivity.kt index 679bd2b6..8ceb3041 100644 --- a/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/MainActivity.kt +++ b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/MainActivity.kt @@ -3,7 +3,6 @@ package com.codandotv.streamplayerapp.presentation import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import androidx.core.view.WindowCompat import com.codandotv.streamplayerapp.StreamPlayerApp import com.google.firebase.Firebase import com.google.firebase.initialize diff --git a/build-logic/src/main/java/extensions/CommonExtensions.kt b/build-logic/src/main/java/extensions/CommonExtensions.kt index 9056fb14..8b3c5446 100644 --- a/build-logic/src/main/java/extensions/CommonExtensions.kt +++ b/build-logic/src/main/java/extensions/CommonExtensions.kt @@ -7,7 +7,7 @@ import org.gradle.api.artifacts.VersionCatalog import org.gradle.api.artifacts.VersionCatalogsExtension import org.gradle.kotlin.dsl.getByType -internal fun CommonExtension<*, *, *, *, *, *>.setupPackingOptions() { +fun CommonExtension<*, *, *, *, *, *>.setupPackingOptions() { packaging { resources { with(pickFirsts) { @@ -23,7 +23,7 @@ internal fun CommonExtension<*, *, *, *, *, *>.setupPackingOptions() { } } -internal fun CommonExtension<*, *, *, *, *, *>.setupAndroidDefaultConfig() { +fun CommonExtension<*, *, *, *, *, *>.setupAndroidDefaultConfig() { defaultConfig { compileSdk = Config.compileSdkVersion minSdk = Config.minSdkVersion @@ -33,14 +33,14 @@ internal fun CommonExtension<*, *, *, *, *, *>.setupAndroidDefaultConfig() { } } -internal fun CommonExtension<*, *, *, *, *, *>.setupCompileOptions() { +fun CommonExtension<*, *, *, *, *, *>.setupCompileOptions() { compileOptions { sourceCompatibility = Config.javaVersion targetCompatibility = Config.javaVersion } } -internal fun CommonExtension<*, *, *, *, *, *>.setupNameSpace(project: Project) { +fun CommonExtension<*, *, *, *, *, *>.setupNameSpace(project: Project) { val moduleName = project.displayName .removePrefix("project ") .replace(":", ".") diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 0337f0a5..9bc52423 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,16 +1,9 @@ @file:Suppress("UnstableApiUsage") plugins { - id("com.streamplayer.application") + id("com.streamplayer.kmp-library") alias(libs.plugins.jetbrains.compose) alias(libs.plugins.compose.compiler) - alias(libs.plugins.google.services) - alias(libs.plugins.firebase.crashlytics) - alias(libs.plugins.kotzilla) -} - -kotzilla { - versionName = Config.versionName } kotlin { @@ -29,12 +22,13 @@ kotlin { implementation(projects.featureProfile) implementation(projects.featureNews) implementation(projects.coreShared) - implementation(projects.coreSharedUi) + api(projects.coreSharedUi) + api(projects.coreCameraGallery) + api(projects.coreBackgroundWork) implementation(projects.corePermission) implementation(projects.coreNavigation) implementation(projects.coreNetworking) implementation(projects.coreLocalStorage) - implementation(projects.coreBackgroundWork) implementation(libs.bundles.compose) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b08f4235..06262075 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -169,7 +169,7 @@ kotzilla = { id = "io.kotzilla.kotzilla-plugin", version.ref = "kotzilla" } android_application = { id = "com.android.application", version.ref = "android_gradle_plugin" } android_library = { id = "com.android.library", version.ref = "android_gradle_plugin" } -kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin_android = { id = "org.jetbrains.kotlin.android", version = "2.2.20" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose_plugin_multiplataform" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 68208411..f3bfb329 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,7 +23,7 @@ dependencyResolutionManagement { } } - +include(":androidApp") include(":composeApp") include(":feature-list-streams") include(":core-shared") From 779ee3c738bfd727970acce224805456f5c5b163 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 14:29:49 -0300 Subject: [PATCH 03/10] Refactor Koin initialization and update Kotzilla configuration - Introduce `streamPlayerApplication` in `AppModule.kt` to centralize shared dependency injection setup. - Update `CustomApplication` (Android) and `KoinIosHelper` (iOS) to use the new centralized Koin initialization helper. - Migrate Kotzilla plugin and configuration from `androidApp` to `composeApp` build logic. - Update `kotzilla.json` to support flavor-specific configurations for debug and release. - Remove unused `com.streamplayer.application.gradle.kts` build logic script. --- androidApp/build.gradle.kts | 4 -- androidApp/kotzilla.json | 28 ++++++---- .../presentation/CustomApplication.kt | 9 ++-- .../com.streamplayer.application.gradle.kts | 54 ------------------- composeApp/build.gradle.kts | 5 ++ .../di/AppModule.kt | 22 +++++--- .../di/KoinIosHelper.kt | 14 ++--- 7 files changed, 48 insertions(+), 88 deletions(-) delete mode 100644 build-logic/src/main/java/com.streamplayer.application.gradle.kts diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index bd79cc9c..51fbdffc 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -12,10 +12,6 @@ plugins { alias(libs.plugins.kotlin.android) } -kotzilla { - versionName = Config.versionName -} - android { namespace = Config.applicationId diff --git a/androidApp/kotzilla.json b/androidApp/kotzilla.json index 8ef542e0..5609da5e 100644 --- a/androidApp/kotzilla.json +++ b/androidApp/kotzilla.json @@ -1,11 +1,19 @@ { - "sdkVersion": "1.4.2", - "keys": [ - { - "appId": "019cca1a-c2ae-79d5-bf91-20316edd8f11", - "applicationPackageName": "com.codandotv.streamplayerapp", - "keyId": "019cca1b-46f0-7cb9-aa50-9ed092ed11fe", - "apiKey": "ktz-sdk-_sEL6C-eAYe1KiqBm1mOv1BoKAOtOFpeK40ADc49LaA" - } - ] -} + "keys": [ + { + "appId": "", + "applicationPackageName": "com.codandotv.streamplayerapp", + "keyId": "", + "apiKey": "", + "flavor": "debug", + "isDefault": true + }, + { + "appId": "", + "applicationPackageName": "com.codandotv.streamplayerapp", + "keyId": "", + "apiKey": "", + "flavor": "release" + } + ] +} \ No newline at end of file diff --git a/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt index 208a88c7..8be75471 100644 --- a/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt +++ b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt @@ -3,23 +3,22 @@ package com.codandotv.streamplayerapp.presentation import android.app.Application import com.codandotv.streamplayerapp.core.shared.ui.R import com.codandotv.streamplayerapp.core_background_work.worker.WorkScheduler -import com.codandotv.streamplayerapp.di.AppModule +import com.codandotv.streamplayerapp.di.streamPlayerApplication import com.mmk.kmpnotifier.notification.NotifierManager import com.mmk.kmpnotifier.notification.configuration.NotificationPlatformConfiguration import io.kotzilla.generated.monitoring import org.koin.android.ext.koin.androidContext -import org.koin.core.context.startKoin class CustomApplication : Application() { override fun onCreate() { super.onCreate() - startKoin { - androidContext(this@CustomApplication.applicationContext) - modules(AppModule.list) + streamPlayerApplication { + androidContext(this@CustomApplication.applicationContext) monitoring() } + WorkScheduler.scheduleSync(this) initializeNotification() } diff --git a/build-logic/src/main/java/com.streamplayer.application.gradle.kts b/build-logic/src/main/java/com.streamplayer.application.gradle.kts deleted file mode 100644 index 2e948946..00000000 --- a/build-logic/src/main/java/com.streamplayer.application.gradle.kts +++ /dev/null @@ -1,54 +0,0 @@ -@file:Suppress("UnstableApiUsage") - -import extensions.iosTarget -import extensions.setupAndroidDefaultConfig -import extensions.setupCompileOptions -import extensions.setupPackingOptions -import org.gradle.accessors.dm.LibrariesForLibs - -val libs = the() - -plugins { - id("com.android.application") - id("org.jetbrains.kotlin.multiplatform") - id("kotlin-parcelize") - id("com.streamplayer.dokka") - id("com.streamplayer.detekt") -} - -kotlin { - jvmToolchain(21) - - androidTarget { - compilerOptions { - jvmTarget.set(Config.jvmTarget) - } - } - - iosTarget() -} - -android { - namespace = Config.applicationId - - setupCompileOptions() - setupPackingOptions() - setupAndroidDefaultConfig() - - defaultConfig { - applicationId = Config.applicationId - minSdk = Config.minSdkVersion - targetSdk = Config.targetSdkVersion - versionCode = Config.versionCode - versionName = Config.versionName - multiDexEnabled = true - } -} - -dependencies { - add("dokkaPlugin", libs.dokka) -} - -tasks.register("coverageReport") { - dependsOn(":app:koverHtmlReportDebug") -} diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 9bc52423..ca57bf24 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -4,6 +4,11 @@ plugins { id("com.streamplayer.kmp-library") alias(libs.plugins.jetbrains.compose) alias(libs.plugins.compose.compiler) + alias(libs.plugins.kotzilla) +} + +kotzilla { + versionName = Config.versionName } kotlin { diff --git a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt index cdebe0ed..10ea2545 100644 --- a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt +++ b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt @@ -7,16 +7,22 @@ import com.codandotv.streamplayerapp.core_shared.qualifier.QualifierDispatcherIO import com.codandotv.streamplayerapp.feature_list_streams.list.di.ListStreamModule import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.IO +import org.koin.core.KoinApplication +import org.koin.core.context.startKoin import org.koin.dsl.module import org.koin.ksp.generated.module -object AppModule { - private val module = module { - single(QualifierDispatcherIO) { Dispatchers.IO } +fun streamPlayerApplication(platformBlock: KoinApplication.() -> Unit): KoinApplication { + return startKoin { + platformBlock() + + modules( + module { single(QualifierDispatcherIO) { Dispatchers.IO } }, + NetworkModule().module, + LocalStorageModule.module, + SyncModule.module, + ListStreamModule.module, + ) } - val list = module + - NetworkModule().module + - LocalStorageModule.module + - SyncModule.module + - ListStreamModule.module } + diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt index cfe2292a..4ad1cfe4 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt @@ -2,18 +2,18 @@ package com.codandotv.streamplayerapp.di import com.codandotv.streamplayerapp.presentation.components.LottieViewProvider import io.kotzilla.generated.monitoring -import org.koin.core.context.startKoin import org.koin.dsl.module class KoinIosHelper { fun initKoin(lottieViewProvider: LottieViewProvider) { - startKoin { - modules(AppModule.list + module { - single { - lottieViewProvider + streamPlayerApplication { + modules( + module { + single { + lottieViewProvider + } } - }) - + ) monitoring( onConfig = { onConfig { useIosCrashReport = false } From 3cd5ffae74153eb0beb2f080e2b8e3456d64e4e5 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 14:31:41 -0300 Subject: [PATCH 04/10] Add Kotzilla SDK configuration file - Add `composeApp/kotzilla.json` containing the SDK version, application ID, and API keys for the project. --- composeApp/kotzilla.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 composeApp/kotzilla.json diff --git a/composeApp/kotzilla.json b/composeApp/kotzilla.json new file mode 100644 index 00000000..8ef542e0 --- /dev/null +++ b/composeApp/kotzilla.json @@ -0,0 +1,11 @@ +{ + "sdkVersion": "1.4.2", + "keys": [ + { + "appId": "019cca1a-c2ae-79d5-bf91-20316edd8f11", + "applicationPackageName": "com.codandotv.streamplayerapp", + "keyId": "019cca1b-46f0-7cb9-aa50-9ed092ed11fe", + "apiKey": "ktz-sdk-_sEL6C-eAYe1KiqBm1mOv1BoKAOtOFpeK40ADc49LaA" + } + ] +} From 47ff35af6536cdd08ed054e039c73fa519f83bc3 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 14:32:02 -0300 Subject: [PATCH 05/10] Remove kotzilla.json configuration file - Delete `androidApp/kotzilla.json` containing SDK key configurations. --- androidApp/kotzilla.json | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 androidApp/kotzilla.json diff --git a/androidApp/kotzilla.json b/androidApp/kotzilla.json deleted file mode 100644 index 5609da5e..00000000 --- a/androidApp/kotzilla.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "keys": [ - { - "appId": "", - "applicationPackageName": "com.codandotv.streamplayerapp", - "keyId": "", - "apiKey": "", - "flavor": "debug", - "isDefault": true - }, - { - "appId": "", - "applicationPackageName": "com.codandotv.streamplayerapp", - "keyId": "", - "apiKey": "", - "flavor": "release" - } - ] -} \ No newline at end of file From e7d09180f2395047dbcecb3f90702a71b6ce32f3 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 17:20:59 -0300 Subject: [PATCH 06/10] Update build configuration, dependencies, and Kotzilla integration - Upgrade Gradle wrapper to 9.3.1. - Upgrade Kotlin to 2.3.20 and Android Gradle Plugin to 9.1.0. - Transition `com.streamplayer.kmp-library` logic to use `com.android.kotlin.multiplatform.library`. - Remove `CommonExtensions.kt` and inline Android configuration (namespace, SDK versions, compile options) directly into build scripts. - Relocate Kotzilla configuration and `kotzilla.json` from `composeApp` to `androidApp`. - Remove Kotzilla monitoring initialization from `CustomApplication` and `KoinIosHelper`. - Remove the unused `org.jetbrains.kotlin.android` plugin from the project. --- androidApp/build.gradle.kts | 37 ++++++------ {composeApp => androidApp}/kotzilla.json | 0 .../presentation/CustomApplication.kt | 2 - .../com.streamplayer.kmp-library.gradle.kts | 52 ++++------------- .../main/java/extensions/CommonExtensions.kt | 57 ------------------- build.gradle.kts | 1 - composeApp/build.gradle.kts | 5 -- .../di/KoinIosHelper.kt | 6 -- gradle/libs.versions.toml | 5 +- gradle/wrapper/gradle-wrapper.properties | 6 +- iosApp/iosApp.xcodeproj/project.pbxproj | 2 +- 11 files changed, 37 insertions(+), 136 deletions(-) rename {composeApp => androidApp}/kotzilla.json (100%) delete mode 100644 build-logic/src/main/java/extensions/CommonExtensions.kt diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 51fbdffc..5c930b68 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -1,7 +1,3 @@ -import extensions.setupAndroidDefaultConfig -import extensions.setupCompileOptions -import extensions.setupPackingOptions - plugins { id("com.android.application") alias(libs.plugins.jetbrains.compose) @@ -9,33 +5,38 @@ plugins { alias(libs.plugins.google.services) alias(libs.plugins.firebase.crashlytics) alias(libs.plugins.kotzilla) - alias(libs.plugins.kotlin.android) +} + +kotzilla { + versionName = Config.versionName } android { namespace = Config.applicationId - setupCompileOptions() - setupPackingOptions() - setupAndroidDefaultConfig() - defaultConfig { applicationId = Config.applicationId minSdk = Config.minSdkVersion + compileSdk = Config.compileSdkVersion targetSdk = Config.targetSdkVersion versionCode = Config.versionCode versionName = Config.versionName multiDexEnabled = true } - dependencies { - implementation(libs.core.ktx) - implementation(projects.composeApp) - implementation(libs.koin.android) - implementation(libs.lottie) - implementation(project.dependencies.platform(libs.firebase.bom)) - implementation(libs.firebase.analytics) - implementation(libs.firebase.crashlytics) - implementation(libs.koin.core) + compileOptions { + sourceCompatibility = Config.javaVersion + targetCompatibility = Config.javaVersion } +} + +dependencies { + implementation(libs.core.ktx) + implementation(projects.composeApp) + implementation(libs.koin.android) + implementation(libs.lottie) + implementation(project.dependencies.platform(libs.firebase.bom)) + implementation(libs.firebase.analytics) + implementation(libs.firebase.crashlytics) + implementation(libs.koin.core) } \ No newline at end of file diff --git a/composeApp/kotzilla.json b/androidApp/kotzilla.json similarity index 100% rename from composeApp/kotzilla.json rename to androidApp/kotzilla.json diff --git a/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt index 8be75471..a5a52b6e 100644 --- a/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt +++ b/androidApp/src/main/kotlin/com/codandotv/streamplayerapp/presentation/CustomApplication.kt @@ -6,7 +6,6 @@ import com.codandotv.streamplayerapp.core_background_work.worker.WorkScheduler import com.codandotv.streamplayerapp.di.streamPlayerApplication import com.mmk.kmpnotifier.notification.NotifierManager import com.mmk.kmpnotifier.notification.configuration.NotificationPlatformConfiguration -import io.kotzilla.generated.monitoring import org.koin.android.ext.koin.androidContext class CustomApplication : Application() { @@ -16,7 +15,6 @@ class CustomApplication : Application() { streamPlayerApplication { androidContext(this@CustomApplication.applicationContext) - monitoring() } WorkScheduler.scheduleSync(this) diff --git a/build-logic/src/main/java/com.streamplayer.kmp-library.gradle.kts b/build-logic/src/main/java/com.streamplayer.kmp-library.gradle.kts index 149a784b..ea8f4626 100644 --- a/build-logic/src/main/java/com.streamplayer.kmp-library.gradle.kts +++ b/build-logic/src/main/java/com.streamplayer.kmp-library.gradle.kts @@ -1,10 +1,6 @@ @file:Suppress("UnstableApiUsage") import extensions.iosTarget -import extensions.setupAndroidDefaultConfig -import extensions.setupCompileOptions -import extensions.setupNameSpace -import extensions.setupPackingOptions import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.kotlin.dsl.the @@ -12,7 +8,7 @@ val libs = the() plugins { id("org.jetbrains.kotlin.multiplatform") - id("com.android.library") + id("com.android.kotlin.multiplatform.library") id("org.jetbrains.kotlin.plugin.serialization") id("kotlin-parcelize") id("com.streamplayer.dokka") @@ -20,44 +16,20 @@ plugins { } kotlin { - jvmToolchain(21) + android { + val moduleName = project.displayName + .removePrefix("project ") + .replace(":", ".") + .replace("'", "") + .replace("-", ".") - androidTarget { - compilerOptions { - jvmTarget.set(Config.jvmTarget) - freeCompilerArgs.add("-Xstring-concat=inline") - } - } - - iosTarget() -} - -android { - setupNameSpace(project) + namespace = "${Config.applicationId}$moduleName" - setupCompileOptions() + compileSdk = Config.compileSdkVersion + minSdk = Config.minSdkVersion - setupPackingOptions() - - setupAndroidDefaultConfig() - defaultConfig.targetSdk = Config.targetSdkVersion - - buildTypes { - getByName("release") { - isMinifyEnabled = true - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - consumerProguardFiles("proguard-rules.pro") - } - - getByName("debug") { - isMinifyEnabled = false - } + androidResources.enable = true } -} -dependencies { - add("dokkaPlugin", libs.dokka) + iosTarget() } diff --git a/build-logic/src/main/java/extensions/CommonExtensions.kt b/build-logic/src/main/java/extensions/CommonExtensions.kt deleted file mode 100644 index 8b3c5446..00000000 --- a/build-logic/src/main/java/extensions/CommonExtensions.kt +++ /dev/null @@ -1,57 +0,0 @@ -package extensions - -import Config -import com.android.build.api.dsl.CommonExtension -import org.gradle.api.Project -import org.gradle.api.artifacts.VersionCatalog -import org.gradle.api.artifacts.VersionCatalogsExtension -import org.gradle.kotlin.dsl.getByType - -fun CommonExtension<*, *, *, *, *, *>.setupPackingOptions() { - packaging { - resources { - with(pickFirsts) { - add("META-INF/library_release.kotlin_module") - add("META-INF/LICENSE.md") - add("META-INF/LICENSE-notice.md") - } - with(excludes) { - add("META-INF/AL2.0") - add("META-INF/LGPL2.1") - } - } - } -} - -fun CommonExtension<*, *, *, *, *, *>.setupAndroidDefaultConfig() { - defaultConfig { - compileSdk = Config.compileSdkVersion - minSdk = Config.minSdkVersion - vectorDrawables.useSupportLibrary = true - - testInstrumentationRunner = Config.testInstrumentationRunner - } -} - -fun CommonExtension<*, *, *, *, *, *>.setupCompileOptions() { - compileOptions { - sourceCompatibility = Config.javaVersion - targetCompatibility = Config.javaVersion - } -} - -fun CommonExtension<*, *, *, *, *, *>.setupNameSpace(project: Project) { - val moduleName = project.displayName - .removePrefix("project ") - .replace(":", ".") - .replace("'", "") - .replace("-", ".") - - namespace = "${Config.applicationId}$moduleName" -} - -internal val Project.libs: VersionCatalog - get() { - return project.extensions.getByType() - .named("libs") - } diff --git a/build.gradle.kts b/build.gradle.kts index c3456e7b..962a7f6c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,6 @@ import java.net.URI plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false - alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.serialization) apply false alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.jetbrains.compose) apply false diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index ca57bf24..9bc52423 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -4,11 +4,6 @@ plugins { id("com.streamplayer.kmp-library") alias(libs.plugins.jetbrains.compose) alias(libs.plugins.compose.compiler) - alias(libs.plugins.kotzilla) -} - -kotzilla { - versionName = Config.versionName } kotlin { diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt index 4ad1cfe4..c2de4634 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt @@ -1,7 +1,6 @@ package com.codandotv.streamplayerapp.di import com.codandotv.streamplayerapp.presentation.components.LottieViewProvider -import io.kotzilla.generated.monitoring import org.koin.dsl.module class KoinIosHelper { @@ -14,11 +13,6 @@ class KoinIosHelper { } } ) - monitoring( - onConfig = { - onConfig { useIosCrashReport = false } - } - ) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06262075..a39e80bc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -kotlin = "2.3.10" -android_gradle_plugin = "8.13.2" +kotlin = "2.3.20" +android_gradle_plugin = "9.1.0" koin = "4.2.0" koin-annotations = "2.3.1" ksp = "2.3.5" @@ -169,7 +169,6 @@ kotzilla = { id = "io.kotzilla.kotzilla-plugin", version.ref = "kotzilla" } android_application = { id = "com.android.application", version.ref = "android_gradle_plugin" } android_library = { id = "com.android.library", version.ref = "android_gradle_plugin" } -kotlin_android = { id = "org.jetbrains.kotlin.android", version = "2.2.20" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose_plugin_multiplataform" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 83c4a861..d864d546 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,8 @@ -#Thu Mar 05 21:58:53 BRT 2026 +#Mon May 04 14:42:33 BRT 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionSha256Sum=b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index a23166b7..5a6f40ea 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -341,7 +341,7 @@ ); outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 1; + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "# KOTZILLA_SCRIPT_VERSION=9\nset -e\nM=$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/kotzilla-debug\n[ \"$CONFIGURATION\" = Release ] && rm -f \"$M\" 2>/dev/null || touch \"$M\" 2>/dev/null\n[ -z \"$DWARF_DSYM_FOLDER_PATH\" ] && exit 0\ncd \"$SRCROOT/..\"\n./gradlew ':composeApp:uploadDsymFile' --dsymPath=\"$DWARF_DSYM_FOLDER_PATH\"\n"; }; From 2cd6115ab250f201984529d7bfe94f23153df709 Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 17:22:19 -0300 Subject: [PATCH 07/10] Update formatting in androidApp/build.gradle.kts - Fix whitespace/newline at the end of the file. --- androidApp/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 5c930b68..22fdc600 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -39,4 +39,4 @@ dependencies { implementation(libs.firebase.analytics) implementation(libs.firebase.crashlytics) implementation(libs.koin.core) -} \ No newline at end of file +} From ee31c98bb38f934bf946dce4f1f378aa9c3b0ecf Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 18:18:25 -0300 Subject: [PATCH 08/10] Remove Kotzilla integration temporarily --- androidApp/build.gradle.kts | 6 +----- androidApp/kotzilla.json | 11 ---------- .../di/AppModule.kt | 1 - iosApp/iosApp.xcodeproj/project.pbxproj | 21 +------------------ 4 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 androidApp/kotzilla.json diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 22fdc600..2a5aea06 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -4,11 +4,6 @@ plugins { alias(libs.plugins.compose.compiler) alias(libs.plugins.google.services) alias(libs.plugins.firebase.crashlytics) - alias(libs.plugins.kotzilla) -} - -kotzilla { - versionName = Config.versionName } android { @@ -39,4 +34,5 @@ dependencies { implementation(libs.firebase.analytics) implementation(libs.firebase.crashlytics) implementation(libs.koin.core) + implementation(libs.activity.compose) } diff --git a/androidApp/kotzilla.json b/androidApp/kotzilla.json deleted file mode 100644 index 8ef542e0..00000000 --- a/androidApp/kotzilla.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "sdkVersion": "1.4.2", - "keys": [ - { - "appId": "019cca1a-c2ae-79d5-bf91-20316edd8f11", - "applicationPackageName": "com.codandotv.streamplayerapp", - "keyId": "019cca1b-46f0-7cb9-aa50-9ed092ed11fe", - "apiKey": "ktz-sdk-_sEL6C-eAYe1KiqBm1mOv1BoKAOtOFpeK40ADc49LaA" - } - ] -} diff --git a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt index 10ea2545..5da57d51 100644 --- a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt +++ b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt @@ -15,7 +15,6 @@ import org.koin.ksp.generated.module fun streamPlayerApplication(platformBlock: KoinApplication.() -> Unit): KoinApplication { return startKoin { platformBlock() - modules( module { single(QualifierDispatcherIO) { Dispatchers.IO } }, NetworkModule().module, diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 5a6f40ea..b04da153 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -207,8 +207,7 @@ 7555FF77242A565900829871 /* Sources */, B92378962B6B1156000C7307 /* Frameworks */, 7555FF79242A565900829871 /* Resources */, - - E5F2457C9C6047898FF08BDA /* Kotzilla Dsym */,); + ); buildRules = ( ); dependencies = ( @@ -327,24 +326,6 @@ shellPath = /bin/sh; shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n"; }; - E5F2457C9C6047898FF08BDA /* Kotzilla Dsym */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Kotzilla Dsym"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# KOTZILLA_SCRIPT_VERSION=9\nset -e\nM=$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/kotzilla-debug\n[ \"$CONFIGURATION\" = Release ] && rm -f \"$M\" 2>/dev/null || touch \"$M\" 2>/dev/null\n[ -z \"$DWARF_DSYM_FOLDER_PATH\" ] && exit 0\ncd \"$SRCROOT/..\"\n./gradlew ':composeApp:uploadDsymFile' --dsymPath=\"$DWARF_DSYM_FOLDER_PATH\"\n"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ From 37d098339d6bf1ca0ffe1cd45eb896160799c0ea Mon Sep 17 00:00:00 2001 From: Gabriel Moro Date: Mon, 4 May 2026 18:30:53 -0300 Subject: [PATCH 09/10] Update iOS project configuration and launch settings - Change the default launch build configuration from Release to Debug in the Xcode scheme. - Enable the "Current Location" scenario for the launch action. - Replace the hardcoded `DEVELOPMENT_TEAM` ID with the `${TEAM_ID}` variable in `project.pbxproj`. --- iosApp/iosApp.xcodeproj/project.pbxproj | 4 ++-- .../iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index b04da153..afe73fa0 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -369,7 +369,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = P8ZZXHC5BB; + DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -539,7 +539,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; - DEVELOPMENT_TEAM = P8ZZXHC5BB; + DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme b/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme index e76a2fbd..54af452c 100644 --- a/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme +++ b/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme @@ -43,7 +43,7 @@ + + Date: Mon, 4 May 2026 18:41:10 -0300 Subject: [PATCH 10/10] Update GitHub Actions build workflow to use :androidApp module - Update build step name and Gradle command to reference `:androidApp:assembleDebug` instead of `:composeApp:assembleDebug`. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dacf4cc..0e09dac9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,8 +44,8 @@ jobs: key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: gradle-${{ runner.os }}- - - name: Build Android (composeApp) - run: ./gradlew :composeApp:assembleDebug + - name: Build Android (androidApp) + run: ./gradlew :androidApp:assembleDebug - name: Run Android/CommonMain unit tests run: ./gradlew testDebugUnitTest