Skip to content

Commit

Permalink
feat: linting fixed, upgraded dokka
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Nov 5, 2023
1 parent 6ed6dee commit 421a1ef
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
# Run dokka and create tar
- name: Generate documentation
run: |
./gradlew dokka
./gradlew dokkaHtml
echo "Creating tar for generated docs"
cd $GITHUB_WORKSPACE/places-ktx/build/documentation && tar cvf ~/places-ktx-docs.tar .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,9 +63,9 @@ class DemoActivity : AppCompatActivity() {

private class DemoItemView(context: Context) : LinearLayout(context) {

val title: TextView by lazy { findViewById<TextView>(R.id.textViewTitle) }
val title: TextView by lazy { findViewById(R.id.textViewTitle) }

val description: TextView by lazy { findViewById<TextView>(R.id.textViewDescription) }
val description: TextView by lazy { findViewById(R.id.textViewDescription) }

init {
LayoutInflater.from(context)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@ import com.google.android.libraries.places.api.model.AutocompletePrediction

sealed class PlacesSearchEvent

object PlacesSearchEventLoading : PlacesSearchEvent()
data object PlacesSearchEventLoading : PlacesSearchEvent()

data class PlacesSearchEventError(
val exception: Throwable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.5.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.9.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.48"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ internal class FetchPhotoRequestTest {
val photoMetadata = photoMetadata("reference")
val cancellationToken = CancellationTokenSource().token
val request = fetchPhotoRequest(photoMetadata) {
setMaxHeight(100)
setMaxWidth(100)
maxHeight = 100
maxWidth = 100
setCancellationToken(cancellationToken)
}
assertEquals(photoMetadata, request.photoMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ internal class FindAutocompletePredictionsRequestTest {
val request = findAutocompletePredictionsRequest {
setCancellationToken(cancellationToken)
setCountries("USA")
setLocationBias(RectangularBounds.newInstance(LatLng(1.0,1.0), LatLng(2.0, 2.0)))
setTypesFilter(listOf(PlaceTypes.ESTABLISHMENT))
setQuery("query")
locationBias = RectangularBounds.newInstance(LatLng(1.0,1.0), LatLng(2.0, 2.0))
typesFilter = listOf(PlaceTypes.ESTABLISHMENT)
query = "query"
}
assertEquals(cancellationToken, request.cancellationToken)
assertEquals(listOf("USA"), request.countries)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal class AddressComponentTest {
"Main Street",
listOf("street_address")
) {
setShortName("Main St.")
shortName = "Main St."
}
assertEquals("Main Street", component.name)
assertEquals("Main St.", component.shortName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class AutocompletePredictionTest {
@Test
fun testBuilder() {
val prediction = autocompletePrediction("placeId") {
setPlaceTypes(listOf(Place.Type.AQUARIUM))
placeTypes = listOf(Place.Type.AQUARIUM)
}
val res = prediction.getPrimaryText(null)
assertEquals("placeId", prediction.placeId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ internal class OpeningHoursTest {
fun testBuilder() {

val openingHours = openingHours {
setPeriods(listOf(
periods = listOf(
period {
setClose(TimeOfWeek.newInstance(
close = TimeOfWeek.newInstance(
DayOfWeek.MONDAY,
LocalTime.newInstance(0, 0)
))
)
}
))
setWeekdayText(listOf("Monday"))
)
weekdayText = listOf("Monday")
}

assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ internal class PeriodTest {
@Test
fun testBuilder() {
val period = period {
setClose(TimeOfWeek.newInstance(
close = TimeOfWeek.newInstance(
DayOfWeek.MONDAY,
LocalTime.newInstance(0, 0)
))
setOpen(TimeOfWeek.newInstance(
)
open = TimeOfWeek.newInstance(
DayOfWeek.TUESDAY,
LocalTime.newInstance(0, 0)
))
)
}
assertEquals(
TimeOfWeek.newInstance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ internal class PhotoMetadataTest {
@Test
fun testBuilderWithActions() {
val photoMetadata = photoMetadata("reference") {
setAttributions("attributions")
setWidth(100)
setHeight(100)
attributions = "attributions"
width = 100
height = 100
}
assertEquals("attributions", photoMetadata.attributions)
assertEquals(100, photoMetadata.height)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ internal class PlaceTest {
@Test
fun testBuilder() {
val place = place {
setAddress("address")
setAddressComponents(AddressComponents.newInstance(
address = "address"
addressComponents = AddressComponents.newInstance(
listOf(
addressComponent("Main Street", listOf("street_address")) {
setShortName("Main St.")
shortName = "Main St."
}
)
))
)
}
assertEquals("address", place.address)
assertEquals(AddressComponents.newInstance(
listOf(
addressComponent("Main Street", listOf("street_address")) {
setShortName("Main St.")
shortName = "Main St."
}
)
), place.addressComponents)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ internal class PlusCodeTest {
@Test
fun testBuilder() {
val plusCode = plusCode {
setCompoundCode("ABC")
setGlobalCode("DEF")
compoundCode = "ABC"
globalCode = "DEF"
}
assertEquals("ABC", plusCode.compoundCode)
assertEquals("DEF", plusCode.globalCode)
Expand Down

0 comments on commit 421a1ef

Please sign in to comment.