Skip to content

VincentAuguin/android-project-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Helper Project (APH)

This CLI aims to help you wrapping up your Android project quickly.

asciicast

Installation (MacOs/Linux only)

Homebrew

brew tap vincentauguin/cli
brew install aph

Manually

Download the latest release of this repository and unzip the archive:

tar -xf aph.tar.gz
chmod +x ./aph
cp aph /usr/local/bash # or whatever directory in your $PATH

Usage

Create project

You need to have the env variable ANDROID_SDK_ROOT set, if not:

# ZSH
echo 'export ANDROID_SDK_ROOT=path/to/sdk/location' >> ~/.zshenv && source ~/.zshenv
# Bash
echo 'export ANDROID_SDK_ROOT=path/to/sdk/location' >> ~/.bash_profile && source ~/.bash_profile

Then, to create a project:

aph create \
    --package-name=com.example.app
    --min-sdk-version=26 \
    "My awesome Android project" \
    /path/to/location

Add module

To add a new module to an existing project:

aph add:module /path/to/android/project

Add CI solution

To build and deploy your app with automated CI:

aph add:ci

See the current supported solutions in Roadmap section.

Help

To get full available commands and options

aph help

Roadmap

  • help command
  • create command to initiate an Android app skeleton
  • add:module command to add a module to an existing Android project
  • add:ci command to add preformated CI solution:
    • Gitlab CI/CD
    • Github Actions
    • Jenkins
    • Bitrise.io
    • Buddy.works

Contributing

Feel free to contribute with pull requests 😎

Develop from sources

# Binary dependencies
brew install [email protected] gradle
# Python dependencies
pip3 install jinja2 inquirer docopt
# Run from source
python3 aph.py <command>

Bundle it

# Install pyinstaller to bundle our python app
pip3 install pyinstaller
# Bundle it
pyinstaller \
--add-data add_ci/templates:add_ci/templates \
--add-data create/templates:create/templates \
--add-data add_module/templates:add_module/templates \
--target-architecture universal2 \
--onefile aph.py
# Test the generated bundle
cd dist
./aph <command>

Distribute it

Create a Tag according to SemVer X.Y.Z and create the associated Release on this repository. Upload the archived binary:

tar -czvf aph.tar.gz aph

Get the SHA-256 signature to update homebrew formula:

shasum -a 256 aph.tar.gz