Skip to content

Commit fd7f287

Browse files
gnpriceKhader-1rajveermalviya
committed
doc: Describe cloud dev setup, without Android Studio
Co-authored-by: Khader M Khudair <[email protected]> Co-authored-by: Rajesh Malviya <[email protected]>
1 parent 3444a68 commit fd7f287

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,23 @@ Two specific points to expand on:
9292

9393
### Setting up
9494

95+
Running the app requires only a standard Flutter setup,
96+
using the Flutter `main` channel:
97+
9598
1. Follow the [Flutter installation guide](https://docs.flutter.dev/get-started/install)
9699
for your platform of choice.
97100
2. Switch to the latest version of Flutter by running `flutter channel main`
98101
and `flutter upgrade` (see [Flutter version](#flutter-version) below).
99102
3. Ensure Flutter is correctly configured by running `flutter doctor`.
100103
4. Start the app with `flutter run`, or from your IDE.
101104

105+
Parts of our test suite require an additional dependency:
106+
107+
5. Install SQLite, for example by running `sudo apt install libsqlite3-dev`.
108+
109+
For more details and help with unusual configurations,
110+
see our [full setup guide](docs/setup.md).
111+
102112

103113
### Flutter version
104114

docs/setup.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Dev setup
2+
3+
For general instructions on setting up to do development
4+
on this app, [see the README][readme-setup].
5+
6+
This file covers specific topics in more detail.
7+
8+
[readme-setup]: https://github.com/zulip/zulip-flutter#setting-up
9+
10+
11+
## Android without Android Studio
12+
13+
The standard [Flutter installation guide](https://docs.flutter.dev/get-started/install)
14+
calls for installing Android Studio in order to build for Android.
15+
This is the recommended option where possible; but for use cases
16+
like building the app on a remote server in the cloud, you may want
17+
to set things up without Android Studio.
18+
19+
To set up the development environment on Linux without Android Studio:
20+
21+
1. Follow the [Flutter installation guide](https://docs.flutter.dev/get-started/install),
22+
up until the step calling for Android Studio.
23+
24+
2. Install Java, specifically JDK 17 (or later?):
25+
`sudo apt install openjdk-17-jdk`
26+
27+
3. Install the Android SDK. This might look like the following:
28+
29+
```
30+
# Download Android SDK cmdline-tools: https://developer.android.com/studio#command-line-tools-only
31+
$ curl -LO https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
32+
$ mkdir -p ~/Android/Sdk/cmdline-tools/latest
33+
$ unzip commandlinetools-linux-11076708_latest.zip -d ~/Android/Sdk/cmdline-tools/latest
34+
$ mv ~/Android/Sdk/cmdline-tools/latest/cmdline-tools/* ~/Android/Sdk/cmdline-tools/latest
35+
$ rmdir ~/Android/Sdk/cmdline-tools/latest/cmdline-tools
36+
# Add "$HOME/Android/Sdk/cmdline-tools/latest/bin" to PATH.
37+
# Set environment variable ANDROID_HOME to "$HOME/Android/Sdk".
38+
$ sdkmanager platform-tools
39+
```
40+
41+
4. Resume following the Flutter installation guide
42+
starting from the step after installing Android Studio.
43+
Use the Flutter `main` channel, just like in
44+
[our standard setup instructions][readme-setup].
45+
46+
5. Build the app with `flutter build apk`
47+
or `flutter build apk --debug`, and
48+
download the resulting APK file to your local machine.
49+
Then use `adb install` (see `adb help` for help)
50+
to install it on either a physical or emulated device,
51+
and run it.
52+
53+
(Have you tried setting things up so that you can use
54+
`flutter run` on the remote machine, and get hot reload?
55+
If so, we'd be glad to hear instructions for it;
56+
please start a thread in our [`#mobile-dev-help`][] channel,
57+
or send a PR.)
58+
59+
[`#mobile-dev-help`]: https://chat.zulip.org/#narrow/stream/516-mobile-dev-help

0 commit comments

Comments
 (0)