Add Cursor Cloud development environment setup instructions#1659
Conversation
Add development environment setup documentation for Cloud Agent VMs, including Android SDK configuration, key Gradle commands, and gotchas for headless development without an emulator. Co-authored-by: Cuong-Tran <cuong-tran@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the developer experience for those using Cursor Cloud VMs by providing clear, centralized documentation for setting up and running the project. It outlines necessary environment configurations, standard build commands, and known limitations, ensuring a smoother onboarding process for cloud-based development. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. In the cloud where code does dwell, / Setting up is done quite well. / With SDKs and paths all set, / The build will pass, you can bet. Footnotes
|
Reviewer's GuideAdds Cursor Cloud–specific development environment documentation to AGENTS.md, describing the pre-installed Android/JDK setup on Cloud Agent VMs, required environment variables, common Gradle commands, and practical caveats when running Android builds and tests in that environment. Flow diagram for running Gradle commands on Cursor Cloud VMflowchart TD
A[Start in Cursor Cloud VM shell] --> B{Environment variables set?}
B -- yes --> D[Run ./gradlew task]
B -- no --> C[export ANDROID_HOME and JAVA_HOME]
C --> D
D --> E{Command uses emulator?}
E -- installDebug or device required --> F[Command fails: no emulator/device]
E -- assembleDebug, tests, codegen --> G[Build/tests succeed using Gradle cache]
F --> H[Use assembleDebug for build verification]
G --> I[End]
H --> I
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Code Review
This pull request adds a new section to AGENTS.md providing specific instructions for the Cursor Cloud environment, including environment setup, key Gradle commands, and common troubleshooting tips. The review feedback focuses on improving the technical accuracy and clarity of the documentation, specifically regarding the description of property writing, the distinction between formatting and linting, and the behavior of the Gradle daemon stop command.
|
|
||
| ### Environment | ||
|
|
||
| The VM update script installs the Android SDK (platform 36, build-tools 35.0.1, platform-tools, cmdline-tools) into `/opt/android-sdk` and writes `local.properties` with `sdk.dir`. JDK 21 is pre-installed and works fine for compiling to JVM target 17. `ANDROID_HOME`, `JAVA_HOME`, and `PATH` are set in `~/.bashrc`. |
|
|
||
| | Task | Command | | ||
| |------|---------| | ||
| | Format check (lint) | `./gradlew spotlessCheck` | |
| ### Gotchas | ||
|
|
||
| - First Gradle build downloads ~1 GB of dependencies; subsequent builds use the Gradle cache and are much faster. | ||
| - `local.properties` is `.gitignore`d — it must be recreated if missing (the update script handles this). |
| - `local.properties` is `.gitignore`d — it must be recreated if missing (the update script handles this). | ||
| - No Android emulator or device is available on the Cloud VM, so `installDebug` will fail. Build verification is done via `assembleDebug`. | ||
| - `google-services.json` and `client_secrets.json` are not present (CI secrets); builds without `-Pinclude-telemetry` succeed without them. | ||
| - Gradle daemon may use significant memory (`-Xmx4g` in `gradle.properties`). If OOM occurs, kill and restart the daemon with `./gradlew --stop`. |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The environment section says
ANDROID_HOME,JAVA_HOME, andPATHare already set in~/.bashrcbut then shows manualexportcommands; consider clarifying when manual exports are actually needed (e.g., non-login shells) to avoid confusion or redundant setup steps. - You hardcode specific SDK/JDK versions and paths (platform 36, build-tools 35.0.1, JDK 21,
/opt/android-sdk); if these are managed elsewhere, it might be safer to reference that single source of truth or clearly note that the docs need updating when the VM image changes to prevent future drift.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The environment section says `ANDROID_HOME`, `JAVA_HOME`, and `PATH` are already set in `~/.bashrc` but then shows manual `export` commands; consider clarifying when manual exports are actually needed (e.g., non-login shells) to avoid confusion or redundant setup steps.
- You hardcode specific SDK/JDK versions and paths (platform 36, build-tools 35.0.1, JDK 21, `/opt/android-sdk`); if these are managed elsewhere, it might be safer to reference that single source of truth or clearly note that the docs need updating when the VM image changes to prevent future drift.
## Individual Comments
### Comment 1
<location path="AGENTS.md" line_range="135" />
<code_context>
+
+---
+
+## Cursor Cloud specific instructions
+
+### Environment
</code_context>
<issue_to_address>
**nitpick (typo):** Consider hyphenating "Cloud-specific" in the heading for grammatical clarity.
Suggested wording: `## Cursor Cloud-specific instructions` to follow standard compound modifier hyphenation.
```suggestion
## Cursor Cloud-specific instructions
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| --- | ||
|
|
||
| ## Cursor Cloud specific instructions |
There was a problem hiding this comment.
nitpick (typo): Consider hyphenating "Cloud-specific" in the heading for grammatical clarity.
Suggested wording: ## Cursor Cloud-specific instructions to follow standard compound modifier hyphenation.
| ## Cursor Cloud specific instructions | |
| ## Cursor Cloud-specific instructions |
Add
## Cursor Cloud specific instructionssection toAGENTS.mdwith development environment documentation for Cloud Agent VMs.Summary
/opt/android-sdk(platform 36, build-tools 35.0.1)local.properties, no emulator, optional CI secrets, Gradle daemon memoryVerification
All key development tasks were verified on the Cloud VM:
./gradlew assembleDebug./gradlew spotlessCheck./gradlew testReleaseUnitTestBuild output (5 APK variants):
build_debug.log
Spotless check:
spotless_check.log
Unit tests:
unit_tests.log
Add a 👍 reaction to pull requests you find important.
To show artifacts inline, enable in settings.
Summary by Sourcery
Document Cursor Cloud VM setup and usage for running Android builds and tests in the hosted development environment.
Documentation: