diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9ed40082d..355ea2b94 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,14 +15,14 @@ version: 2 updates: - package-ecosystem: gradle - directory: "/./ApiDemos/java" + directory: "/./ApiDemos/project/java-app" schedule: interval: "weekly" open-pull-requests-limit: 10 commit-message: prefix: chore(deps) - package-ecosystem: gradle - directory: "/./ApiDemos/kotlin" + directory: "/./ApiDemos/project/kotlin-app" schedule: interval: "weekly" open-pull-requests-limit: 10 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99cfb485c..05ce08458 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,8 +45,12 @@ jobs: - name: Build and check run: | cd ApiDemos - for dir in ./*/ ; do ( cd "$dir" && ./gradlew buildDebugPreBundle ); done - + for dir in ./*/ ; do + if [[ "$dir" != "./resources/" ]]; then + ( cd "$dir" && ./gradlew buildDebugPreBundle ) + fi + done + build-WearOS: runs-on: ubuntu-latest timeout-minutes: 45 @@ -79,7 +83,7 @@ jobs: - name: Build and check run: | cd snippets - ./gradlew assembleDebug lintGmsDebug + ./gradlew assembleDebug lintDebug build-tutorials: runs-on: ubuntu-latest diff --git a/.github/workflows/objective-c-xcode.yml b/.github/workflows/objective-c-xcode.yml new file mode 100644 index 000000000..3af35a421 --- /dev/null +++ b/.github/workflows/objective-c-xcode.yml @@ -0,0 +1,30 @@ +name: Xcode - Build and Analyze + +on: + push: + branches: [ "high" ] + pull_request: + branches: [ "high" ] + +jobs: + build: + name: Build and analyse default scheme using xcodebuild command + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'default' }} + run: | + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild clean build analyze -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5cc46903..b57d8bd6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,14 +35,13 @@ jobs: - name: Build APKs run: | echo "Generating ApiDemos (Java) APKs" - cd $GITHUB_WORKSPACE/ApiDemos/java + cd $GITHUB_WORKSPACE/ApiDemos/project/ ./gradlew assemble - cp ./app/build/outputs/apk/gms/debug/app-gms-debug.apk $GITHUB_WORKSPACE/ApiDemos-java-gms-debug.apk + cp ./java-app/build/outputs/apk/debug/java-app-debug.apk $GITHUB_WORKSPACE/ApiDemos-java-debug.apk echo "Generating Kotlin (Kotlin) APKs" - cd $GITHUB_WORKSPACE/ApiDemos/kotlin ./gradlew assemble - cp ./app/build/outputs/apk/gms/debug/app-gms-debug.apk $GITHUB_WORKSPACE/ApiDemos-kotlin-gms-debug.apk + cp ./kotlin-app/build/outputs/apk/debug/kotlin-app-debug.apk $GITHUB_WORKSPACE/ApiDemos-kotlin-debug.apk - uses: actions/setup-node@v2 with: diff --git a/.releaserc b/.releaserc index 990a90c4c..e0b93f731 100644 --- a/.releaserc +++ b/.releaserc @@ -6,19 +6,17 @@ plugins: - - "@google/semantic-release-replace-plugin" - replacements: - files: - - "./ApiDemos/java/app/build.gradle.kts" - - "./ApiDemos/kotlin/app/build.gradle.kts" + - "./ApiDemos/project/java-app/build.gradle.kts" + - "./ApiDemos/project/kotlin-app/build.gradle.kts" from: "versionName = \".*\"" to: "versionName = \"${nextRelease.version}\"" - - "@semantic-release/git" - assets: - - "./ApiDemos/java/app/build.gradle.kts" - - "./ApiDemos/kotlin/app/build.gradle.kts" + - "./ApiDemos/project/java-app/build.gradle.kts" + - "./ApiDemos/project/kotlin-app/build.gradle.kts" - - "@semantic-release/github" - assets: - - "./ApiDemos-java-gms-debug.apk" - - "./ApiDemos-java-v3-debug.apk" - - "./ApiDemos-kotlin-gms-debug.apk" - - "./ApiDemos-kotlin-v3-debug.apk" + - "./ApiDemos-java-debug.apk" + - "./ApiDemos-kotlin-debug.apk" options: debug: true diff --git a/ApiDemos/java/app/src/main/java/com/example/mapdemo/DemoDetailsList.java b/ApiDemos/java/app/src/main/java/com/example/mapdemo/DemoDetailsList.java deleted file mode 100755 index d35f75283..000000000 --- a/ApiDemos/java/app/src/main/java/com/example/mapdemo/DemoDetailsList.java +++ /dev/null @@ -1,156 +0,0 @@ -// 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. - - -package com.example.mapdemo; - -/** - * A list of all the demos we have available. - */ -public final class DemoDetailsList { - - /** - * This class should not be instantiated. - */ - private DemoDetailsList() { - } - - public static final DemoDetails[] DEMOS = { - new DemoDetails(R.string.advanced_markers_demo_label, - R.string.advanced_markers_demo_details, - AdvancedMarkersDemoActivity.class), - new DemoDetails(R.string.basic_map_demo_label, - R.string.basic_map_demo_description, - BasicMapDemoActivity.class), - new DemoDetails( - R.string.background_color_customization_demo_label, - R.string.background_color_customization_demo_description, - BackgroundColorCustomizationDemoActivity.class), - new DemoDetails( - R.string.background_color_customization_programmatic_demo_label, - R.string.background_color_customization_programmatic_demo_description, - BackgroundColorCustomizationProgrammaticDemoActivity.class), - new DemoDetails(R.string.camera_demo_label, - R.string.camera_demo_description, - CameraDemoActivity.class), - new DemoDetails(R.string.camera_clamping_demo_label, - R.string.camera_clamping_demo_description, - CameraClampingDemoActivity.class), - new DemoDetails(R.string.cloud_styling_label, - R.string.cloud_styling_description, - CloudBasedMapStylingDemoActivity.class), - new DemoDetails(R.string.circle_demo_label, - R.string.circle_demo_description, - CircleDemoActivity.class), - new DemoDetails(R.string.events_demo_label, - R.string.events_demo_description, - EventsDemoActivity.class), - new DemoDetails(R.string.ground_overlay_demo_label, - R.string.ground_overlay_demo_description, - GroundOverlayDemoActivity.class), - new DemoDetails(R.string.indoor_demo_label, - R.string.indoor_demo_description, - IndoorDemoActivity.class), - new DemoDetails(R.string.layers_demo_label, - R.string.layers_demo_description, - LayersDemoActivity.class), - new DemoDetails(R.string.lite_demo_label, - R.string.lite_demo_description, - LiteDemoActivity.class), - new DemoDetails(R.string.lite_list_demo_label, - R.string.lite_list_demo_description, - LiteListDemoActivity.class), - new DemoDetails(R.string.location_source_demo_label, - R.string.location_source_demo_description, - LocationSourceDemoActivity.class), - new DemoDetails(R.string.map_in_pager_demo_label, - R.string.map_in_pager_demo_description, - MapInPagerDemoActivity.class), - new DemoDetails(R.string.map_color_scheme_demo_label, - R.string.map_color_scheme_demo_description, - MapColorSchemeActivity.class), - new DemoDetails(R.string.marker_demo_label, - R.string.marker_demo_description, - MarkerDemoActivity.class), - new DemoDetails(R.string.marker_close_info_window_on_retap_demo_label, - R.string.marker_close_info_window_on_retap_demo_description, - MarkerCloseInfoWindowOnRetapDemoActivity.class), - new DemoDetails(R.string.multi_map_demo_label, - R.string.multi_map_demo_description, - MultiMapDemoActivity.class), - new DemoDetails(R.string.my_location_demo_label, - R.string.my_location_demo_description, - MyLocationDemoActivity.class), - new DemoDetails(R.string.options_demo_label, - R.string.options_demo_description, - OptionsDemoActivity.class), - new DemoDetails(R.string.polygon_demo_label, - R.string.polygon_demo_description, - PolygonDemoActivity.class), - new DemoDetails(R.string.polyline_demo_label, - R.string.polyline_demo_description, - PolylineDemoActivity.class), - new DemoDetails(R.string.programmatic_demo_label, - R.string.programmatic_demo_description, - ProgrammaticDemoActivity.class), - new DemoDetails(R.string.raw_map_view_demo_label, - R.string.raw_map_view_demo_description, - RawMapViewDemoActivity.class), - new DemoDetails(R.string.retain_map_demo_label, - R.string.retain_map_demo_description, - RetainMapDemoActivity.class), - new DemoDetails(R.string.save_state_demo_label, - R.string.save_state_demo_description, - SaveStateDemoActivity.class), - new DemoDetails(R.string.snapshot_demo_label, - R.string.snapshot_demo_description, - SnapshotDemoActivity.class), - new DemoDetails(R.string.split_street_view_panorama_and_map_demo_label, - R.string.split_street_view_panorama_and_map_demo_description, - SplitStreetViewPanoramaAndMapDemoActivity.class), - new DemoDetails(R.string.street_view_panorama_basic_demo_label, - R.string.street_view_panorama_basic_demo_description, - StreetViewPanoramaBasicDemoActivity.class), - new DemoDetails(R.string.street_view_panorama_events_demo_label, - R.string.street_view_panorama_events_demo_description, - StreetViewPanoramaEventsDemoActivity.class), - new DemoDetails(R.string.street_view_panorama_navigation_demo_label, - R.string.street_view_panorama_navigation_demo_description, - StreetViewPanoramaNavigationDemoActivity.class), - new DemoDetails(R.string.street_view_panorama_options_demo_label, - R.string.street_view_panorama_options_demo_description, - StreetViewPanoramaOptionsDemoActivity.class), - new DemoDetails(R.string.street_view_panorama_view_demo_label, - R.string.street_view_panorama_view_demo_description, - StreetViewPanoramaViewDemoActivity.class), - new DemoDetails(R.string.styled_map_demo_label, - R.string.styled_map_demo_description, - StyledMapDemoActivity.class), - new DemoDetails(R.string.tags_demo_label, - R.string.tags_demo_description, - TagsDemoActivity.class), - new DemoDetails(R.string.tile_coordinate_demo_label, - R.string.tile_coordinate_demo_description, - TileCoordinateDemoActivity.class), - new DemoDetails(R.string.tile_overlay_demo_label, - R.string.tile_overlay_demo_description, - TileOverlayDemoActivity.class), - new DemoDetails(R.string.ui_settings_demo_label, - R.string.ui_settings_demo_description, - UiSettingsDemoActivity.class), - new DemoDetails(R.string.visible_region_demo_label, - R.string.visible_region_demo_description, - VisibleRegionDemoActivity.class), - }; -} diff --git a/ApiDemos/java/app/src/main/res/layout/advanced_markers_demo.xml b/ApiDemos/java/app/src/main/res/layout/advanced_markers_demo.xml deleted file mode 100644 index 1688013a7..000000000 --- a/ApiDemos/java/app/src/main/res/layout/advanced_markers_demo.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ApiDemos/java/app/src/main/res/layout/background_color_customization_demo.xml b/ApiDemos/java/app/src/main/res/layout/background_color_customization_demo.xml deleted file mode 100644 index 82c0d70fc..000000000 --- a/ApiDemos/java/app/src/main/res/layout/background_color_customization_demo.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ApiDemos/java/app/src/main/res/layout/background_color_customization_programmatic_demo.xml b/ApiDemos/java/app/src/main/res/layout/background_color_customization_programmatic_demo.xml deleted file mode 100644 index 172f7a79f..000000000 --- a/ApiDemos/java/app/src/main/res/layout/background_color_customization_programmatic_demo.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ApiDemos/java/app/src/main/res/layout/circle_demo.xml b/ApiDemos/java/app/src/main/res/layout/circle_demo.xml deleted file mode 100755 index 947e7a7e2..000000000 --- a/ApiDemos/java/app/src/main/res/layout/circle_demo.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ApiDemos/java/app/src/main/res/layout/cloud_styling_basic_demo.xml b/ApiDemos/java/app/src/main/res/layout/cloud_styling_basic_demo.xml deleted file mode 100644 index e02d5fc11..000000000 --- a/ApiDemos/java/app/src/main/res/layout/cloud_styling_basic_demo.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -