/android-cli

🎀 The Android Command Line Utility

Primary LanguageTypeScript

AndroidCLI

Join Gitter chat Build Status npm Version

CLI for android applications

Installation

$npm install android-cli -global

Usage

$acli --help

Options

-h, --help                     output usage information
-V, --version                  output the version number
-g, --generate [name]          generate component (e.g activity, fragment etc..)
-p, --permission   add uses-permission to manifest file(e.g INTERNET)
-d, --dependency   add dependency to build.gradle and sync gradle

Generate

Generate component (e.g activity, fragment etc..)

You can find all possible blueprints in the table below

Scaffold Usage
Activity acli -g activity my-new-activity
Fragment acli -g fragment my-new-fragment
LoginActivity acli -g login-acitivty my-new-login-activity
TabbedActivity acli -g tabbed-acitivty my-tabbed-activity
FullScreenActivity acli -g fullscreen-activity my-fullscreen-activity
ScrollingActivity acli -g scrolling-acitivty my-scrolling-activity

If you contribute for other blueprints, please PR to this repository

Result Example

Successful generated activity [ACTIVITY_NAME]Activity.java!
Successful generated activity layout file activity_[ACTIVITY_NAME].xml!

Permission

add uses-permission to manifest file(e.g INTERNET)

Permission Usage
INTERNET acli -p INTERNET

Result Example

Successful adding permission

Dependency (In Progress)

add dependency to build.gradle and sync gradle

$acli -d "com.android.support:cardview-v7:+"

Result Example

Successful adding Dependency
Syncing gradle.. <run ./gradlew build>

Milestone

Milestone of this project

  • Get packages at java src path by work module
  • Parse AndroidManifest.xml and for add permission
  • Connect travis.ci to stick green passing image-!
  • Deploy this project to NPM (Node Package Manager)