Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ on:
jobs:
test:
runs-on: ubuntu-latest

permissions:
pull-requests: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'temurin'

- name: Build modules
run: ./gradlew build jacocoTestReport --stacktrace
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

// Hilt
implementation libs.hilt.android
kapt "com.google.dagger:hilt-android-compiler:2.56"
kapt "com.google.dagger:hilt-android-compiler:2.57"

implementation project(':places-ktx')
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"
tools:node="remove" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".DemoApplication"
Expand All @@ -50,4 +51,4 @@
android:name=".PlacesSearchDemoActivity"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" />
</application>
</manifest>
</manifest>
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ buildscript {
}

plugins {
id "org.jetbrains.dokka" version "1.9.10"
id "org.jetbrains.dokka" version "2.0.0"
id "com.vanniktech.maven.publish" version "0.34.0" apply false
}



ext.projectArtifactId = { project ->
if (project.name == 'places-ktx') {
return project.name
Expand Down
36 changes: 18 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[versions]
androidCompileSdk = "34"
androidMinSdk = "23"
androidTargetSdk = "34"
androidMinSdk = "23"

appcompat = "1.7.0"
appcompat = "1.7.1"
coreKtx = "1.13.1"
dokkaGradlePlugin = "1.9.20"
fragmentKtx = "1.8.3"
gradle = "8.6.1"
hiltAndroid = "2.51.1"
dokkaGradlePlugin = "2.0.0"
fragmentKtx = "1.8.9"
gradle = "8.12.0"
hiltAndroid = "2.57"
jacocoAndroid = "0.2.1"
kotlin = "2.0.0"
kotlinGradlePlugin = "1.9.24"
kotlinx-coroutines-core = "1.8.1"
lifecycle-viewmodel-ktx = "2.8.6"
kotlin = "2.2.0"
kotlinGradlePlugin = "2.2.0"
kotlinx-coroutines-core = "1.10.2"
lifecycle-viewmodel-ktx = "2.9.2"
material = "1.12.0"
playServicesMaps = "19.0.0"
playServicesMaps = "19.2.0"
secretsGradlePlugin = "2.0.1"
truth = "1.4.2"
truth = "1.4.4"
volley = "1.2.1"
multidex = "2.0.1"
kotlinx-coroutines-play-services = "1.8.1"
places = "4.0.0"
junit-ext = "1.2.1"
test-core = "1.6.1"
kotlinx-coroutines-play-services = "1.10.2"
places = "4.4.1"
junit-ext = "1.3.0"
test-core = "1.7.0"
mockito-kotlin = "2.2.0"
junit = "4.13.2"
mockito-core = "5.11.0"
mockito-core = "5.18.0"

Check warning

Code scanning / Android Lint

Newer Library Versions Available Warning

A newer version of org.mockito:mockito-core than 5.18.0 is available: 5.19.0
gradleMavenPublishPlugin = "0.34.0"

[libraries]
Expand Down Expand Up @@ -64,4 +64,4 @@ mavenPublish = { id = "maven-publish" }
dokka = { id = "org.jetbrains.dokka" }
jacocoAndroid = { id = "com.mxalbert.gradle.jacoco-android" }
signing = { id = "signing" }
vanniktech = { id = "com.vanniktech.maven.publish" }
vanniktech = { id = "com.vanniktech.maven.publish" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ internal class FetchPlaceRequestTest {
fun testBuilderNoActions() {
val request = fetchPlaceRequest(
"placeId",
listOf(Place.Field.NAME)
listOf(Place.Field.DISPLAY_NAME)
)
assertEquals("placeId", request.placeId)
assertEquals(listOf(Place.Field.NAME), request.placeFields)
assertEquals(listOf(Place.Field.DISPLAY_NAME), request.placeFields)
}

@Test
Expand All @@ -38,13 +38,13 @@ internal class FetchPlaceRequestTest {
val sessionToken = AutocompleteSessionToken.newInstance()
val request = fetchPlaceRequest(
"placeId",
listOf(Place.Field.NAME)
listOf(Place.Field.DISPLAY_NAME)
) {
setCancellationToken(cancellationToken)
setSessionToken(sessionToken)
}
assertEquals("placeId", request.placeId)
assertEquals(listOf(Place.Field.NAME), request.placeFields)
assertEquals(listOf(Place.Field.DISPLAY_NAME), request.placeFields)
assertEquals(cancellationToken, request.cancellationToken)
assertEquals(sessionToken, request.sessionToken)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ internal class FindCurrentPlaceRequestTest {

@Test
fun testBuilderNoActions() {
val request = findCurrentPlaceRequest(listOf(Place.Field.NAME))
assertEquals(listOf(Place.Field.NAME), request.placeFields)
val request = findCurrentPlaceRequest(listOf(Place.Field.DISPLAY_NAME))
assertEquals(listOf(Place.Field.DISPLAY_NAME), request.placeFields)
}

@Test
fun testBuilderWithActions() {
val cancellationToken = CancellationTokenSource().token
val request = findCurrentPlaceRequest(listOf(Place.Field.NAME)) {
val request = findCurrentPlaceRequest(listOf(Place.Field.DISPLAY_NAME)) {
setCancellationToken(cancellationToken)
}
assertEquals(listOf(Place.Field.NAME), request.placeFields)
assertEquals(listOf(Place.Field.DISPLAY_NAME), request.placeFields)
assertEquals(cancellationToken, request.cancellationToken)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ internal class SearchByTextRequestTest {
fun testBuilderNoActions() {
val request = searchByTextRequest(
textQuery = "test query",
placeFields = listOf(Place.Field.NAME)
placeFields = listOf(Place.Field.DISPLAY_NAME)
)

assertThat(request.textQuery).isEqualTo("test query")
assertThat(request.placeFields).containsExactly(Place.Field.NAME)
assertThat(request.placeFields).containsExactly(Place.Field.DISPLAY_NAME)
}

@Test
Expand All @@ -44,7 +44,7 @@ internal class SearchByTextRequestTest {

val request = searchByTextRequest(
textQuery = "test query",
placeFields = listOf(Place.Field.NAME, Place.Field.ADDRESS),
placeFields = listOf(Place.Field.DISPLAY_NAME, Place.Field.ADDRESS),
) {
setCancellationToken(cancellationToken)
includedType = "national_park"
Expand Down