diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 3622f033e..181959eed 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -47,6 +47,7 @@ afterEvaluate {
android {
namespace = "org.michaelbel.movies.app"
+ flavorDimensions += "version"
defaultConfig {
applicationId = "org.michaelbel.moviemade"
@@ -130,7 +131,6 @@ android {
compose = true
}
- flavorDimensions += "version"
productFlavors {
create("gms") {
dimension = "version"
diff --git a/core/analytics-impl/build.gradle.kts b/core/analytics-impl/build.gradle.kts
index 763635372..b28451a1d 100644
--- a/core/analytics-impl/build.gradle.kts
+++ b/core/analytics-impl/build.gradle.kts
@@ -29,5 +29,5 @@ android {
}
dependencies {
- implementation(libs.firebase.analytics.ktx)
+ implementation(project(":core:platform-services:gms"))
}
\ No newline at end of file
diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts
index 0f8374f9e..bd1105888 100644
--- a/core/analytics/build.gradle.kts
+++ b/core/analytics/build.gradle.kts
@@ -36,5 +36,5 @@ android {
}
dependencies {
- implementation(libs.firebase.analytics.ktx)
+ implementation(project(":core:platform-services:gms"))
}
\ No newline at end of file
diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts
index 423540a9f..eb9480549 100644
--- a/core/common/build.gradle.kts
+++ b/core/common/build.gradle.kts
@@ -45,12 +45,10 @@ android {
}
dependencies {
+ api(project(":core:platform-services:gms"))
implementation(project(":core:analytics"))
implementation(project(":core:network"))
api(libs.bundles.kotlin.coroutines)
- api(libs.firebase.config.ktx)
- api(libs.gms.play.services.base)
- api(libs.play.core.ktx)
api(libs.androidx.activity.compose)
api(libs.androidx.core.ktx)
api(libs.androidx.paging.compose)
@@ -59,7 +57,6 @@ dependencies {
api(libs.bundles.lifecycle)
api(libs.timber)
implementation(libs.bundles.appcompat)
- implementation(libs.firebase.crashlytics.ktx)
implementation(libs.androidx.startup.runtime)
implementation(libs.androidx.browser)
diff --git a/core/notifications/build.gradle.kts b/core/notifications/build.gradle.kts
index 025bcc718..7d783113a 100644
--- a/core/notifications/build.gradle.kts
+++ b/core/notifications/build.gradle.kts
@@ -36,8 +36,8 @@ android {
}
dependencies {
+ api(project(":core:platform-services:gms"))
implementation(project(":core:common"))
implementation(project(":core:interactor"))
implementation(project(":core:ui"))
- api(libs.firebase.messaging.ktx)
}
\ No newline at end of file
diff --git a/core/platform-services/gms/.gitignore b/core/platform-services/gms/.gitignore
new file mode 100644
index 000000000..42afabfd2
--- /dev/null
+++ b/core/platform-services/gms/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/core/platform-services/gms/build.gradle.kts b/core/platform-services/gms/build.gradle.kts
new file mode 100644
index 000000000..1b42ba67f
--- /dev/null
+++ b/core/platform-services/gms/build.gradle.kts
@@ -0,0 +1,42 @@
+@Suppress("dsl_scope_violation")
+plugins {
+ alias(libs.plugins.library)
+ alias(libs.plugins.kotlin)
+ id("movies-android-hilt")
+}
+
+android {
+ namespace = "org.michaelbel.movies.gms"
+
+ defaultConfig {
+ minSdk = libs.versions.min.sdk.get().toInt()
+ compileSdk = libs.versions.compile.sdk.get().toInt()
+ }
+
+ /*buildTypes {
+ create("benchmark") {
+ signingConfig = signingConfigs.getByName("debug")
+ matchingFallbacks += listOf("release")
+ initWith(getByName("release"))
+ }
+ }*/
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ lint {
+ quiet = true
+ abortOnError = false
+ ignoreWarnings = true
+ checkDependencies = true
+ lintConfig = file("${project.rootDir}/config/codestyle/lint.xml")
+ }
+}
+
+dependencies {
+ api(libs.bundles.firebase)
+ api(libs.bundles.gms)
+ api(libs.play.core.ktx)
+}
\ No newline at end of file
diff --git a/core/platform-services/gms/src/main/AndroidManifest.xml b/core/platform-services/gms/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..1d26c87a1
--- /dev/null
+++ b/core/platform-services/gms/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/core/platform-services/hms/.gitignore b/core/platform-services/hms/.gitignore
new file mode 100644
index 000000000..42afabfd2
--- /dev/null
+++ b/core/platform-services/hms/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/core/platform-services/hms/build.gradle.kts b/core/platform-services/hms/build.gradle.kts
new file mode 100644
index 000000000..307e9beec
--- /dev/null
+++ b/core/platform-services/hms/build.gradle.kts
@@ -0,0 +1,40 @@
+@Suppress("dsl_scope_violation")
+plugins {
+ alias(libs.plugins.library)
+ alias(libs.plugins.kotlin)
+ id("movies-android-hilt")
+}
+
+android {
+ namespace = "org.michaelbel.movies.hms"
+
+ defaultConfig {
+ minSdk = libs.versions.min.sdk.get().toInt()
+ compileSdk = libs.versions.compile.sdk.get().toInt()
+ }
+
+ /*buildTypes {
+ create("benchmark") {
+ signingConfig = signingConfigs.getByName("debug")
+ matchingFallbacks += listOf("release")
+ initWith(getByName("release"))
+ }
+ }*/
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ lint {
+ quiet = true
+ abortOnError = false
+ ignoreWarnings = true
+ checkDependencies = true
+ lintConfig = file("${project.rootDir}/config/codestyle/lint.xml")
+ }
+}
+
+dependencies {
+
+}
\ No newline at end of file
diff --git a/core/platform-services/hms/src/main/AndroidManifest.xml b/core/platform-services/hms/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..1d26c87a1
--- /dev/null
+++ b/core/platform-services/hms/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 9e672e24d..aed410b79 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -147,10 +147,6 @@ gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "grad
kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
[bundles]
-kotlin-coroutines = [
- "kotlin-coroutines-android",
- "kotlin-coroutines-core"
-]
accompanist = [
"accompanist-appcompat-theme",
"accompanist-drawablepainter",
@@ -179,11 +175,26 @@ datastore = [
"androidx-datastore-preferences",
"androidx-datastore-preferences-core"
]
+gms = [
+# "gms-play-services-ads",
+ "gms-play-services-base",
+ "gms-play-services-instantapps"
+]
+kotlin-coroutines = [
+ "kotlin-coroutines-android",
+ "kotlin-coroutines-core"
+]
lifecycle = [
"androidx-lifecycle-runtime-compose",
"androidx-lifecycle-viewmodel-compose",
"androidx-lifecycle-process"
]
+firebase = [
+ "firebase-analytics-ktx",
+ "firebase-config-ktx",
+ "firebase-crashlytics-ktx",
+ "firebase-messaging-ktx"
+]
material = [
"material",
"material-compose-theme-adapter"
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 3336a6870..f74362bd6 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -29,6 +29,8 @@ include(
":core:network",
":core:notifications",
":core:persistence",
+ ":core:platform-services:gms",
+ ":core:platform-services:hms",
":core:repository",
":core:repository-impl",
":core:ui",