SZJQUQD3EHBJUNQC3UTVRFIY3RA7XPL64CZKIJ4LBMJFKUEZ6URAC pluginManagement {repositories {google {content {includeGroupByRegex("com\\.android.*")includeGroupByRegex("com\\.google.*")includeGroupByRegex("androidx.*")}}mavenCentral()gradlePluginPortal()}}dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {google()mavenCentral()}}rootProject.name = "Watch Calculator"include(":app")
@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 shellif "%OS%"=="Windows_NT" setlocalset DIRNAME=%~dp0if "%DIRNAME%"=="" set DIRNAME=.@rem This is normally unusedset APP_BASE_NAME=%~n0set 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.exeif defined JAVA_HOME goto findJavaFromJavaHomeset JAVA_EXE=java.exe%JAVA_EXE% -version >NUL 2>&1if %ERRORLEVEL% equ 0 goto executeecho. 1>&2echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2echo. 1>&2echo Please set the JAVA_HOME variable in your environment to match the 1>&2echo location of your Java installation. 1>&2goto fail:findJavaFromJavaHomeset JAVA_HOME=%JAVA_HOME:"=%set JAVA_EXE=%JAVA_HOME%/bin/java.exeif exist "%JAVA_EXE%" goto executeecho. 1>&2echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2echo. 1>&2echo Please set the JAVA_HOME variable in your environment to match the 1>&2echo location of your Java installation. 1>&2goto fail:execute@rem Setup the command lineset CLASSPATH=@rem Execute Gradle"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*:end@rem End local scope for the variables with windows NT shellif %ERRORLEVEL% equ 0 goto mainEnd:failrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead ofrem the _cmd.exe /c_ return code!set EXIT_CODE=%ERRORLEVEL%if %EXIT_CODE% equ 0 set EXIT_CODE=1if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%exit /b %EXIT_CODE%:mainEndif "%OS%"=="Windows_NT" endlocal:omega
#!/bin/sh## Copyright © 2015 the original authors.## 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## https://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.## SPDX-License-Identifier: Apache-2.0################################################################################# Gradle start up script for POSIX generated by Gradle.## Important for running:## (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is# noncompliant, but you have some other compliant shell such as ksh or# bash, then to run this script, type that shell name before the whole# command line, like:## ksh Gradle## Busybox and similar reduced shells will NOT work, because this script# requires all of these POSIX shell features:# * functions;# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,# «${var#prefix}», «${var%suffix}», and «$( cmd )»;# * compound commands having a testable exit status, especially «case»;# * various built-in commands including «command», «set», and «ulimit».## Important for patching:## (2) This script targets any POSIX shell, so it avoids extensions provided# by Bash, Ksh, etc; in particular arrays are avoided.## The "traditional" practice of packing multiple parameters into a# space-separated string is a well documented source of bugs and security# problems, so this is (mostly) avoided, by progressively accumulating# options in "$@", and eventually passing that to Java.## Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;# see the in-line comments for details.## There are tweaks for specific operating systems such as AIX, CygWin,# Darwin, MinGW, and NonStop.## (3) This script is generated from the Groovy template# 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/.################################################################################ Attempt to set APP_HOME# Resolve links: $0 may be a linkapp_path=$0# Need this for daisy-chained symlinks.whileAPP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path[ -h "$app_path" ]dols=$( ls -ld "$app_path" )link=${ls#*' -> '}case $link in #(/*) app_path=$link ;; #(*) app_path=$APP_HOME$link ;;esacdone# This is normally unused# shellcheck disable=SC2034APP_BASE_NAME=${0##*/}# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit# Use the maximum available, or set MAX_FD != -1 to use that value.MAX_FD=maximumwarn () {echo "$*"} >&2die () {echoecho "$*"echoexit 1} >&2# OS specific support (must be 'true' or 'false').cygwin=falsemsys=falsedarwin=falsenonstop=falsecase "$( uname )" in #(CYGWIN* ) cygwin=true ;; #(Darwin* ) darwin=true ;; #(MSYS* | MINGW* ) msys=true ;; #(NONSTOP* ) nonstop=true ;;esacCLASSPATH="\\\"\\\""# Determine the Java command to use to start the JVM.if [ -n "$JAVA_HOME" ] ; thenif [ -x "$JAVA_HOME/jre/sh/java" ] ; then# IBM's JDK on AIX uses strange locations for the executablesJAVACMD=$JAVA_HOME/jre/sh/javaelseJAVACMD=$JAVA_HOME/bin/javafiif [ ! -x "$JAVACMD" ] ; thendie "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOMEPlease set the JAVA_HOME variable in your environment to match thelocation of your Java installation."fielseJAVACMD=javaif ! command -v java >/dev/null 2>&1thendie "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.Please set the JAVA_HOME variable in your environment to match thelocation of your Java installation."fifi# Increase the maximum file descriptors if we can.if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; thencase $MAX_FD in #(max*)# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.# shellcheck disable=SC2039,SC3045MAX_FD=$( ulimit -H -n ) ||warn "Could not query maximum file descriptor limit"esaccase $MAX_FD in #('' | soft) :;; #(*)# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.# shellcheck disable=SC2039,SC3045ulimit -n "$MAX_FD" ||warn "Could not set maximum file descriptor limit to $MAX_FD"esacfi# Collect all arguments for the java command, stacking in reverse order:# * args from the command line# * the main class name# * -classpath# * -D...appname settings# * --module-path (only if needed)# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.# For Cygwin or MSYS, switch paths to Windows format before running javaif "$cygwin" || "$msys" ; thenAPP_HOME=$( cygpath --path --mixed "$APP_HOME" )CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )JAVACMD=$( cygpath --unix "$JAVACMD" )# Now convert the arguments - kludge to limit ourselves to /bin/shfor arg doifcase $arg in #(-*) false ;; # don't mess with options #(/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath[ -e "$t" ] ;; #(*) false ;;esacthenarg=$( cygpath --path --ignore --mixed "$arg" )fi# Roll the args list around exactly as many times as the number of# args, so each arg winds up back in the position where it started, but# possibly modified.## NB: a `for` loop captures its iteration list before it begins, so# changing the positional parameters here affects neither the number of# iterations, nor the values presented in `arg`.shift # remove old argset -- "$@" "$arg" # push replacement argdonefi# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'# Collect all arguments for the java command:# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,# and any embedded shellness will be escaped.# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be# treated as '${Hostname}' itself on the command line.set -- \"-Dorg.gradle.appname=$APP_BASE_NAME" \-classpath "$CLASSPATH" \-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \"$@"# Stop when "xargs" is not available.if ! command -v xargs >/dev/null 2>&1thendie "xargs is not available"fi# Use "xargs" to parse quoted args.## With -n1 it outputs one arg per line, with the quotes and backslashes removed.## In Bash we could simply go:## readarray ARGS < <( xargs -n1 <<<"$var" ) &&# set -- "${ARGS[@]}" "$@"## but POSIX shell has neither arrays nor command substitution, so instead we# post-process each arg (as a line of input to sed) to backslash-escape any# character that might be a shell metacharacter, then use eval to reverse# that process (while maintaining the separation between arguments), and wrap# the whole thing up as a single "set" statement.## This will of course break if any of these variables contains a newline or# an unmatched quote.#eval "set -- $(printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |xargs -n1 |sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |tr '\n' ' ')" '"$@"'exec "$JAVACMD" "$@"
# Project-wide Gradle settings.# IDE (e.g. Android Studio) users:# Gradle settings configured through the IDE *will override*# any settings specified in this file.# For more details on how to configure your build environment visit# http://www.gradle.org/docs/current/userguide/build_environment.html# Specifies the JVM arguments used for the daemon process.# The setting is particularly useful for tweaking memory settings.org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8# When configured, Gradle will run in incubating parallel mode.# This option should only be used with decoupled projects. For more details, visit# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects# org.gradle.parallel=true# AndroidX package structure to make it clearer which packages are bundled with the# Android operating system, and which are packaged with your app's APK# https://developer.android.com/topic/libraries/support-library/androidx-rnandroid.useAndroidX=true# Kotlin code style for this project: "official" or "obsolete":kotlin.code.style=official# Enables namespacing of each library's R class so that its R class includes only the# resources declared in the library itself and none from the library's dependencies,# thereby reducing the size of the R class for that libraryandroid.nonTransitiveRClass=true
#Sun Oct 26 08:39:25 CET 2025distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distsdistributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zipnetworkTimeout=10000validateDistributionUrl=truezipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists
[versions]agp = "9.0.0-alpha11"playServicesWearable = "18.0.0"kotlin = "2.0.21"composeBom = "2024.09.00"composeMaterial = "1.2.1"composeFoundation = "1.2.1"wearToolingPreview = "1.0.0"activityCompose = "1.8.0"coreSplashscreen = "1.0.1"[libraries]play-services-wearable = { group = "com.google.android.gms", name = "play-services-wearable", version.ref = "playServicesWearable" }compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }ui = { group = "androidx.compose.ui", name = "ui" }ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }compose-material = { group = "androidx.wear.compose", name = "compose-material", version.ref = "composeMaterial" }compose-foundation = { group = "androidx.wear.compose", name = "compose-foundation", version.ref = "composeFoundation" }wear-tooling-preview = { group = "androidx.wear", name = "wear-tooling-preview", version.ref = "wearToolingPreview" }activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "coreSplashscreen" }[plugins]android-application = { id = "com.android.application", version.ref = "agp" }kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
// Top-level build file where you can add configuration options common to all sub-projects/modules.plugins {alias(libs.plugins.android.application) apply falsealias(libs.plugins.kotlin.compose) apply false}
<resources><string name="hello_world">From the Round world,\nHello, %1$s!</string></resources>
<resources><style name="MainActivityTheme.Starting" parent="Theme.SplashScreen"><item name="windowSplashScreenBackground">@android:color/black</item><item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item><item name="postSplashScreenTheme">@android:style/Theme.DeviceDefault</item></style></resources>
<resources><string name="app_name">Watch Calculator</string><!--This string is used for square devices and overridden by hello_world invalues-round/strings.xml for round devices.--><string name="hello_world">From the Square world,\nHello, %1$s!</string></resources>
<?xml version="1.0" encoding="utf-8"?><adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"><background android:drawable="@drawable/ic_launcher_background" /><foreground android:drawable="@drawable/ic_launcher_foreground" /><monochrome android:drawable="@drawable/ic_launcher_foreground" /></adaptive-icon>
<?xml version="1.0" encoding="utf-8"?><adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"><background android:drawable="@drawable/ic_launcher_background" /><foreground android:drawable="@drawable/ic_launcher_foreground" /><monochrome android:drawable="@drawable/ic_launcher_foreground" /></adaptive-icon>
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><itemandroid:width="48dp"android:height="48dp"android:gravity="center"><shape android:shape="oval"><solid android:color="#FFFFFF" /></shape></item><itemandroid:width="40dp"android:height="40dp"android:gravity="center"><vectorandroid:width="24dp"android:height="24dp"android:tint="#000000"android:viewportWidth="24"android:viewportHeight="24"><pathandroid:fillColor="#FF000000"android:pathData="M17.6,11.48 L19.44,8.3a0.63,0.63 0,0 0,-1.09 -0.63l-1.88,3.24a11.43,11.43 0,0 0,-8.94 0L5.65,7.67a0.63,0.63 0,0 0,-1.09 0.63L6.4,11.48A10.81,10.81 0,0 0,1 20L23,20A10.81,10.81 0,0 0,17.6 11.48ZM7,17.25A1.25,1.25 0,1 1,8.25 16,1.25 1.25,0 0,1 7,17.25ZM17,17.25A1.25,1.25 0,1 1,18.25 16,1.25 1.25,0 0,1 17,17.25Z" /></vector></item></layer-list>
<vector xmlns:android="http://schemas.android.com/apk/res/android"xmlns:aapt="http://schemas.android.com/aapt"android:width="108dp"android:height="108dp"android:viewportWidth="108"android:viewportHeight="108"><path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"><aapt:attr name="android:fillColor"><gradientandroid:endX="85.84757"android:endY="92.4963"android:startX="42.9492"android:startY="49.59793"android:type="linear"><itemandroid:color="#44000000"android:offset="0.0" /><itemandroid:color="#00000000"android:offset="1.0" /></gradient></aapt:attr></path><pathandroid:fillColor="#FFFFFF"android:fillType="nonZero"android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"android:strokeWidth="1"android:strokeColor="#00000000" /></vector>
<?xml version="1.0" encoding="utf-8"?><vector xmlns:android="http://schemas.android.com/apk/res/android"android:width="108dp"android:height="108dp"android:viewportWidth="108"android:viewportHeight="108"><pathandroid:fillColor="#3DDC84"android:pathData="M0,0h108v108h-108z" /><pathandroid:fillColor="#00000000"android:pathData="M9,0L9,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,0L19,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M29,0L29,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M39,0L39,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M49,0L49,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M59,0L59,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M69,0L69,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M79,0L79,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M89,0L89,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M99,0L99,108"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,9L108,9"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,19L108,19"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,29L108,29"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,39L108,39"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,49L108,49"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,59L108,59"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,69L108,69"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,79L108,79"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,89L108,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M0,99L108,99"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,29L89,29"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,39L89,39"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,49L89,49"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,59L89,59"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,69L89,69"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M19,79L89,79"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M29,19L29,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M39,19L39,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M49,19L49,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M59,19L59,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M69,19L69,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /><pathandroid:fillColor="#00000000"android:pathData="M79,19L79,89"android:strokeWidth="0.8"android:strokeColor="#33FFFFFF" /></vector>
package sh.moritz.watchcalculator.presentation.themeimport androidx.compose.runtime.Composableimport androidx.wear.compose.material.MaterialTheme@Composablefun WatchCalculatorTheme(content: @Composable () -> Unit) {/*** Empty theme to customize for your app.* See: https://developer.android.com/jetpack/compose/designsystems/custom*/MaterialTheme(content = content)}
/* While this template provides a good starting point for using Wear Compose, you can always* take a look at https://github.com/android/wear-os-samples/tree/main/ComposeStarter to find the* most up to date changes to the libraries and their usages.*/package sh.moritz.watchcalculator.presentationimport android.os.Bundleimport androidx.activity.ComponentActivityimport androidx.activity.compose.setContentimport androidx.compose.ui.Modifierimport androidx.core.splashscreen.SplashScreen.Companion.installSplashScreenimport sh.moritz.watchcalculator.presentation.theme.WatchCalculatorThemeclass MainActivity : ComponentActivity() {override fun onCreate(savedInstanceState: Bundle?) {installSplashScreen()super.onCreate(savedInstanceState)setTheme(android.R.style.Theme_DeviceDefault)setContent {WatchCalculatorTheme {CalculatorUI().Draw(Modifier)}}}}
package sh.moritz.watchcalculator.presentationimport androidx.compose.foundation.backgroundimport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.Rowimport androidx.compose.foundation.layout.fillMaxWidthimport androidx.compose.foundation.layout.heightimport androidx.compose.foundation.layout.paddingimport androidx.compose.foundation.layout.widthimport androidx.compose.runtime.Composableimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.graphics.Colorimport androidx.compose.ui.text.style.TextAlignimport androidx.compose.ui.tooling.preview.Previewimport androidx.compose.ui.unit.dpimport androidx.compose.ui.unit.spimport androidx.wear.compose.material.Buttonimport androidx.wear.compose.material.MaterialThemeimport androidx.wear.compose.material.Textimport androidx.wear.tooling.preview.devices.WearDevicesimport sh.moritz.watchcalculator.presentation.theme.WatchCalculatorThemeclass CalculatorUI {var formula: String = "asdfg"@Composablepublic fun Draw(modifier: Modifier) {Column() {Row(modifier = modifier.fillMaxWidth().background(MaterialTheme.colors.background).padding(start = 0.dp, top = 4.dp, end = 0.dp, bottom = 0.dp).align(Alignment.CenterHorizontally),) {Text(text = "asdwersadadf",color = Color.White,textAlign = TextAlign.Center,fontSize = 30.sp,modifier = Modifier.fillMaxWidth(),)}val buttonMod = modifier.padding(2.dp).height(25.dp).width(35.dp)Row(modifier = modifier.background(MaterialTheme.colors.background).align(Alignment.CenterHorizontally),) {Button(onClick = {}, modifier = buttonMod) { Text("+") }Button(onClick = {}, modifier = buttonMod) { Text("-") }Button(onClick = {}, modifier = buttonMod) { Text("×") }Button(onClick = {}, modifier = buttonMod) { Text("÷") }Button(onClick = {}, modifier = buttonMod) { Text("←") }}Row(modifier = modifier.background(MaterialTheme.colors.background).align(Alignment.CenterHorizontally),) {Button(onClick = {}, modifier = buttonMod) { Text("7") }Button(onClick = {}, modifier = buttonMod) { Text("8") }Button(onClick = {}, modifier = buttonMod) { Text("9") }}Row(modifier = modifier.background(MaterialTheme.colors.background).align(Alignment.CenterHorizontally),) {Button(onClick = {}, modifier = buttonMod) { Text("4") }Button(onClick = {}, modifier = buttonMod) { Text("5") }Button(onClick = {}, modifier = buttonMod) { Text("6") }}Row(modifier = modifier.background(MaterialTheme.colors.background).align(Alignment.CenterHorizontally),) {Button(onClick = {}, modifier = buttonMod) { Text("1") }Button(onClick = {}, modifier = buttonMod) { Text("2") }Button(onClick = {}, modifier = buttonMod) { Text("3") }}Row(modifier = modifier.background(MaterialTheme.colors.background).align(Alignment.CenterHorizontally),) {Button(onClick = {}, modifier = buttonMod) { Text("C") }Button(onClick = {}, modifier = buttonMod) { Text("0") }Button(onClick = {}, modifier = buttonMod) { Text("=") }}}}}@Preview(device = WearDevices.LARGE_ROUND, showSystemUi = true)@Composableprivate fun PreviewCalculator() {WatchCalculatorTheme {CalculatorUI().Draw(Modifier)}}
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"><uses-permission android:name="android.permission.WAKE_LOCK" /><uses-feature android:name="android.hardware.type.watch" /><applicationandroid:allowBackup="true"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:supportsRtl="true"android:theme="@android:style/Theme.DeviceDefault"><uses-libraryandroid:name="com.google.android.wearable"android:required="true" /><uses-libraryandroid:name="wear-sdk"android:required="false" /><!--Set to true if your app is Standalone, that is, it does not require the handheldapp to run.--><meta-dataandroid:name="com.google.android.wearable.standalone"android:value="true" /><activityandroid:name=".presentation.MainActivity"android:exported="true"android:taskAffinity=""android:theme="@style/MainActivityTheme.Starting"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application></manifest>
# Add project specific ProGuard rules here.# You can control the set of applied configuration files using the# proguardFiles setting in build.gradle.## For more details, see# http://developer.android.com/guide/developing/tools/proguard.html# If your project uses WebView with JS, uncomment the following# and specify the fully qualified class name to the JavaScript interface# class:#-keepclassmembers class fqcn.of.javascript.interface.for.webview {# public *;#}# Uncomment this to preserve the line number information for# debugging stack traces.#-keepattributes SourceFile,LineNumberTable# If you keep the line number information, uncomment this to# hide the original source file name.#-renamesourcefileattribute SourceFile
<?xml version="1.0" encoding="UTF-8"?><lint><!-- Ignore the IconLocation for the Tile preview images --><issue id="IconLocation"><ignore path="res/drawable/tile_preview.png" /><ignore path="res/drawable-round/tile_preview.png" /></issue></lint>
plugins {alias(libs.plugins.android.application)alias(libs.plugins.kotlin.compose)}android {namespace = "sh.moritz.watchcalculator"compileSdk {version = release(36) {minorApiLevel = 1}}defaultConfig {applicationId = "sh.moritz.watchcalculator"minSdk = 30targetSdk = 36versionCode = 1versionName = "1.0"}buildTypes {release {isMinifyEnabled = falseproguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"),"proguard-rules.pro")}}compileOptions {sourceCompatibility = JavaVersion.VERSION_17targetCompatibility = JavaVersion.VERSION_17}useLibrary("wear-sdk")buildFeatures {compose = trueviewBinding = true}dependenciesInfo {includeInApk = falseincludeInBundle = false}buildToolsVersion = "36.1.0"}dependencies {implementation(libs.play.services.wearable)implementation(platform(libs.compose.bom))implementation(libs.ui)implementation(libs.ui.graphics)implementation(libs.ui.tooling.preview)implementation(libs.compose.material)implementation(libs.compose.foundation)implementation(libs.wear.tooling.preview)implementation(libs.activity.compose)implementation(libs.core.splashscreen)androidTestImplementation(platform(libs.compose.bom))androidTestImplementation(libs.ui.test.junit4)debugImplementation(libs.ui.tooling)debugImplementation(libs.ui.test.manifest)}
/build
.git*.iml.gradle/local.properties/.idea.DS_Store/build/captures.externalNativeBuild.cxxlocal.properties
root = true[*]end_of_line = lfinsert_final_newline = trueindent_style = tab