Angela Yu f777167272
chore: set up new snippets modules for region tags (#1368)
* chore: move MapsCompose.kt to snippets/app-compose app

* chore: create app-places-ktx snippets module with places-ktx install snippet

* chore: create app-maps-rx snippets module

* chore: create app-ktx snippets module

* chore: add app-utils-ktx snippets module

* chore: rename app-maps-rx to app-rx

* chore: add app-utils snippets module

* chore: move region tag from tutorials to snippets for play services sdk dependency

* chore: move kotlin utils to app-utils-ktx module

* chore: move utils and utils-ktx snippets into corresponding modules

* chore: finalize maps sdk snippets

* chore: upgrade AGP and add namespaces

* chore: fix build issues

* chore: udpate build workflow to Java 17

* chore: fix build errors

* chore: remove v3 files

* Revert "chore: remove v3 files"

This reverts commit f70c47bd0cbd5ed73dfd43199371dcfc6afd6350.

* chore: add default PLACES_API_KEY to Current Place tutorial

* chore: fix tutorial builds
2023-10-31 09:33:26 -07:00

128 lines
3.0 KiB
YAML

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build demos
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
repository_dispatch:
types: [ build ]
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-ApiDemos:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- name: set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Uninstall NDK
run: |
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
- name: Build and check
run: |
cd ApiDemos
for dir in ./*/ ; do ( cd "$dir" && ./gradlew buildGmsDebugPreBundle ); done
build-WearOS:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- name: set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build and check
run: cd WearOS && ./gradlew build
build-Snippets:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- name: set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Uninstall NDK
run: |
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
- name: Build and check
run: |
cd snippets
./gradlew assembleGmsDebug lintGmsDebug
build-tutorials:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- name: set up Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build and check
run: |
cd tutorials
for dir in ./*/
do
cd "$dir"
for tutorial in ./*/
do
cd "$tutorial" && ./gradlew buildDebug
cd ..
done
cd ..
done
test: # used as required status check
runs-on: ubuntu-latest
needs:
- build-ApiDemos
- build-WearOS
- build-Snippets
- build-tutorials
steps:
- run: echo "Fail if all other steps are not successful"