Skip to content

Add Cursor Cloud development environment setup instructions#1659

Merged
cuong-tran merged 1 commit into
masterfrom
cursor/setup-cloud-dev-env-53da
May 22, 2026
Merged

Add Cursor Cloud development environment setup instructions#1659
cuong-tran merged 1 commit into
masterfrom
cursor/setup-cloud-dev-env-53da

Conversation

@cuong-tran

@cuong-tran cuong-tran commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Add ## Cursor Cloud specific instructions section to AGENTS.md with development environment documentation for Cloud Agent VMs.

Summary

  • Documents Android SDK setup at /opt/android-sdk (platform 36, build-tools 35.0.1)
  • Lists key Gradle commands (lint, build, test, codegen) with required environment variables
  • Documents gotchas: first-build download size, missing local.properties, no emulator, optional CI secrets, Gradle daemon memory

Verification

All key development tasks were verified on the Cloud VM:

Task Command Result
Debug APK build ./gradlew assembleDebug BUILD SUCCESSFUL (5m 31s, 504 tasks)
Lint check ./gradlew spotlessCheck BUILD SUCCESSFUL (27s, 74 tasks)
Unit tests ./gradlew testReleaseUnitTest BUILD SUCCESSFUL, all tests passed

Build 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.

Open in Web Open in Cursor 

Summary by Sourcery

Document Cursor Cloud VM setup and usage for running Android builds and tests in the hosted development environment.

Documentation:

  • Add Cursor Cloud-specific section to AGENTS.md describing the preconfigured Android SDK, JDK, and environment variables.
  • Document common Gradle tasks and required environment configuration for building, testing, and code generation on the Cloud VM.
  • Call out Cloud VM limitations and caveats such as large initial dependency download, missing local.properties/emulator, optional telemetry secrets, and Gradle daemon memory usage.

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>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Documentation Update: Added a new section to AGENTS.md detailing development environment setup for Cursor Cloud VMs.
  • Environment Configuration: Documented Android SDK paths, required environment variables, and JDK 21 usage for Cloud Agent environments.
  • Operational Guidance: Provided a list of essential Gradle commands and common troubleshooting tips for Cloud VM builds.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sourcery-ai

sourcery-ai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds 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 VM

flowchart 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
Loading

File-Level Changes

Change Details Files
Document Cursor Cloud VM Android development environment and workflows.
  • Add a new 'Cursor Cloud specific instructions' section to AGENTS.md, separated from prior content with a horizontal rule.
  • Describe the preinstalled Android SDK, versions, installation path, and JDK 21 setup, including environment variable configuration.
  • Provide a table of common Gradle tasks (formatting, builds, tests, SQLDelight codegen) with exact commands expected to work on the Cloud VM.
  • Document gotchas for using Cursor Cloud VMs, including initial dependency download size, regeneration of local.properties, lack of emulator, handling of CI-only secrets, and Gradle daemon memory constraints.
AGENTS.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread AGENTS.md

### 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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

The phrasing "writes local.properties with sdk.dir" is slightly ambiguous. It would be clearer to say "writes the sdk.dir property to local.properties".

Comment thread AGENTS.md

| Task | Command |
|------|---------|
| Format check (lint) | `./gradlew spotlessCheck` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

Spotless is a formatter, not a linter. To avoid confusion with the Android Lint tool (which performs static analysis), it's better to use "Format check" as the task description.

Comment thread AGENTS.md
### 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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

Since the update script handles the generation of local.properties, it might be clearer to say it is "automatically generated" rather than "must be recreated".

Comment thread AGENTS.md
- `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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

The --stop command only terminates the Gradle daemon. It doesn't restart it; the daemon will be automatically started by the next Gradle command you invoke. "Stop the daemon" is more accurate than "kill and restart".

@cuong-tran cuong-tran marked this pull request as ready for review May 22, 2026 17:29

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread AGENTS.md

---

## Cursor Cloud specific instructions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick (typo): Consider hyphenating "Cloud-specific" in the heading for grammatical clarity.

Suggested wording: ## Cursor Cloud-specific instructions to follow standard compound modifier hyphenation.

Suggested change
## Cursor Cloud specific instructions
## Cursor Cloud-specific instructions

@cuong-tran cuong-tran merged commit 30c114c into master May 22, 2026
5 checks passed
@github-actions github-actions Bot deleted the cursor/setup-cloud-dev-env-53da branch May 22, 2026 17:31
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.

2 participants