Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
Dockerfile | H A D | 25-Apr-2025 | 2.5 KiB | 58 | 49 | |
README.md | H A D | 25-Apr-2025 | 1.5 KiB | 34 | 24 | |
devcontainer.json | H A D | 25-Apr-2025 | 160 | 11 | 10 |
README.md
1# GitHub's Codespaces Configuration 2 3GitHub Codespaces is the vscode-based cloud development environment for GitHub 4projects. We can use [devcontainer][devcontainer-introduction] to configure 5containers for GitHub Codespaces when opening Robolectric project from it. 6 7As Robolectric there are special requirements for Android SDK and `ANDROID_SDK_HOME` 8environment variable for building, Robolectric selects 9[`Dockerfile`][devcontainer-introduction-docker] to configure necessary Android 10environment for itself. 11 12Any contributor can update it based on the demand. When we update `Dockerfile`, we can run 13the following command to build and test it locally: 14 15```shell 16cd .devcontainer 17docker buildx build . 18``` 19 20> See [Docker's buildx repository][docker-buildx] to install buildx. 21 22When local testing is passed, we can push it to remote custom branch, and checkout it 23with latest change in GitHub's Codespaces page and then trigger "Rebuild Container" to 24test its configuration in GitHub's Codespaces environment. 25 26If everything goes well, sending the PR and wait the merging. 27 28Because devcontainer is brought by VSCode, this configuration can also be used 29for VSCode. 30 31[devcontainer-introduction]: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers 32[devcontainer-introduction-docker]: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#dockerfile 33[docker-buildx]: https://github.com/docker/buildx 34