PHP Android CLI create/generate Android-Studio Gradle project with:
- Modules as application/library
- Create project & application/library level
build.gradle
with package name &dimensions
&variants
- Manage
settings.gradle
- Generate
manifest
file &res
with defaulticon
,color
,style
&values
- ...more
- ...
You can also:
- set
targetSdk
- set
buildToolsVersion
- set
minSdk
&maxSdk
PHP Android CLI uses:
- Symfony Console - ...
PHP Android CLI requires PHP v5+ to run.
Just download the androidcli
.
Install Phar file - Mac/Linux
$ chmod +x androidcli.phar
$ sudo mv androidcli.phar /usr/local/bin/androidcli
$ androidcli --version
Install Phar file - Windows
- Put all your .phar files to one directory like C:\php\phars
- Add C:\php\phars to system environment variables (right-click my Computer -> Properties -> Advanced System Settings -> Environment variables)
- Start the command prompt (find command prompt in start menu then right-click and select Run as Administrator)
- Type the following commands
$ echo @php "%~dp0androidcli.phar" %*>androidcli.bat
$ androidcli --version
$ androidcli create <PROJECT_NAME> <PACKAGE> [OPTIONS]
Create HelloWorld
project with com.example.helloworld
package name:
androidcli create HelloWorld com.example.helloworld
Create HelloWorld
project with sdk
library & admin
application
androidcli create HelloWorld com.example.helloworld --modules=sdk:library,admin
androidcli create HelloWorld com.example.helloworld --variants=free:type,paid:type
here type
is the dimension
PHP Android CLI is currently using default values for latest Android. These are:
OPTIONS | Usage | DEFAULT |
---|---|---|
--compileSdk /-cs |
set targetSdk |
29 |
--buildTools /-bt |
set buildToolsVersion |
29.0.1 |
--minSdk /-ms |
set minSdk |
16 |
--targetSdk /-ts |
set maxSdk |
29 |
--androidX /-x |
Enable/Disable AndroidX | true |
--jetifier /-j |
Enable/Disable Jetifier | true |
Use --force
to re-write existing project.
MIT
Free Software, Hell Yeah!