Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target 34 #1166

Merged
merged 96 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
15c4f18
Create skeleton of compose migration for device authorization sample.
JohnZoellerG May 3, 2024
1b9a772
Migrate to Jetpack Navigation.
JohnZoellerG May 6, 2024
71ae8c4
Merge branch 'android:main' into main
JohnZoellerG May 6, 2024
365c75b
Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.0…
renovate[bot] May 21, 2024
4bee2bd
Update all dependencies (#1101)
renovate[bot] May 21, 2024
1cf6985
Uses media Toolkit, use Compose progress indicator
kul3r4 May 14, 2024
66db0dd
Merge branch 'android:main' into main
JohnZoellerG May 23, 2024
de06513
Use Compose state control instead of views.
JohnZoellerG May 23, 2024
f7e4d6c
Clean up code and remove old views implementation.
JohnZoellerG May 23, 2024
9d77d60
Update all dependencies (#1107)
renovate[bot] May 24, 2024
6f5d2ed
Use Horologist components instead of Material components.
JohnZoellerG May 24, 2024
3e77854
Merge branch 'android:main' into main
JohnZoellerG May 24, 2024
004bb18
Merge pull request #1106 from JohnZoellerG/main
JohnZoellerG May 24, 2024
a96225b
Update all dependencies (#1108)
renovate[bot] May 27, 2024
af89f1a
Improvements to the Wear part for basic quality, remove mentioning no…
kul3r4 May 23, 2024
4cc99c7
Merge pull request #1105 from kul3r4/datalayer-improve
kul3r4 May 28, 2024
1793aa8
Update renovate.json
yschimke May 28, 2024
9f4bfd7
Update dependency io.github.takahirom.roborazzi:roborazzi-junit-rule …
renovate[bot] May 29, 2024
4aba25f
Update all dependencies (#1112)
renovate[bot] May 30, 2024
d82b5ee
Update README.md to specify Wear 5 requirements
yschimke May 30, 2024
9f1c156
Migrate OAuth PKCE sample to compose"
JohnZoellerG May 30, 2024
43096de
Merge branch 'android:main' into main
JohnZoellerG May 30, 2024
e7dca1b
Clean up device grant compose sample. Address reviewer comments
JohnZoellerG May 31, 2024
f6ea54e
Merge pull request #1114 from JohnZoellerG/main
JohnZoellerG May 31, 2024
e7ed38f
Update dependency gradle 8.7 to v8.8 (#1115)
renovate[bot] Jun 3, 2024
66fd43b
Demonstrate a larger screen layout (#1118)
yschimke Jun 6, 2024
d0321b2
Update sample with more documentation and remove Toasts
kul3r4 Jun 5, 2024
acaee14
Merge pull request #1116 from kul3r4/datalayer-version2
kul3r4 Jun 10, 2024
0ff95a4
Fix wearable image
kul3r4 Jun 10, 2024
5ff4c14
Merge pull request #1120 from kul3r4/datalayer-version2
kul3r4 Jun 10, 2024
89da3b0
Adds screenshot testing for WearSpeaker Sample
kul3r4 Jun 11, 2024
d047814
Update all dependencies (#1121)
renovate[bot] Jun 12, 2024
6558652
Adds screenshot tests for DataLayer
kul3r4 Jun 11, 2024
9cebb70
Merge pull request #1122 from kul3r4/screenshottesting
kul3r4 Jun 12, 2024
4be2fea
Adds link to CI guidance.
garanj Jun 12, 2024
5814e65
Merge pull request #1123 from android/ci-doc-update
garanj Jun 12, 2024
b3f7117
Adds preview to OAuth device grant
kul3r4 Jun 12, 2024
d30e10c
Merge pull request #1124 from kul3r4/screenshottesting
kul3r4 Jun 13, 2024
38bfc09
Update all dependencies (#1125)
renovate[bot] Jun 14, 2024
8ec24f1
Adds Screenshot tests
kul3r4 Jun 13, 2024
be6cec7
Merge branch 'main' into screenshottesting
kul3r4 Jun 14, 2024
4dcb63c
Merge pull request #1127 from kul3r4/screenshottesting
kul3r4 Jun 14, 2024
547ea6c
Update all dependencies (#1128)
renovate[bot] Jun 14, 2024
e64b09e
Adds screenshot test to PKCE
kul3r4 Jun 14, 2024
02010fc
Merge pull request #1129 from kul3r4/screenshottesting
kul3r4 Jun 14, 2024
0573893
Adds additional weather conditions
garanj Jun 18, 2024
f09d73e
Adds default case
garanj Jun 19, 2024
f77e4e6
Merge pull request #1131 from android/weather-updates
garanj Jun 19, 2024
fc293cf
* use bitmap fonts for weather icons instead of multiple conditions
amoledwatchfaces Jun 19, 2024
7a0774f
Update watchface.xml
amoledwatchfaces Jun 19, 2024
e3b7ba0
Update all dependencies (#1133)
renovate[bot] Jun 25, 2024
9560b3a
Update all dependencies (#1135)
renovate[bot] Jun 27, 2024
ef19699
Update all dependencies 2.8.2 to v2.8.3 (#1139)
renovate[bot] Jul 2, 2024
7986133
Update all dependencies 1.20.0 to v1.21.0 (#1141)
renovate[bot] Jul 3, 2024
3abb39c
Revert "Adds additional weather conditions"
garanj Jul 3, 2024
4278832
Merge pull request #1142 from android/revert-1131-weather-updates
garanj Jul 3, 2024
b99580a
Add default icon for unknown conditions
lucianbc Jul 5, 2024
7b060a4
Merge pull request #1143 from android/unknown-icon
garanj Jul 5, 2024
9310567
* removed condition icons for conditions > 15 as per #3abb39c
amoledwatchfaces Jul 6, 2024
059ced6
* added check in case condition value is out of expected range
amoledwatchfaces Jul 6, 2024
f3a2a78
* removed empty <Default/> so watchface.xml can pass xsd validation
amoledwatchfaces Jul 6, 2024
7769bb4
added CONDITION usage explanation
amoledwatchfaces Jul 6, 2024
e503abb
fixed expression typo
amoledwatchfaces Jul 6, 2024
9a36cc8
Merge branch 'main' into main
amoledwatchfaces Jul 6, 2024
41c9c98
Merge pull request #1132 from amoledwatchfaces/main
garanj Jul 8, 2024
6ba0b79
Updated comments in Weather sample
garanj Jul 8, 2024
6d390ab
Merge pull request #1144 from android/weather-comments
garanj Jul 8, 2024
6be5431
Update dependency org.robolectric:robolectric 4.12.2 to v4.13 (#1145)
renovate[bot] Jul 9, 2024
20d85d6
Use kotlin build.gradle in ComposeStarter
kul3r4 Jul 9, 2024
55ce215
Merge pull request #1146 from kul3r4/buildgradlekotlin
kul3r4 Jul 9, 2024
09c8275
Updates readme with WFF warning
garanj Jul 10, 2024
276d83e
Updates readme with WFF warning
garanj Jul 10, 2024
1a17101
Merge branch 'wff-notice' of https://github.com/android/wear-os-sampl…
garanj Jul 10, 2024
ab635eb
Fixes missing line
garanj Jul 10, 2024
6d49fca
Fix links
garanj Jul 10, 2024
1cc17dd
Merge pull request #1148 from android/wff-notice
garanj Jul 10, 2024
ef5d757
Update all dependencies (#1149)
renovate[bot] Jul 11, 2024
5700d5a
Moves DataLayer sample to Kotlin gradle build
kul3r4 Jul 11, 2024
8ea4f95
Merge pull request #1150 from kul3r4/buildgradlekotlin
kul3r4 Jul 11, 2024
cdd9b66
fix DataLayer README
hiroaki404 Jul 13, 2024
d375898
Merge pull request #1152 from hiroaki404/fix/DataLayer_README
luizgrp Jul 15, 2024
b04afad
Migrate WearSpeakerSample to Kotlin DSL
kul3r4 Jul 17, 2024
7e2502f
Merge pull request #1153 from kul3r4/buildgradlekotlin
kul3r4 Jul 18, 2024
a1cf8c8
Update all dependencies (#1151)
renovate[bot] Jul 19, 2024
09be29c
Update all dependencies (#1156)
renovate[bot] Jul 25, 2024
4fd1697
SLC has a default fill
kul3r4 Jul 25, 2024
35996d1
Merge pull request #1157 from kul3r4/SLCdefault
kul3r4 Jul 25, 2024
1d60319
Update all dependencies 1.3.1 to v1.4.0 (#1158)
renovate[bot] Jul 26, 2024
9bbc2b5
Update all dependencies 1.23.0 to v1.25.0 (#1161)
renovate[bot] Jul 29, 2024
97e497b
Migrate build scripts to Kotlin DSL (#1154)
ithinkihaveacat Jul 31, 2024
3ec82cc
Migrate to Jetpack Tile previews (#1162)
ithinkihaveacat Aug 2, 2024
7fa6e34
apply responsive tiles to alarm, calendar, news, timer, meditation
hiroaki404 Aug 3, 2024
d6450f1
use fixed date for preview
hiroaki404 Aug 5, 2024
83c777b
Merge pull request #1165 from hiroaki404/update/apply_responsive_tiles
yschimke Aug 6, 2024
1c51446
Support breakpoints (#1163)
ithinkihaveacat Aug 6, 2024
c11413c
adds 34
kul3r4 Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Complications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ComposeStarter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/DataLayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/WatchFaceKotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/WearOAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/WearSpeakerSample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/WearTilesKotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it,
# but specifies master branch (old default).
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
ref: master
Expand Down
16 changes: 12 additions & 4 deletions Complications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Android Complications Sample
Complication Test Suite is a set of complication data sources that provide dummy data and it can be
used to test how different types of complications render on a watch face.

> [!IMPORTANT]
> As of July 10, 2024, watch faces must use the [Watch Face Format][4] ([sample][6]) in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this [Help Center][5] article.
>
> Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

Introduction
------------

Expand All @@ -22,10 +27,6 @@ see more options.

The Wear app demonstrates the use of [ComplicationData][1], [ComplicationDataSourceService][2], and [ComplicationText][3].

[1]: https://developer.android.com/reference/kotlin/androidx/wear/complications/data/ComplicationData
[2]: https://developer.android.com/reference/kotlin/androidx/wear/complications/datasource/ComplicationDataSourceService
[3]: https://developer.android.com/reference/kotlin/androidx/wear/complications/data/ComplicationText

Pre-requisites
--------------

Expand All @@ -52,3 +53,10 @@ https://github.com/android/wear-os-samples/issues

Patches are encouraged, and may be submitted by forking this project and
submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.

[1]: https://developer.android.com/reference/kotlin/androidx/wear/complications/data/ComplicationData
[2]: https://developer.android.com/reference/kotlin/androidx/wear/complications/datasource/ComplicationDataSourceService
[3]: https://developer.android.com/reference/kotlin/androidx/wear/complications/data/ComplicationText
[4]: https://developer.android.com/training/wearables/wff
[5]: https://support.google.com/wearos/thread/284572445
[6]: https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat
2 changes: 1 addition & 1 deletion Complications/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
versionCode 1
versionName "1.0"
minSdk 26
targetSdk 33
targetSdk 34
}

lintOptions {
Expand Down
2 changes: 1 addition & 1 deletion Complications/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
android-gradle-plugin = "8.4.0"
android-gradle-plugin = "8.5.1"
androidx-wear-watchface = "1.2.1"

org-jetbrains-kotlin = "1.9.24"
Expand Down
Binary file modified Complications/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Complications/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions Complications/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
186 changes: 94 additions & 92 deletions Complications/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,92 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
4 changes: 3 additions & 1 deletion ComposeStarter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ This sample demonstrates two techniques for helping you design for different dis

1. Compose [`WearPreviewDevices`][wear-preview-devices] and [`WearPreviewFontScales`][wear-preview-font-scales] annotations: These generate a set of previews in the preview pane within Android Studio, for a range of different screen sizes and font display size settings, allowing you to see how your design would look.

2. Screenshot tests: This sample also demonstrates screenshot testing, for a set of [defined devices][wear-device]. For more information on screenshot testing, see this talk from [droidcon London][droidcon-talk].
2. Screenshot tests: This sample also demonstrates screenshot testing, for a set of [defined devices][wear-device]. For more information on screenshot testing, see this talk from [droidcon London][droidcon-talk], and see the [Continuous Integration][ci-guide] for more details on how to build screenshot
testing into your automated workflows.

- To generate new images for the tests, run `./gradlew recordRoborazziDebug`
- To test against existing reference images, run `./gradlew verifyRoborazziDebug`
Expand All @@ -55,3 +56,4 @@ submitting a pull request through GitHub. Please see CONTRIBUTING.md for more de
[wear-device]: https://github.com/android/wear-os-samples/blob/main/ComposeStarter/app/src/test/java/presentation/WearDevice.kt
[wear-preview-font-scales]: https://developer.android.com/reference/kotlin/androidx/wear/compose/ui/tooling/preview/WearPreviewFontScales
[wear-preview-devices]: https://developer.android.com/reference/kotlin/androidx/wear/compose/ui/tooling/preview/WearPreviewDevices
[ci-guide]: https://developer.android.com/training/testing/continuous-integration
Loading
Loading