-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
245 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
[book] | ||
title="Android CLI" | ||
authors = ["Syed Ahkam"] | ||
description = "Documentation for the tool android-cli" | ||
|
||
language = "en" | ||
multilingual = false | ||
src = "src" | ||
git-repository-url = "https://github.com/SyedAhkam/android-cli" | ||
git-repository-icon = "fa-github" | ||
edit-url-template = "https://github.com/SyedAhkam/android-cli/edit/master/docs/{path}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
# Summary | ||
|
||
- [Introduction](./introduction.md) | ||
[Introduction](./introduction.md) | ||
|
||
# Get Started | ||
|
||
- [Installation](get-started/installation.md) | ||
- [Create or Link Project](get-started/create-or-link.md) | ||
|
||
# Commands | ||
|
||
- [android build](commands/build.md) | ||
- [android install](commands/install.md) | ||
- [android launch](commands/launch.md) | ||
- [android run](commands/run.md) | ||
- [android devices](commands/devices.md) | ||
- [android shell](commands/shell.md) | ||
- [android emulator](commands/emulator.md) | ||
|
||
# Reference | ||
|
||
- [.android](reference/dot-android.md) | ||
|
||
----------- | ||
|
||
[Frequently Asked Questions](faq.md) | ||
[Legal](legal.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Build Project | ||
|
||
``` | ||
USAGE: | ||
android build [OPTIONS] | ||
OPTIONS: | ||
-h, --help Print help information | ||
-r, --release Should build in release mode | ||
``` | ||
|
||
## What it does | ||
|
||
For now, it just execs `./gradlew assemble[Debug|Release]`. | ||
|
||
## Examples | ||
|
||
### Building in Debug mode | ||
|
||
```sh | ||
$ android build | ||
``` | ||
|
||
### Building in Release mode | ||
|
||
```sh | ||
$ android build --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# List Devices | ||
|
||
``` | ||
USAGE: | ||
android devices | ||
OPTIONS: | ||
-h, --help Print help information | ||
``` | ||
|
||
## What it does | ||
|
||
Executes `adb devices` and returns the output. | ||
|
||
## Example | ||
|
||
``` | ||
$ android devices | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# android emulator | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Install App | ||
|
||
``` | ||
USAGE: | ||
android install [OPTIONS] | ||
OPTIONS: | ||
-h, --help Print help information | ||
-r, --release Should install release APK | ||
``` | ||
|
||
## What it does | ||
|
||
Executes `adb install` under the hood and simply returns the output. | ||
|
||
## Examples | ||
|
||
### Install in Debug mode | ||
|
||
```sh | ||
$ android install | ||
``` | ||
|
||
### Install in Release mode | ||
|
||
```sh | ||
$ android install --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Launch App | ||
|
||
``` | ||
USAGE: | ||
android launch | ||
OPTIONS: | ||
-h, --help Print help information | ||
``` | ||
|
||
## What it does | ||
|
||
It requests ADB to launch the configured main activity of the installed app onto the connected device or emulator, effectively running our app. | ||
|
||
## Example | ||
|
||
```sh | ||
$ android launch | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Run App | ||
|
||
``` | ||
USAGE: | ||
android run [OPTIONS] | ||
OPTIONS: | ||
-h, --help Print help information | ||
-r, --release Should build in release mode | ||
``` | ||
|
||
## What it does | ||
|
||
It is a combination of three commands, [`android build`](./build.md), [`android install`](./install.md) and [`android launch`](./launch.md) giving you an illusion of a single operation being executed. | ||
|
||
## Examples | ||
|
||
### Running in Debug mode | ||
|
||
```sh | ||
$ android run | ||
``` | ||
|
||
### Running in Release mode | ||
|
||
```sh | ||
$ android run --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# android shell | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Frequently Asked Questions | ||
|
||
## 1. Isn't there already an `android` tool that ships with the android SDK? | ||
|
||
Yes, there is an `android` bash script that comes with the Android SDK. However, it has been deprecated, and its functionalities have been absorbed into Android Studio, making it the only supported option for Android development. This decision has frustrated developers who prefer to use a CLI to manage their projects. | ||
|
||
## 2. But wait.. Don't I have to install Android Studio to get the SDK? | ||
|
||
Not necessarily. If you go to [Android Studio download page](https://developer.android.com/studio) and scroll down enough you'll see a section named 'Command line tools only'. Just grab that and there's no need for Android Studio. | ||
|
||
## 3. Is a simple wrapper even enough? | ||
|
||
Well yes and no, I eventually intend to build an interface on top of the existing commands in the near future to make actions more controllable and user-friendly as a whole. For example: imagine a prompt which lets you choose which device to run your project on, and even offer launching an emulator right there. there's so many possibilities. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Create or Link Project | ||
|
||
There are mainly two ways to get started -- either create a new project or link to an existing android project. | ||
|
||
## Create | ||
|
||
You may create or initialize a project using | ||
|
||
```sh | ||
$ android create | ||
``` | ||
|
||
And then answer a few prompts: | ||
|
||
- Destination path | ||
- Project name | ||
- Package identifier | ||
|
||
> The template project that this is based upon lives [here](https://github.com/SyedAhkam/android-cli-template). Open for contributions. | ||
After creating the project, you can start editing the source and run the project. | ||
|
||
```sh | ||
$ cd <dest> | ||
$ android run | ||
``` | ||
|
||
## Link an existing project | ||
|
||
If you already have an android project bootstrapped, you will need to link it. | ||
|
||
```sh | ||
$ android link | ||
``` | ||
|
||
> You might need to dig into your own source code to figure out the appropriate prompt values. Especially the package identifier and main activity class name. | ||
All this essentially does is create a [.android](../reference/dot-android.md) file which is then relied upon by the CLI for future operations. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Installation | ||
|
||
## Using cargo | ||
|
||
### From crates.io (no releases yet) | ||
|
||
```sh | ||
$ cargo install android-cli | ||
``` | ||
|
||
### From git directly | ||
|
||
```sh | ||
$ cargo install --git https://github.com/SyedAhkam/android-cli.git | ||
``` | ||
|
||
## Using github releases | ||
|
||
No releases yet | ||
|
||
> After installation, you should have access to the `android` binary from your choice of shell. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Introduction | ||
|
||
Welcome to the documentation for Android CLI. | ||
Android CLI is a powerful tool that simplifies and streamlines the Native Android development process. | ||
|
||
Currently in development, stay tuned! | ||
It provides a single interface for developers to create, build, and release Android applications without the need for cumbersome IDEs like Android Studio. | ||
|
||
Github Project can be found [here](https://github.com/SyedAhkam/android-cli) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Legal | ||
|
||
The tool itself is forever free. Distributed under the MIT License. | ||
|
||
However, the Android SDK is not free. You must accept the Android SDK License Agreement before using the SDK. | ||
|
||
Additionally, the Android CLI is not affiliated with Google or the Android Open Source Project. Android is a trademark of Google Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Dot Android | ||
|
||
TODO |