Skip to content

Create Android-Studio gradle project from CLI with PHP... (created for personal use)

License

Notifications You must be signed in to change notification settings

AnandPilania/php-android-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Android CLI

Hits

PHP Android CLI create/generate Scaffold Android-Studio Gradle project with:

  • Java or Kotlin language,
  • legacy or standard package
  • Modules (application/library)
  • Variants with Dimensions
  • Scaffold project & application/library level build.gradle with package name & dimensions & variants
  • Manage settings.gradle
  • Generate manifest file & res with default icon, color, style & values
  • ...

New Features!

  • Language select java or kotlin
  • Version legacy or standard

Removed!

  • androidX selection,
  • jetifier selection,

You can also:

  • set targetSdk
  • set buildToolsVersion
  • set minSdk & maxSdk
  • JAVA or KOTLIN
  • legacy

Tech

PHP Android CLI uses:

And of course PHP Android CLI itself is open source with a public repository on GitHub.

Installation

PHP Android CLI requires PHP v5+ to run.

Just download the phpandroid and start scaffolding.

$ phpandroid create <PROJECT_NAME> <PACKAGE> [OPTIONS]

USAGE

Basic use

Create HelloWorld project with com.example.helloworld package name:

phpandroid create HelloWorld com.example.helloworld

Create Modules along with App

Create HelloWorld project with sdk library & admin application

phpandroid create HelloWorld com.example.helloworld --modules=sdk:library,admin

Create productVariants: free & paid variant

phpandroid create HelloWorld com.example.helloworld --variants=free:type,paid:type

here type is the dimension

Options

Default

PHP Android CLI is currently using default values for latest Android. These are:

OPTIONS Usage DEFAULT
--type/-t set type kotlin
--legacy/-l set legacy false
--compileSdk/-cs set targetSdk 31
--buildTools/-bt set buildToolsVersion 31.0.0
--minSdk/-ms set minSdk 21
--targetSdk/-ts set maxSdk 31

Use --force to re-write existing project.

Todos

  • Create/Scaffold activity
  • Create/Scaffold variants source
  • ...

License

MIT

Free Software, Hell Yeah!