Skip to content

Commit 010b696

Browse files
committed
refactor!: internalize shared code and prepare for archive
Removes the 'shared' module and duplicates its utility classes into 'maps-rx' and 'places-rx' as internal extensions. This change eliminates the need for a separate 'shared' Maven artifact, allowing 'maps-rx' and 'places-rx' to be used as standalone libraries without complex transitive dependencies for manual AAR consumers. Code duplication was chosen over a shared artifact to simplify distribution as we prepare to archive these libraries. Key changes: - Deleted 'shared' module and updated settings.gradle. - Copied MainThreadObservable and related utilities to 'com.google.maps.android.rx.maps.internal' and 'com.google.maps.android.rx.places.internal'. - Updated all imports to use the local internal versions. - Removed project dependency on ':shared' from build files. - Marked all duplicated code as 'internal' to prevent binary compatibility issues or duplicate class definitions if both libraries are used together. This refactoring streamlines the project structure in anticipation of archiving the repository.
1 parent c80f074 commit 010b696

File tree

45 files changed

+277
-197
lines changed

Some content is hidden

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

45 files changed

+277
-197
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,34 @@
1111

1212
# Maps Android Rx
1313

14+
# ⚠️ PROJECT ARCHIVED & DEPRECATED ⚠️
15+
16+
**This library is no longer maintained and has been officially archived.**
17+
18+
### Why is this project being retired?
19+
20+
Since the launch of this project, the Android ecosystem has largely transitioned from RxJava to
21+
**Kotlin Coroutines and Flows**. In alignment with modern Android development practices,
22+
maintenance effort has shifted to libraries that natively support these features.
23+
24+
### Alternatives and Migration
25+
26+
1. **Maps SDK for Android KTX:** We recommend using the
27+
[Maps SDK for Android KTX](https://github.com/googlemaps/android-maps-ktx). This is the current
28+
standard for idiomatic Kotlin development and provides native support for **Coroutines** and **Flow**.
29+
2. **Bridging to RxJava:** If your codebase remains strictly RxJava-based, you can use the Maps KTX
30+
library and convert the resulting Flows into Observables using the [Kotlinx Coroutines RxJava bridge](https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-rx3).
31+
3. **Source Access:** The source code for these Rx wrappers remains available in this repository for
32+
reference or manual inclusion in your project. However, no further updates, bug fixes, or dependency
33+
bumps will be performed.
34+
35+
---
36+
37+
### Final Maintenance Note
38+
39+
This project is being archived to provide clarity to the developer community and to ensure users are
40+
directed toward the most active and supported tools for the Maps SDK.
41+
1442
## Description
1543

1644
This repository contains RxJava bindings for the [Maps SDK for Android](maps-sdk) and [Places SDK for Android](places-sdk).

app/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ android {
5555
}
5656

5757
dependencies {
58-
implementation(project(":shared"))
59-
6058
// RxJava bindings for the Maps SDK
6159
implementation(project(":maps-rx"))
6260

@@ -75,13 +73,6 @@ dependencies {
7573
implementation(libs.rxLifecycle)
7674
implementation(libs.mapsKtx)
7775
implementation(libs.kotlinStdlib)
78-
79-
testImplementation(libs.junit)
80-
testImplementation(libs.robolectric)
81-
testImplementation(libs.androidxTestCore)
82-
testImplementation(libs.androidxTestExtJunit)
83-
testImplementation(libs.mockitoCore)
84-
testImplementation(libs.mockitoKotlin)
8576
}
8677

8778
secrets {

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.google.maps.android.rx.demo">
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
2120
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2221
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

app/src/main/java/com/google/maps/android/rx/demo/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class MainActivity : AppCompatActivity() {
9292
val appInfo = packageManager.getApplicationInfo(packageName, android.content.pm.PackageManager.GET_META_DATA)
9393
val apiKey = appInfo.metaData?.getString("com.google.android.geo.API_KEY") ?: ""
9494
if (apiKey.isNotEmpty()) {
95+
@Suppress("DEPRECATION")
9596
Places.initialize(applicationContext, apiKey)
9697
}
9798
} catch (e: Exception) {

gradle/libs.versions.toml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,41 @@ compileSdk = "36"
33
minSdk = "24"
44
targetSdk = "36"
55

6-
kotlin = "2.3.0"
7-
rxandroid = "3.0.2"
8-
rxjava = "3.1.12"
6+
activity = "1.12.2"
7+
appCompat = "1.7.1"
8+
dokka-gradle-plugin = "2.1.0"
99
gradle = "8.13.2"
10+
gradleMavenPublishPlugin = "0.35.0"
1011
jacoco-android = "0.2.1"
11-
dokka-gradle-plugin = "2.1.0"
12-
secrets-gradle-plugin = "2.0.1"
13-
playServicesMaps = "19.2.0"
14-
places = "5.1.1"
15-
appCompat = "1.7.1"
16-
activity = "1.12.2"
12+
kotlin = "2.3.0"
1713
lifecycleRuntimeKtx = "2.10.0"
14+
mapsKtx = "5.2.1"
1815
material = "1.13.0"
16+
places = "5.1.1"
17+
playServicesMaps = "19.2.0"
1918
rxLifecycle = "4.0.2"
20-
mapsKtx = "5.2.1"
19+
rxandroid = "3.0.2"
20+
rxjava = "3.1.12"
21+
secrets-gradle-plugin = "2.0.1"
2122
volley = "1.2.1"
22-
gradleMavenPublishPlugin = "0.35.0"
23-
junit = "4.13.2"
24-
mockito = "5.21.0"
25-
mockitoInline = "5.2.0"
26-
mockitoKotlin = "6.1.0"
27-
mockk = "1.14.7"
28-
robolectric = "4.16"
29-
androidxTestCore = "1.7.0"
30-
androidxTestExtJunit = "1.3.0"
3123

3224
[libraries]
25+
activityKtx = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
26+
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompat" }
27+
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka-gradle-plugin" }
28+
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
29+
gradle-maven-publish-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradleMavenPublishPlugin" }
30+
jacoco-android = { module = "com.mxalbert.gradle:jacoco-android", version.ref = "jacoco-android" }
3331
jetbrainsKotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
32+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
3433
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
35-
rxJava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" }
36-
rxAndroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" }
37-
playServicesMaps = { module = "com.google.android.gms:play-services-maps", version.ref = "playServicesMaps" }
38-
places = { module = "com.google.android.libraries.places:places", version.ref = "places" }
39-
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompat" }
40-
activityKtx = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
4134
lifecycleRuntimeKtx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
35+
mapsKtx = { module = "com.google.maps.android:maps-ktx", version.ref = "mapsKtx" }
4236
material = { module = "com.google.android.material:material", version.ref = "material" }
37+
places = { module = "com.google.android.libraries.places:places", version.ref = "places" }
38+
playServicesMaps = { module = "com.google.android.gms:play-services-maps", version.ref = "playServicesMaps" }
39+
rxAndroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" }
40+
rxJava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" }
4341
rxLifecycle = { module = "com.trello.rxlifecycle4:rxlifecycle-android-lifecycle-kotlin", version.ref = "rxLifecycle" }
44-
mapsKtx = { module = "com.google.maps.android:maps-ktx", version.ref = "mapsKtx" }
45-
volley = { module = "com.android.volley:volley", version.ref = "volley" }
46-
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
47-
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka-gradle-plugin" }
48-
jacoco-android = { module = "com.mxalbert.gradle:jacoco-android", version.ref = "jacoco-android" }
4942
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secrets-gradle-plugin" }
50-
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
51-
gradle-maven-publish-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradleMavenPublishPlugin" }
52-
junit = { module = "junit:junit", version.ref = "junit" }
53-
mockitoCore = { module = "org.mockito:mockito-core", version.ref = "mockito" }
54-
mockitoKotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" }
55-
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
56-
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
57-
androidxTestCore = { module = "androidx.test:core", version.ref = "androidxTestCore" }
58-
androidxTestExtJunit = { module = "androidx.test.ext:junit", version.ref = "androidxTestExtJunit" }
43+
volley = { module = "com.android.volley:volley", version.ref = "volley" }

maps-rx/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
4646
}
4747
}
4848

49+
50+
4951
dependencies {
50-
implementation(project(":shared"))
52+
5153
implementation(libs.playServicesMaps)
5254
implementation(libs.jetbrainsKotlinStdlib)
5355
implementation(libs.rxAndroid)
5456
implementation(libs.rxJava)
55-
testImplementation(libs.junit)
56-
testImplementation(libs.mockitoCore)
57-
testImplementation(libs.mockitoKotlin)
58-
testImplementation(libs.mockk)
5957
}

maps-rx/src/main/java/com/google/maps/android/rx/GoogleMapAnimateCameraSingle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package com.google.maps.android.rx
1616

1717
import com.google.android.gms.maps.CameraUpdate
1818
import com.google.android.gms.maps.GoogleMap
19-
import com.google.maps.android.rx.shared.MainThreadSingle
19+
import com.google.maps.android.rx.maps.internal.MainThreadSingle
2020
import io.reactivex.rxjava3.android.MainThreadDisposable
2121
import io.reactivex.rxjava3.core.Single
2222
import io.reactivex.rxjava3.core.SingleObserver

maps-rx/src/main/java/com/google/maps/android/rx/GoogleMapCameraIdleObservable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package com.google.maps.android.rx
1616

1717
import com.google.android.gms.maps.GoogleMap
18-
import com.google.maps.android.rx.shared.MainThreadObservable
18+
import com.google.maps.android.rx.maps.internal.MainThreadObservable
1919
import io.reactivex.rxjava3.android.MainThreadDisposable
2020
import io.reactivex.rxjava3.core.Observable
2121
import io.reactivex.rxjava3.core.Observer

maps-rx/src/main/java/com/google/maps/android/rx/GoogleMapCameraMoveCanceledObservable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package com.google.maps.android.rx
1616

1717
import com.google.android.gms.maps.GoogleMap
18-
import com.google.maps.android.rx.shared.MainThreadObservable
18+
import com.google.maps.android.rx.maps.internal.MainThreadObservable
1919
import io.reactivex.rxjava3.android.MainThreadDisposable
2020
import io.reactivex.rxjava3.core.Observable
2121
import io.reactivex.rxjava3.core.Observer

maps-rx/src/main/java/com/google/maps/android/rx/GoogleMapCameraMoveObservable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package com.google.maps.android.rx
1616

1717
import com.google.android.gms.maps.GoogleMap
18-
import com.google.maps.android.rx.shared.MainThreadObservable
18+
import com.google.maps.android.rx.maps.internal.MainThreadObservable
1919
import io.reactivex.rxjava3.android.MainThreadDisposable
2020
import io.reactivex.rxjava3.core.Observable
2121
import io.reactivex.rxjava3.core.Observer

0 commit comments

Comments
 (0)