Skip to content

[DNM] just testing downgrade Gradle and Android SDK#793

Open
runningcode wants to merge 2 commits intoEmergeTools:mainfrom
runningcode:no/test-pr
Open

[DNM] just testing downgrade Gradle and Android SDK#793
runningcode wants to merge 2 commits intoEmergeTools:mainfrom
runningcode:no/test-pr

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

Summary

  • Test PR to validate the PR workflow.
  • Downgrade Gradle wrapper from 9.1.0 to 8.14.3 and compileSdk/targetSdk from 36 to 35.
  • Resolve leftover merge state in libs.versions.toml.

Build not verified locally.

Downgrade Gradle wrapper from 9.1.0 to 8.14.3 and compileSdk/targetSdk
from 36 to 35. Resolve libs.versions.toml merge state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread android/gradlew.bat
Comment on lines +73 to +77
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%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" %*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: set CLASSPATH= leaves CLASSPATH empty; -classpath "%CLASSPATH%" becomes -classpath "", causing Java to error: -classpath requires class path specification.
Severity: HIGH

Suggested Fix

Remove the -classpath "%CLASSPATH%" flag from the Java invocation in gradlew.bat, or set CLASSPATH to a valid non-empty default. Since -jar is used, Java loads the classpath from the JAR manifest anyway and the -classpath flag is redundant.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: android/gradlew.bat#L73-L77

Potential issue: In `gradlew.bat`, line 73 sets `CLASSPATH` to empty (`set CLASSPATH=`).
Line 77 then passes `-classpath "%CLASSPATH%"` to the Java command, which expands to
`-classpath ""`. When `CLASSPATH` is empty or unset in Windows cmd, Java interprets
`-classpath ""` as providing an empty classpath argument and raises the error: `Error:
-classpath requires class path specification`. This matches a known Gradle issue
(gradle/gradle#34149). On Windows, this will cause every Gradle invocation via
`gradlew.bat` to fail immediately, breaking the entire build pipeline.

Did we get this right? 👍 / 👎 to inform future reviews.

Comment thread android/gradlew
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: CLASSPATH="\\"\\"" evaluates to \"\" in the shell, passing a malformed classpath to the JVM, which may cause build failures on Cygwin/MSYS.
Severity: MEDIUM

Suggested Fix

Set CLASSPATH="" (empty string) or remove the -classpath "$CLASSPATH" flag entirely from the Java invocation, since -jar already handles classpath loading from the JAR manifest.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: android/gradlew#L117

Potential issue: In `gradlew` (line 117), `CLASSPATH="\\"\\""` is set. In a POSIX
double-quoted string, `\\` → `\` and `\"` → `"`, so the CLASSPATH value is `\"\"` (two
backslash-quote pairs). This is then passed as `-classpath "$CLASSPATH"` to the JVM. On
Cygwin/MSYS systems (line 175), `cygpath --path --mixed "$CLASSPATH"` is also called on
this garbled path, likely producing unexpected output. The intent appears to be an
empty-string classpath, but the escaping is wrong. The `-jar` flag on the same
invocation means Java would use the JAR manifest classpath, so the `-classpath` arg is
redundant, but the malformed value risks unexpected behavior especially on Cygwin/MSYS.

Did we get this right? 👍 / 👎 to inform future reviews.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: PR description says downgrade to 8.14.3, but gradle-wrapper.properties upgrades from 9.1.0 to 9.2.0 — a version mismatch between stated intent and actual change.
Severity: MEDIUM

Suggested Fix

Change distributionUrl in gradle-wrapper.properties to https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip to match the stated intent of the PR, or update the PR description to reflect that Gradle is actually being upgraded to 9.2.0.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: android/gradle/wrapper/gradle-wrapper.properties#L3

Potential issue: The PR description explicitly states: "Downgrade Gradle wrapper from
9.1.0 to 8.14.3". However, `gradle-wrapper.properties` changes `distributionUrl` from
`gradle-9.1.0-bin.zip` to `gradle-9.2.0-bin.zip`, which is an **upgrade** (not a
downgrade) to version 9.2.0. This is inconsistent with the stated intent and may cause
compatibility issues if other changes in this PR (e.g., AGP version 8.13.2, downgraded
Android library versions) were tested or expected to work with Gradle 8.14.3. The wrong
Gradle version could cause build incompatibilities or unexpected behavior.

Did we get this right? 👍 / 👎 to inform future reviews.

Comment thread android/gradle/libs.versions.toml Outdated
Switch from 6.4.1-SNAPSHOT to the stable 6.4.0 release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@runningcode runningcode changed the title Test PR: downgrade Gradle and Android SDK [DNM] just testing downgrade Gradle and Android SDK Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant