Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 3.46 KB

File metadata and controls

101 lines (68 loc) · 3.46 KB

HACKING

This guide assumes you have already downloaded and installed the Android SDK, in to a directory referred to as $SDK.

Subscribe to the android-squeezer group

There's a mailing list, android-squeezer@googlegroups.com.

To subscribe, go to the web interface.

Say "Hi", and if you're interested in working on any specific features, we'd love to hear from you.

Fetch the code

Follow GitHub's instructions for forking the repository.

Checkout the code

We (roughly) follow the branching model laid out in the A successful Git branching model blog post.

Specifically:

  • The master branch is generally kept pristine. No development work happens here.

  • The develop branch is for small bug fixes or other cleanups that need no more than a single commit to complete.

  • All other work happens on separate branches, branched from develop.

  • When those branches are complete and ready for release they are merged on develop.

  • New releases are prepared by creating a release branch from develop and working there, before merging changes from the release back to develop and master.

Starting work

Suppose you want to start work on contributing a new feature. After fetching the repository checkout a new local branch from develop with:

git checkout -b new-branch-name develop

Then work on new-branch-name, pushing it up to GitHub as appropriate. Feel free to have discussions on the mailing list as you're working.

Keeping up to date with develop

As you're working other changes may be happening on the origin develop branch. Please use git rebase to pull in changes from develop to ensure your branch is up to date and that the future merge back in to develop is straightforward. To do that (assuming you have no open changes on your current branch):

git checkout develop  # Checkout the develop branch
git pull              # Fetch the most recent code
git checkout -        # Checkout the previous branch
git rebase develop    # Rebase current branch from develop

Android Studio configuration

  • Install the Android Build Tools revision 17.0.0 if not already installed.

    Run $SDK/tools/android and select "Android SDK Build-tools",

  • Run Android Studio

  • If you have no projects open then choose "Import project" from the dialog that appears.

    If you already have a project open then choose File > Import Project...

  • In the "Select File or Directory to Import" dialog that appears, navigate to the directory that you fetched the Squeezer source code in to and select the build.gradle file that ships with Squeezer.

  • In the "Import Project from Gradle" dialog tick "Use auto-import" and make sure that "Use gradle wrapper (recommended)" is selected.

  • Copy ide/intellij/codestyles/AndroidStyle.xml to Android Studio's config directory.

    • Linux: ~/.AndroidStudioPreview/config/codestyles
    • OS X: ~/Library/Preferences/AndroidStudioPreview/codestyles
    • Windows: ~/.AndroidStudioPreview/config/codestyles
  • Go to Settings (or Preferences in Mac OS X) > Code Style > Java, select "AndroidStyle", as well as Code Style > XML and select "AndroidStyle".