Skip to content

Commit 8371913

Browse files
committed
chore: Add V3 3.1.0-beta samples
1 parent 2f8b789 commit 8371913

File tree

70 files changed

+5072
-20
lines changed

Some content is hidden

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

70 files changed

+5072
-20
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
java-version: 1.8
4141

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

4545
- name: Upload build reports
4646
if: always()
@@ -61,7 +61,7 @@ jobs:
6161
java-version: 1.8
6262

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

6666
- name: Upload build reports
6767
if: always()

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ build/
44
*.iml
55
local.properties
66
.DS_Store
7-
libs/

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ Google Places SDK for Android Demos
55

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

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

11-
Note that each folder contains a distinct sample and must be imported separately.
11+
Note that each folder contains a distinct sample and must be imported separately. Each project also contains two Gradle product flavors:
12+
13+
1. `gms`: Product flavor for samples using the Places SDK that uses Maps SDK for Android
14+
2. `v3`: Product flavor for samples using the Places SDK that uses Maps SDK V3 BETA for Android
1215

1316
Getting Started
1417
---------------
1518

1619
These demos use the Gradle build system.
1720

18-
First download the demos by cloning this repository or downloading an archived
19-
snapshot. (See the options on the right hand side.)
21+
First download the demos by cloning this repository or downloading an archived snapshot. (See the options on the right hand side.)
2022

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

V3_FILE_HEADER

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* DO NOT EDIT THIS FILE.
3+
*
4+
* This source code was autogenerated from source code within the `app/src/gms` directory
5+
* and is not intended for modifications. If any edits should be made, please do so in the
6+
* corresponding file under the `app/src/gms` directory.
7+
*/

demo-java/app/build.gradle

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.apache.tools.ant.filters.ConcatFilter
2+
13
apply plugin: 'com.android.application'
24

35
android {
@@ -20,10 +22,49 @@ android {
2022
sourceCompatibility JavaVersion.VERSION_1_8
2123
targetCompatibility JavaVersion.VERSION_1_8
2224
}
25+
flavorDimensions "version"
26+
productFlavors {
27+
gms {
28+
dimension "version"
29+
applicationIdSuffix ".gms"
30+
versionNameSuffix "-gms"
31+
}
32+
v3 {
33+
dimension "version"
34+
applicationIdSuffix ".v3"
35+
versionNameSuffix "-v3"
36+
}
37+
}
38+
}
39+
40+
task generateV3(type: Copy) {
41+
group "V3 Beta"
42+
description "Copies source code from GMS to V3 BETA."
43+
44+
from 'src/gms/java'
45+
into 'src/v3/java'
46+
filter { line ->
47+
line.replace('com.google.android.gms.maps', 'com.google.android.libraries.maps')
48+
}
49+
filter(ConcatFilter, prepend: file('../../V3_FILE_HEADER'))
2350
}
2451

2552
dependencies {
2653
implementation 'androidx.appcompat:appcompat:1.1.0'
2754
implementation 'com.google.android.material:material:1.1.0'
28-
implementation 'com.google.android.libraries.places:places:2.3.0'
55+
56+
// GMS
57+
gmsImplementation 'com.google.android.libraries.places:places:2.3.0'
58+
59+
// V3
60+
v3Implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
61+
v3Implementation 'com.android.volley:volley:1.1.1'
62+
v3Implementation 'com.google.android.gms:play-services-base:17.3.0'
63+
v3Implementation 'com.google.android.gms:play-services-basement:17.3.0'
64+
v3Implementation 'com.google.android.gms:play-services-gcm:17.0.0'
65+
v3Implementation 'com.google.android.gms:play-services-location:17.0.0'
66+
v3Implementation 'com.google.android.gms:play-services-tasks:17.1.0'
67+
v3Implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
68+
v3Implementation 'com.google.auto.value:auto-value-annotations:1.6.2'
69+
v3Implementation 'com.google.code.gson:gson:2.8.5'
2970
}
607 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)