|
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 |
3 | 2 |
|
4 | | -Syntax: `php index.php create [options] [--] <project> <pkg>` |
| 3 | +PHP Android CLI create/generate Scaffold Android-Studio Gradle project with: |
5 | 4 |
|
6 | | -Help: `php index.php help create` |
| 5 | + - Modules (application/library) |
| 6 | + - Variants with Dimensions |
| 7 | + - ... |
7 | 8 |
|
8 | | -Basic: `php index.php create HelloWorld com.example.helloworld` |
| 9 | +# New Features! |
9 | 10 |
|
| 11 | + - ... |
10 | 12 |
|
11 | | --OPTIONS |
12 | 13 |
|
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` |
14 | 18 |
|
15 | | -With Modules: `php index.php create HelloWorld com.example.helloworld --modules=sdk:library,client` |
| 19 | +### Tech |
16 | 20 |
|
17 | | -Set targetSdk: `--targetSdk=29` |
| 21 | +PHP Android CLI uses: |
18 | 22 |
|
19 | | -Set compileSdk: `--compileSdk=29` |
| 23 | +* [Symfony Console](https://symfony.com/console) - ... |
20 | 24 |
|
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. |
22 | 26 |
|
23 | | -Set buildTools: `--buildTools="29.0.1"` |
| 27 | +### Installation |
24 | 28 |
|
25 | | -By default `androidX` is enabled, disable it: '--androidX=false' |
| 29 | +PHP Android CLI requires [PHP](https://php.net/) v5+ to run. |
26 | 30 |
|
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. |
28 | 32 |
|
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