Skip to content

Commit

Permalink
chore: Add V3 3.1.0-beta samples
Browse files Browse the repository at this point in the history
  • Loading branch information
arriolac committed Jun 15, 2020
1 parent 2f8b789 commit 8371913
Show file tree
Hide file tree
Showing 70 changed files with 5,072 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
java-version: 1.8

- name: Build and check
run: cd demo-java && ./gradlew assembleDebug lintDebug
run: cd demo-java && ./gradlew assemble lint

- name: Upload build reports
if: always()
Expand All @@ -61,7 +61,7 @@ jobs:
java-version: 1.8

- name: Build and check
run: cd demo-kotlin && ./gradlew assembleDebug lintDebug
run: cd demo-kotlin && ./gradlew assemble lint

- name: Upload build reports
if: always()
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ build/
*.iml
local.properties
.DS_Store
libs/
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ Google Places SDK for Android Demos

This repo contains the following apps that demonstrate use of the [Google Places SDK for Android](https://developers.google.com/places/android-sdk/):

1. [demo-kotlin](demo-kotlin) Kotlin demo app for the static Places SDK.
2. [demo-java](demo-java) Java demo app for the static Places SDK.
1. [demo-kotlin](demo-kotlin) Kotlin demo app for the Places SDK.
2. [demo-java](demo-java) Java demo app for the Places SDK.

Note that each folder contains a distinct sample and must be imported separately.
Note that each folder contains a distinct sample and must be imported separately. Each project also contains two Gradle product flavors:

1. `gms`: Product flavor for samples using the Places SDK that uses Maps SDK for Android
2. `v3`: Product flavor for samples using the Places SDK that uses Maps SDK V3 BETA for Android

Getting Started
---------------

These demos use the Gradle build system.

First download the demos by cloning this repository or downloading an archived
snapshot. (See the options on the right hand side.)
First download the demos by cloning this repository or downloading an archived snapshot. (See the options on the right hand side.)

In Android Studio, use the "Open an existing Android Studio project", and select one of the demo directories (`demo-kotlin` or `demo-java`).

Expand Down
7 changes: 7 additions & 0 deletions V3_FILE_HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* DO NOT EDIT THIS FILE.
*
* This source code was autogenerated from source code within the `app/src/gms` directory
* and is not intended for modifications. If any edits should be made, please do so in the
* corresponding file under the `app/src/gms` directory.
*/
43 changes: 42 additions & 1 deletion demo-java/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.apache.tools.ant.filters.ConcatFilter

apply plugin: 'com.android.application'

android {
Expand All @@ -20,10 +22,49 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions "version"
productFlavors {
gms {
dimension "version"
applicationIdSuffix ".gms"
versionNameSuffix "-gms"
}
v3 {
dimension "version"
applicationIdSuffix ".v3"
versionNameSuffix "-v3"
}
}
}

task generateV3(type: Copy) {
group "V3 Beta"
description "Copies source code from GMS to V3 BETA."

from 'src/gms/java'
into 'src/v3/java'
filter { line ->
line.replace('com.google.android.gms.maps', 'com.google.android.libraries.maps')
}
filter(ConcatFilter, prepend: file('../../V3_FILE_HEADER'))
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android.libraries.places:places:2.3.0'

// GMS
gmsImplementation 'com.google.android.libraries.places:places:2.3.0'

// V3
v3Implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
v3Implementation 'com.android.volley:volley:1.1.1'
v3Implementation 'com.google.android.gms:play-services-base:17.3.0'
v3Implementation 'com.google.android.gms:play-services-basement:17.3.0'
v3Implementation 'com.google.android.gms:play-services-gcm:17.0.0'
v3Implementation 'com.google.android.gms:play-services-location:17.0.0'
v3Implementation 'com.google.android.gms:play-services-tasks:17.1.0'
v3Implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
v3Implementation 'com.google.auto.value:auto-value-annotations:1.6.2'
v3Implementation 'com.google.code.gson:gson:2.8.5'
}
Binary file not shown.
Loading

0 comments on commit 8371913

Please sign in to comment.