Skip to content

Commit e478139

Browse files
committed
Merge branch 'develop' into main
2 parents 05a3caa + 31e9fd6 commit e478139

Some content is hidden

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

65 files changed

+4141
-627
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,6 @@ fabric.properties
153153

154154
!/gradle/wrapper/gradle-wrapper.jar
155155

156-
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,java
156+
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,java
157+
.idea/deploymentTargetDropDown.xml
158+
/.idea/androidTestResultsUserPreferences.xml

.idea/codeStyles/Project.xml

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
## [1.2.0](https://github.com/mapcode-foundation/mapcode-android-app/releases/tag/v1.2.0)
2+
3+
#### 2022-10-21
4+
5+
- [#23](https://github.com/mapcode-foundation/mapcode-android-app/issues/23) Save locations as
6+
favourites and view them on the map.
7+
- [#35](https://github.com/mapcode-foundation/mapcode-android-app/issues/35) Show a brief tutorial
8+
when the app is opened for the first time that explains what mapcodes are.
9+
110
## [1.1.1](https://github.com/mapcode-foundation/mapcode-android-app/releases/tag/v1.1.1)
211

312
#### 2022-08-21
413

5-
- [#47](https://github.com/mapcode-foundation/mapcode-android-app/issues/47) Improve address autocompletion results by
14+
- [#47](https://github.com/mapcode-foundation/mapcode-android-app/issues/47) Improve address
15+
autocompletion results by
616
using Google Places API.
7-
- [#48](https://github.com/mapcode-foundation/mapcode-android-app/issues/48) Allow comma decimal in latitude and
17+
- [#48](https://github.com/mapcode-foundation/mapcode-android-app/issues/48) Allow comma decimal in
18+
latitude and
819
longitude.
9-
- [#46](https://github.com/mapcode-foundation/mapcode-android-app/issues/46) Latitude and longitude text are invisible
20+
- [#46](https://github.com/mapcode-foundation/mapcode-android-app/issues/46) Latitude and longitude
21+
text are invisible
1022
in dark mode.
1123
- Button to clear latitude and longitude text is now a copy button.
1224

app/build.gradle

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ plugins {
44
id 'kotlin-kapt'
55
id 'dagger.hilt.android.plugin'
66
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
7+
id 'com.google.devtools.ksp'
8+
id 'org.jetbrains.kotlin.plugin.serialization'
9+
id 'kotlin-parcelize'
710
}
811

912
android {
@@ -16,7 +19,7 @@ android {
1619
//noinspection OldTargetApi wait for sources to be released before upgrading
1720
targetSdk 33
1821
versionCode 4
19-
versionName "1.1.1"
22+
versionName "1.2.0"
2023

2124
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2225
vectorDrawables {
@@ -58,6 +61,14 @@ android {
5861
excludes += '/META-INF/{AL2.0,LGPL2.1}'
5962
}
6063
}
64+
65+
applicationVariants.all { variant ->
66+
kotlin.sourceSets {
67+
getByName(variant.name) {
68+
kotlin.srcDir("build/generated/ksp/${variant.name}/kotlin")
69+
}
70+
}
71+
}
6172
}
6273

6374
dependencies {
@@ -68,29 +79,36 @@ dependencies {
6879
implementation 'com.google.maps.android:places-ktx:2.0.0'
6980
implementation "com.google.dagger:hilt-android:2.42"
7081
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
71-
implementation 'com.google.android.gms:play-services-location:20.0.0'
82+
implementation 'com.google.android.gms:play-services-location:21.0.0'
7283
kapt "com.google.dagger:hilt-compiler:2.42"
73-
implementation "com.google.android.material:material:1.6.1"
84+
implementation "com.google.android.material:material:1.7.0"
7485

7586
//android
76-
implementation 'androidx.core:core-ktx:1.8.0'
87+
implementation 'androidx.core:core-ktx:1.9.0'
7788
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
7889
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
79-
implementation 'androidx.activity:activity-compose:1.5.1'
90+
implementation 'androidx.activity:activity-compose:1.6.0'
8091
//noinspection GradleDependency
8192
implementation "androidx.compose.ui:ui:1.2.0"
8293
implementation "androidx.compose.ui:ui-tooling-preview:1.2.1"
8394
implementation 'androidx.compose.material:material:1.2.1'
84-
implementation "androidx.navigation:navigation-compose:2.5.1"
85-
implementation "androidx.compose.foundation:foundation:1.3.0-alpha03"
95+
implementation "androidx.navigation:navigation-compose:2.5.2"
96+
implementation "androidx.compose.foundation:foundation:1.3.0-rc01"
8697
implementation 'com.google.accompanist:accompanist-permissions:0.24.10-beta'
8798
implementation "com.google.accompanist:accompanist-systemuicontroller:0.17.0"
99+
implementation "com.google.accompanist:accompanist-pager:0.25.1"
100+
implementation "com.google.accompanist:accompanist-pager-indicators:0.25.1"
88101
implementation "androidx.datastore:datastore-preferences:1.0.0"
89102
implementation "androidx.core:core-splashscreen:1.0.0"
90-
implementation "androidx.compose.material3:material3-window-size-class:1.0.0-alpha16"
103+
implementation "androidx.compose.material3:material3-window-size-class:1.0.0-rc01"
104+
implementation "androidx.compose.material:material-icons-extended:1.2.1"
91105

92106
//other
93107
implementation 'com.jakewharton.timber:timber:5.0.1'
108+
implementation 'io.github.raamcosta.compose-destinations:core:1.7.22-beta'
109+
ksp 'io.github.raamcosta.compose-destinations:ksp:1.7.16-beta'
110+
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0"
111+
94112
//noinspection GradleDependency. Issue with R8 on Android 8.0 or lower
95113
implementation 'com.mapcode:mapcode:2.4.14'
96114
implementation "com.squareup.okhttp3:okhttp:4.10.0"
@@ -103,12 +121,13 @@ dependencies {
103121
testImplementation 'junit:junit:4.13.2'
104122
testImplementation 'com.willowtreeapps.assertk:assertk-jvm:0.25'
105123
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.0.0'
106-
testImplementation 'org.mockito:mockito-core:4.6.1'
107-
testImplementation 'org.mockito:mockito-inline:4.6.1'
124+
testImplementation 'org.mockito:mockito-core:4.8.0'
125+
testImplementation 'org.mockito:mockito-inline:4.7.0'
108126
testImplementation "androidx.arch.core:core-testing:2.1.0"
109-
testImplementation "androidx.test:core-ktx:1.4.0"
110-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.3'
127+
testImplementation "androidx.test:core-ktx:1.5.0-beta01"
128+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
111129

130+
androidTestImplementation "androidx.test:core-ktx:1.5.0-beta01"
112131
androidTestImplementation 'com.willowtreeapps.assertk:assertk-jvm:0.25'
113132
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
114133
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

app/proguard-rules.pro

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,43 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
# Keep `Companion` object fields of serializable classes.
23+
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
24+
-if @kotlinx.serialization.Serializable class **
25+
-keepclassmembers class <1> {
26+
static <1>$Companion Companion;
27+
}
28+
29+
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
30+
-if @kotlinx.serialization.Serializable class ** {
31+
static **$* *;
32+
}
33+
-keepclassmembers class <2>$<3> {
34+
kotlinx.serialization.KSerializer serializer(...);
35+
}
36+
37+
# Keep `INSTANCE.serializer()` of serializable objects.
38+
-if @kotlinx.serialization.Serializable class ** {
39+
public static ** INSTANCE;
40+
}
41+
-keepclassmembers class <1> {
42+
public static <1> INSTANCE;
43+
kotlinx.serialization.KSerializer serializer(...);
44+
}
45+
46+
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
47+
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
48+
49+
# Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`.
50+
# If you have any, uncomment and replace classes with those containing named companion objects.
51+
#-keepattributes InnerClasses # Needed for `getDeclaredClasses`.
52+
#-if @kotlinx.serialization.Serializable class
53+
#com.example.myapplication.HasNamedCompanion, # <-- List serializable classes with named companions.
54+
#com.example.myapplication.HasNamedCompanion2
55+
#{
56+
# static **$* *;
57+
#}
58+
#-keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
59+
# static <1>$$serializer INSTANCE;
60+
#}

app/src/androidTest/java/com/mapcode/FakePreferenceRepository.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import kotlinx.coroutines.flow.MutableStateFlow
2323
import kotlinx.coroutines.flow.map
2424

2525
class FakePreferenceRepository : PreferenceRepository {
26-
private val preferences: MutableStateFlow<Map<Preferences.Key<*>, Any?>> = MutableStateFlow(emptyMap())
26+
private val preferences: MutableStateFlow<Map<Preferences.Key<*>, Any?>> =
27+
MutableStateFlow(emptyMap())
2728

2829
@Suppress("UNCHECKED_CAST")
2930
override fun <T> get(key: Preferences.Key<T>): Flow<T?> {
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (C) 2022, Stichting Mapcode Foundation (http://www.mapcode.com)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.mapcode
18+
19+
import com.mapcode.util.DispatcherProvider
20+
import kotlinx.coroutines.ExperimentalCoroutinesApi
21+
import kotlinx.coroutines.test.TestDispatcher
22+
23+
/**
24+
* Created by sds100 on 01/05/2021.
25+
*/
26+
27+
@OptIn(ExperimentalCoroutinesApi::class)
28+
class TestDispatcherProvider(
29+
testDispatcher: TestDispatcher
30+
) : DispatcherProvider {
31+
override val main = testDispatcher
32+
override val default = testDispatcher
33+
override val io = testDispatcher
34+
override val unconfined = testDispatcher
35+
}

0 commit comments

Comments
 (0)