diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..b61de7b --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,111 @@ +name: Android foundation + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: android-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + host: + name: Build, lint and unit tests + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + with: + distribution: temurin + java-version: '21' + - uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5 + - name: Install isolated Android SDK + shell: bash + run: | + set -euo pipefail + sdk_dir="$RUNNER_TEMP/acetimetracker-sdk" + cli_zip="$RUNNER_TEMP/android-commandlinetools.zip" + curl --fail --location --retry 3 \ + https://dl.google.com/android/repository/commandlinetools-linux-16111833_latest.zip \ + -o "$cli_zip" + echo "e025545c62a8e64c7559119566a569fb1dec5f60 $cli_zip" | sha1sum --check --strict + mkdir -p "$sdk_dir/cmdline-tools" + unzip -q "$cli_zip" -d "$RUNNER_TEMP/android-cli" + mv "$RUNNER_TEMP/android-cli/cmdline-tools" "$sdk_dir/cmdline-tools/23.0" + export ANDROID_HOME="$sdk_dir" + export ANDROID_SDK_ROOT="$sdk_dir" + manager="$sdk_dir/cmdline-tools/23.0/bin/sdkmanager" + # yes can receive SIGPIPE once sdkmanager has accepted all licenses. + set +o pipefail + yes | "$manager" --sdk_root="$sdk_dir" --licenses >/dev/null + set -o pipefail + "$manager" --sdk_root="$sdk_dir" 'platforms;android-37.0' 'build-tools;36.0.0' platform-tools + echo "ANDROID_HOME=$sdk_dir" >> "$GITHUB_ENV" + echo "ANDROID_SDK_ROOT=$sdk_dir" >> "$GITHUB_ENV" + echo "$sdk_dir/cmdline-tools/23.0/bin" >> "$GITHUB_PATH" + echo "$sdk_dir/platform-tools" >> "$GITHUB_PATH" + - name: Verify toolchain + run: ./gradlew --version + - name: Host acceptance checks + run: >- + ./gradlew --no-daemon --stacktrace + :app:checkDebugAarMetadata :app:assembleDebug :app:assembleDebugAndroidTest + :app:lintDebug :app:testDebugUnitTest + + api27: + name: API 27 package smoke + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + with: + distribution: temurin + java-version: '21' + - uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5 + - name: Install isolated Android SDK + shell: bash + run: | + set -euo pipefail + sdk_dir="$RUNNER_TEMP/acetimetracker-sdk" + cli_zip="$RUNNER_TEMP/android-commandlinetools.zip" + curl --fail --location --retry 3 \ + https://dl.google.com/android/repository/commandlinetools-linux-16111833_latest.zip \ + -o "$cli_zip" + echo "e025545c62a8e64c7559119566a569fb1dec5f60 $cli_zip" | sha1sum --check --strict + mkdir -p "$sdk_dir/cmdline-tools" + unzip -q "$cli_zip" -d "$RUNNER_TEMP/android-cli" + mv "$RUNNER_TEMP/android-cli/cmdline-tools" "$sdk_dir/cmdline-tools/23.0" + export ANDROID_HOME="$sdk_dir" + export ANDROID_SDK_ROOT="$sdk_dir" + manager="$sdk_dir/cmdline-tools/23.0/bin/sdkmanager" + # yes can receive SIGPIPE once sdkmanager has accepted all licenses. + set +o pipefail + yes | "$manager" --sdk_root="$sdk_dir" --licenses >/dev/null + set -o pipefail + "$manager" --sdk_root="$sdk_dir" 'platforms;android-37.0' 'build-tools;36.0.0' platform-tools + echo "ANDROID_HOME=$sdk_dir" >> "$GITHUB_ENV" + echo "ANDROID_SDK_ROOT=$sdk_dir" >> "$GITHUB_ENV" + echo "$sdk_dir/cmdline-tools/23.0/bin" >> "$GITHUB_PATH" + echo "$sdk_dir/platform-tools" >> "$GITHUB_PATH" + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Package instrumentation on clean API 27 + uses: ReactiveCircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2 + with: + api-level: 27 + target: default + arch: x86_64 + avd-name: foundation-api27 + force-avd-creation: true + emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -wipe-data + script: ./gradlew --no-daemon --stacktrace :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.acetimetracker.ExampleInstrumentedTest diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 040e878..18dc479 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,20 +1,22 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") - id("com.google.gms.google-services") + alias(libs.plugins.android.application) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.google.services) } android { namespace = "com.example.acetimetracker" - compileSdk = 34 + compileSdk = 37 defaultConfig { applicationId = "com.example.acetimetracker" minSdk = 27 + // Task 2 owns the target-36 system-bar and Back compatibility change. targetSdk = 34 versionCode = 1 versionName = "1.0" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -28,46 +30,54 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } buildFeatures { viewBinding = true + compose = true } } -dependencies { - - implementation("androidx.core:core-ktx:1.9.0") - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("com.google.android.material:material:1.12.0") - implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("pl.droidsonroids.gif:android-gif-drawable:1.2.28") - implementation("com.google.firebase:firebase-auth:23.0.0") - implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.1") - implementation("androidx.navigation:navigation-fragment-ktx:2.7.7") - implementation("androidx.navigation:navigation-ui-ktx:2.7.7") - implementation("androidx.annotation:annotation:1.7.1") - implementation("com.google.firebase:firebase-database:21.0.0") - implementation("com.google.firebase:firebase-firestore:25.0.0") - implementation("com.google.firebase:firebase-storage:21.0.0") - implementation ("com.github.bumptech.glide:glide:4.16.0") - implementation ("com.github.PhilJay:MPAndroidChart:v3.1.0") - implementation ("com.airbnb.android:lottie:5.2.0") - dependencies { - implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha13") - // To use constraintlayout in compose - - implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13") +kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) } - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} +dependencies { + implementation(libs.androidx.core) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.constraintlayout) + implementation(libs.gif) + implementation(libs.androidx.lifecycle.livedata) + implementation(libs.androidx.lifecycle.viewmodel) + implementation(libs.androidx.navigation.fragment) + implementation(libs.androidx.navigation.ui) + implementation(libs.androidx.annotation) + implementation(libs.glide) + implementation(libs.mpandroidchart) + implementation(libs.lottie) + implementation(platform(libs.firebase.bom)) + implementation(libs.firebase.auth) + implementation(libs.firebase.database) + implementation(libs.firebase.firestore) + implementation(libs.firebase.storage) -} \ No newline at end of file + implementation(platform(libs.compose.bom)) + implementation(libs.androidx.activity.compose) + implementation(libs.compose.ui) + implementation(libs.compose.material3) + debugImplementation(libs.compose.ui.tooling.preview) + debugImplementation(libs.compose.ui.tooling) + debugImplementation(libs.compose.ui.test.manifest) + + testImplementation(libs.junit) + androidTestImplementation(platform(libs.compose.bom)) + androidTestImplementation(libs.compose.ui.test.junit4) + androidTestImplementation(libs.android.test.runner) + androidTestImplementation(libs.android.test.junit) + androidTestImplementation(libs.espresso.core) +} diff --git a/app/src/debug/java/com/example/acetimetracker/FoundationPreview.kt b/app/src/debug/java/com/example/acetimetracker/FoundationPreview.kt new file mode 100644 index 0000000..7dbe2ac --- /dev/null +++ b/app/src/debug/java/com/example/acetimetracker/FoundationPreview.kt @@ -0,0 +1,17 @@ +package com.example.acetimetracker + +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.tooling.preview.Preview + +@Preview +@Composable +internal fun FoundationPreview() { + MaterialTheme { + Surface { + Text("AceTimeTracker") + } + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dba5b87..67b8fb7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> @@ -42,11 +41,6 @@ - diff --git a/app/src/main/java/com/example/acetimetracker/Login.kt b/app/src/main/java/com/example/acetimetracker/Login.kt index 18b8f77..bf53d62 100644 --- a/app/src/main/java/com/example/acetimetracker/Login.kt +++ b/app/src/main/java/com/example/acetimetracker/Login.kt @@ -11,8 +11,8 @@ import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import com.google.firebase.auth.FirebaseAuth -import com.google.firebase.auth.ktx.auth -import com.google.firebase.ktx.Firebase +import com.google.firebase.auth.auth +import com.google.firebase.Firebase class Login : AppCompatActivity() { diff --git a/app/src/main/java/com/example/acetimetracker/TimeUtils.kt b/app/src/main/java/com/example/acetimetracker/TimeUtils.kt index 4ce12da..76a42b6 100644 --- a/app/src/main/java/com/example/acetimetracker/TimeUtils.kt +++ b/app/src/main/java/com/example/acetimetracker/TimeUtils.kt @@ -9,8 +9,8 @@ object TimeUtils { val timeFormat = SimpleDateFormat("HH:mm", Locale.getDefault()) return try { - val startDate = timeFormat.parse(startTime) - val endDate = timeFormat.parse(endTime) + val startDate = requireNotNull(timeFormat.parse(startTime)) + val endDate = requireNotNull(timeFormat.parse(endTime)) // Calculate the difference in milliseconds val difference = endDate.time - startDate.time diff --git a/app/src/main/java/com/example/acetimetracker/Timesheet.kt b/app/src/main/java/com/example/acetimetracker/Timesheet.kt index f2d7e26..37eab2e 100644 --- a/app/src/main/java/com/example/acetimetracker/Timesheet.kt +++ b/app/src/main/java/com/example/acetimetracker/Timesheet.kt @@ -248,8 +248,8 @@ class Timesheet : AppCompatActivity() { private fun calculateTimeSpent(startTime: String, endTime: String): Long { val timeFormat = SimpleDateFormat("HH:mm", Locale.getDefault()) return try { - val startDate = timeFormat.parse(startTime) - val endDate = timeFormat.parse(endTime) + val startDate = requireNotNull(timeFormat.parse(startTime)) + val endDate = requireNotNull(timeFormat.parse(endTime)) endDate.time - startDate.time } catch (e: Exception) { Log.e("TimesheetActivity", "Error calculating time spent", e) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a9c9b8f..e898333 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -58,7 +58,6 @@ It aims to provide a user-friendly interface for tracking time and managing tasks efficiently. This application is developed by Mpho Ndlela. We hope it helps you study better and ACE IT!!. - We hope it helps you study better and ACE IT !! Upload Image Enter End Date Enter End Time diff --git a/build.gradle.kts b/build.gradle.kts index e956539..dad47a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,13 @@ buildscript { dependencies { - classpath("com.google.gms:google-services:4.4.1") + // AGP's built-in Kotlin runtime must match the catalog's Compose compiler. + // The bootstrap classpath is resolved before catalog accessors are available. + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.21") } } -// Top-level build file where you can add configuration options common to all sub-projects/modules. -plugins { - id("com.android.application") version "8.1.4" apply false - id("org.jetbrains.kotlin.android") version "1.9.0" apply false -} \ No newline at end of file +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.compose.compiler) apply false + alias(libs.plugins.google.services) apply false +} diff --git a/docs/development/android-setup.md b/docs/development/android-setup.md new file mode 100644 index 0000000..f9a864f --- /dev/null +++ b/docs/development/android-setup.md @@ -0,0 +1,178 @@ +# Android development setup + +This is P1 Task 1: a Compose-ready build alongside the existing View screens. +The app ID/namespace remains `com.example.acetimetracker`; minimum SDK is 27, +compile SDK is 37, and target SDK is deliberately 34. Task 2 owns target 36 +and its system-bar/Back compatibility work. No Firebase credentials, signing +secrets, production writes or service deployment are needed for these checks. + +## Java and Gradle + +Run Gradle on JDK 21. Java and Kotlin application bytecode targets are both 17. +Select your installed JDK in the shell, for example on macOS with Android Studio: + +```bash +export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" +export PATH="$JAVA_HOME/bin:$PATH" +java -version +``` + +Use a JDK 21 installation appropriate to your host on Linux/Windows. In Android +Studio, select JDK/JBR 21 as the Gradle JDK as well. Do not commit local Java or +SDK paths. `local.properties` is optional and ignored; `ANDROID_HOME` works for +command-line builds without it. + +The committed executable wrapper is Gradle **9.5.0**. It was generated in an +empty temporary project using the official distribution after verifying SHA-256: + +```text +553c78f50dafcd54d65b9a444649057857469edf836431389695608536d6b746 +``` + +`gradle-wrapper.properties` enforces this ZIP checksum. The generated wrapper JAR +SHA-256 is `497c8c2a7e5031f6aa847f88104aa80a93532ec32ee17bdb8d1d2f67a194a9c7`. +Official values: [distribution checksum](https://services.gradle.org/distributions/gradle-9.5.0-bin.zip.sha256) +and [wrapper JAR checksum](https://services.gradle.org/distributions/gradle-9.5.0-wrapper.jar.sha256). +To regenerate, download and verify that ZIP first, unzip outside the repository, +then run its `bin/gradle -p /path/to/empty-project wrapper --gradle-version 9.5.0 +--distribution-type bin --gradle-distribution-sha256-sum ` and copy all +four generated wrapper files. Do not bootstrap through the old Gradle 8 wrapper +on JDK 21. + +## Isolated Android SDK + +Use an SDK directory outside the checkout. Install command-line tools **23.0** +(build **16111833**) into `$ANDROID_HOME/cmdline-tools/23.0`. +The official [SDK repository manifest](https://dl.google.com/android/repository/repository2-4.xml) +provides these archive SHA-1 integrity values (not SHA-256): + +| Host | Archive | SHA-1 | +| --- | --- | --- | +| Linux x86-64 | `commandlinetools-linux-16111833_latest.zip` | `e025545c62a8e64c7559119566a569fb1dec5f60` | +| macOS x86-64 | `commandlinetools-mac_x86_64-16111833_latest.zip` | `112cf9618794a997ff273537d55bee02c22abffe` | +| macOS arm64 | `commandlinetools-mac_arm64-16111833_latest.zip` | `ad03dc49bfacfd52c110b14104ea548b8a07e830` | + +Example bootstrap in Bash (replace the archive/checksum for your host): + +```bash +export ANDROID_HOME="$HOME/.cache/acetimetracker-sdk" +export ANDROID_SDK_ROOT="$ANDROID_HOME" +export GRADLE_USER_HOME="$HOME/.cache/acetimetracker-gradle" +cli_archive=commandlinetools-mac_arm64-16111833_latest.zip +cli_sha1=ad03dc49bfacfd52c110b14104ea548b8a07e830 +bootstrap_dir=$(mktemp -d) +curl --fail --location --retry 3 \ + "https://dl.google.com/android/repository/$cli_archive" \ + -o "$bootstrap_dir/commandlinetools.zip" +echo "$cli_sha1 $bootstrap_dir/commandlinetools.zip" | shasum -a 1 --check +mkdir -p "$ANDROID_HOME/cmdline-tools" +unzip -q "$bootstrap_dir/commandlinetools.zip" -d "$bootstrap_dir/unpacked" +mv "$bootstrap_dir/unpacked/cmdline-tools" "$ANDROID_HOME/cmdline-tools/23.0" +export PATH="$ANDROID_HOME/cmdline-tools/23.0/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" +sdkmanager --sdk_root="$ANDROID_HOME" --licenses +sdkmanager --sdk_root="$ANDROID_HOME" \ + 'platforms;android-37.0' 'build-tools;36.0.0' platform-tools +``` + +Accept the SDK licenses when prompted. CLI 23 prints a deprecation message for +`sdkmanager` and delegates to the Android CLI; this is expected. The baseline +API 37 platform is named **`platforms;android-37.0`**, revision 2, in the manifest; +`platforms;android-37` is not an interchangeable package ID. Do not rename SDK +folders or lower compile SDK to work around a resolution error. + +## Build acceptance + +From the repository root, with the Java/SDK environment above: + +```bash +./gradlew --version +./gradlew --no-daemon --stacktrace \ + :app:checkDebugAarMetadata :app:assembleDebug :app:assembleDebugAndroidTest \ + :app:lintDebug :app:testDebugUnitTest +``` + +The version command must report Gradle 9.5.0 and JVM 21. Gradle's own embedded +Kotlin version is separate from the Android compiler. The Android built-in KGP +runtime and Compose compiler are both pinned to 2.4.21. AGP is 9.3.3, Compose BOM +2026.09.00, Firebase BOM 35.0.2 and Google Services 4.5.0. Exact library/plugin pins +live in `gradle/libs.versions.toml`; root `build.gradle.kts` repeats the KGP pin +because its bootstrap classpath precedes generated catalog accessors. Keep both +Kotlin pins aligned. Build output and AAR metadata checks establish compatibility; +publication of a version alone does not. + +The Compose `FoundationPreview` lives only in `src/debug`, uses Material 3, and +has no launcher or production route. Firebase uses BOM-managed main modules; +KTX imports have moved into those modules. Retained legacy dependencies stay on +the plan's pins. No Room/DataStore/WorkManager/Navigation 3 is introduced here. + +Inspect these outputs after successful checks: + +- Debug APK: `app/build/outputs/apk/debug/app-debug.apk`. +- Test APK: `app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk`. +- Lint: `app/build/reports/lint-results-debug.html` and `.sarif`. +- Unit tests: `app/build/reports/tests/testDebugUnitTest/index.html` and + `app/build/test-results/testDebugUnitTest/`. +- Device tests: `app/build/reports/androidTests/connected/debug/` and + `app/build/outputs/androidTest-results/connected/debug/`. + +Existing tests are generated arithmetic and package-name examples. They are +build/package smoke evidence, not auth, timer, migration or user-flow coverage. +Existing lint warnings remain visible; lint errors must fail the build. + +For clean-source reproduction, commit your changes and export tracked files with +`git archive HEAD | tar -x -C /path/to/new-empty-directory`. Run the same commands +there with the explicit Java/SDK environment and the same external task caches. +No IDE state, `local.properties`, project `.gradle` directory or build output +should be copied. A fresh source tree plus a warm dependency cache tests missing +source inputs; it does not claim offline or independent mirror availability. + +## API 27 package smoke and CI + +Use a clean supported x86-64 emulator host for API 27, with package +`system-images;android-27;default;x86_64`, platform 27 and the emulator installed +through SDK Manager. Apple Silicon hosts may not have a supported API 27 image. +Start a fresh AVD with `-wipe-data -no-snapshot`, then run: + +```bash +./gradlew --no-daemon --stacktrace :app:connectedDebugAndroidTest \ + -Pandroid.testInstrumentationRunnerArguments.class=com.example.acetimetracker.ExampleInstrumentedTest +``` + +This checks installation/instrumentation and the package name; it never enters +credentials or mutates Firebase records. Unavailable device execution must be +reported as unavailable, not passed. + +`.github/workflows/android.yml` runs the five host acceptance tasks and a separate +clean API 27 package-smoke job on Ubuntu 24.04/JDK 21. Each job bootstraps CLI 23 +and the SDK in runner temporary storage instead of trusting the hosted SDK layout. +Actions are pinned by commit SHA. Gradle setup owns caching and wrapper validation. +Triggers are pull requests, main pushes and manual dispatch; permissions are +`contents: read`, superseded workflow/ref runs are canceled, and each job has a +30-minute timeout. No signing or production-service secrets are used. + +## Task 1 evidence and plan rulings + +The local arm64/JBR 21.0.10 run passed all five host checks. The compiled Compose +preview has JVM class major version 61 (Java 17) and generated Compose runtime +parameters. SDK resolution succeeded using the installed API 37.0 revision 2. +The initial lint report contains 204 warnings and no errors; the single generated +arithmetic unit test passed. Warnings include legacy resources/text/deprecations, +old target SDK, dependency update suggestions and three 16 KB native-alignment +warnings. These are retained, with no lint suppressions or baseline. The native +alignment warnings need review in the later release stage; target 34 is temporary. +The compiler's nullable date-parsing diagnostics are resolved with the plan's +`requireNotNull` guards inside the existing error-handling blocks. + +Two bootstrap details differ from the recorded plan after publisher inspection: + +- `gradle/actions` v5's recorded annotated tag object resolves to commit + `0723195856401067f7a2779048b490ace7a47d7c`; emulator runner v2's resolves to + `a421e43855164a8197daf9d8d40fe71c6996bb0d`. The workflow pins these commits, + preserving both selected version families. See the publishers' tag objects + ([Gradle](https://api.github.com/repos/gradle/actions/git/tags/4c125117fe7c5aed11272ec4213f602f012f89f2), + [emulator runner](https://api.github.com/repos/ReactiveCircus/android-emulator-runner/git/tags/4c44018e59b437e86cdfc41da381398f93ed8808)). +- The stable SDK inventory has no API 27 Google APIs x86-64 image. Linux CI uses + the published `default` x86-64 image instead. An API 27 ARM Google APIs image + is available for a separate local attempt. No toolchain version was lowered. + +Final clean-source, device and submitted-head CI outcomes are recorded in the PR. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..a2fd776 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,60 @@ +[versions] +agp = "9.3.3" +kotlin = "2.4.21" +google-services = "4.5.0" +compose-bom = "2026.09.00" +activity-compose = "1.13.0" +core = "1.19.1" +appcompat = "1.8.0" +constraintlayout = "2.2.2" +firebase-bom = "35.0.2" +material = "1.12.0" +gif = "1.2.28" +lifecycle-livedata = "2.7.0" +lifecycle-viewmodel = "2.8.1" +navigation = "2.7.7" +annotation = "1.7.1" +glide = "4.16.0" +mpandroidchart = "v3.1.0" +lottie = "5.2.0" +junit = "4.13.2" +android-test-runner = "1.7.0" +android-test-junit = "1.3.0" +espresso = "3.7.0" + +[libraries] +androidx-core = { module = "androidx.core:core", version.ref = "core" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" } +androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle-livedata" } +androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle-viewmodel" } +androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" } +androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" } +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" } +compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" } +compose-ui = { module = "androidx.compose.ui:ui" } +compose-material3 = { module = "androidx.compose.material3:material3" } +compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } +compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } +compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } +firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" } +firebase-auth = { module = "com.google.firebase:firebase-auth" } +firebase-database = { module = "com.google.firebase:firebase-database" } +firebase-firestore = { module = "com.google.firebase:firebase-firestore" } +firebase-storage = { module = "com.google.firebase:firebase-storage" } +material = { module = "com.google.android.material:material", version.ref = "material" } +gif = { module = "pl.droidsonroids.gif:android-gif-drawable", version.ref = "gif" } +glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } +mpandroidchart = { module = "com.github.PhilJay:MPAndroidChart", version.ref = "mpandroidchart" } +lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" } +junit = { module = "junit:junit", version.ref = "junit" } +android-test-runner = { module = "androidx.test:runner", version.ref = "android-test-runner" } +android-test-junit = { module = "androidx.test.ext:junit", version.ref = "android-test-junit" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +google-services = { id = "com.google.gms.google-services", version.ref = "google-services" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..b1b8ef5 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d212a79..4b271a6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,10 @@ -#Wed Apr 24 02:19:33 SAST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionSha256Sum=553c78f50dafcd54d65b9a444649057857469edf836431389695608536d6b746 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip +networkTimeout=10000 +retries=0 +retryBackOffMs=500 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 index 4f906e0..b9bb139 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# 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. @@ -15,81 +15,114 @@ # 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 UN*X -## +# +# 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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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 link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# 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"' +# This is normally unused +# 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 -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="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,88 +131,118 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "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 the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $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,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $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,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# 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 java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # 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 arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# 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" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "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" "$@" diff --git a/gradlew.bat b/gradlew.bat index 107acd3..aa5f10b 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,82 @@ -@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=. -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%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -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%"=="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! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -: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, and ensure extensions are enabled +setlocal EnableExtensions + +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 + +"%COMSPEC%" /c exit 1 + +: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 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL%