Skip to content

Commit d513558

Browse files
committed
Updated README.md
1 parent 3b93b9f commit d513558

File tree

1 file changed

+69
-15
lines changed

1 file changed

+69
-15
lines changed

README.md

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,83 @@
1-
# php-android-cli
2-
Create/Scaffold Android-Studio gradle project with Modules & Flavors from CLI with PHP in seconds (Symfony Console)... [the ugly way... but working nice :)]
1+
# PHP Android CLI
32

4-
Syntax: `php index.php create [options] [--] <project> <pkg>`
3+
PHP Android CLI create/generate Scaffold Android-Studio Gradle project with:
54

6-
Help: `php index.php help create`
5+
- Modules (application/library)
6+
- Variants with Dimensions
7+
- ...
78

8-
Basic: `php index.php create HelloWorld com.example.helloworld`
9+
# New Features!
910

11+
- ...
1012

11-
-OPTIONS
1213

13-
With Variants: `php index.php create HelloWorld com.example.helloworld --flavors=free:type,paid:type`
14+
You can also:
15+
- set `targetSdk`
16+
- set `buildToolsVersion`
17+
- set `minSdk` & `maxSdk`
1418

15-
With Modules: `php index.php create HelloWorld com.example.helloworld --modules=sdk:library,client`
19+
### Tech
1620

17-
Set targetSdk: `--targetSdk=29`
21+
PHP Android CLI uses:
1822

19-
Set compileSdk: `--compileSdk=29`
23+
* [Symfony Console](https://symfony.com/console) - ...
2024

21-
Set minSdk: `--minSdk=16`
25+
And of course `PHP Android CLI` itself is open source with a [public repository][https://github.com/AnandPilania/php-android-cli] on GitHub.
2226

23-
Set buildTools: `--buildTools="29.0.1"`
27+
### Installation
2428

25-
By default `androidX` is enabled, disable it: '--androidX=false'
29+
PHP Android CLI requires [PHP](https://php.net/) v5+ to run.
2630

27-
By default `Jetifier` is enabled, disable it: '--jetifier=false'
31+
Just download the [`phpandroid`](https://github.com/AnandPilania/php-android-cli/releases/latest) and start scaffolding.
2832

29-
Forcefully: `--force`
33+
```sh
34+
$ phpandroid create <PROJECT_NAME> <PACKAGE> [OPTIONS]
35+
```
36+
37+
## USAGE
38+
### Basic use
39+
40+
Create `HelloWorld` project with `org.example.helloworld` package name:
41+
```sh
42+
phpandroid create HelloWorld com.example.helloworld
43+
```
44+
45+
### Create `Modules` along with `App`
46+
Create `HelloWorld` project with `sdk` library & `admin` application
47+
```sh
48+
phpandroid create HelloWorld com.example.helloworld --modules=sdk:library,admin
49+
```
50+
51+
### Create `productVariants`: `free` & `paid` variant
52+
```sh
53+
phpandroid create HelloWorld com.example.helloworld --variants=free:type,paid:type
54+
```
55+
56+
here `type` is the `dimension`
57+
58+
## Default Options
59+
60+
PHP Android CLI is currently using default values for latest Android. These are:
61+
62+
| OPTIONS | Usage | DEFAULT |
63+
| ------ | ------ | ------ |
64+
| --targetSdk | set `targetSdk` | 29 |
65+
| --buildTools | set `buildToolsVersion` | 29.0.1 |
66+
| --minSdk | set `minSdk` | 16 |
67+
| --maxSdk | set `maxSdk` | 29 |
68+
| --androidX | Enable/Disable AndroidX | true |
69+
| --jetifier | Enable/Disable Jetifier | true |
70+
71+
### Todos
72+
73+
- Create/Scaffold `activity`
74+
- Create/Scaffold `variants` source
75+
- ...
76+
77+
License
78+
----
79+
80+
MIT
81+
82+
83+
**Free Software, Hell Yeah!**

0 commit comments

Comments
 (0)