Giter Site home page Giter Site logo

asifurrouf / deckard-maven Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robolectric/deckard-maven

0.0 2.0 0.0 375 KB

A simple template project for test-driven Android development using Robolectric and Maven

License: The Unlicense

Shell 41.53% Java 58.47%

deckard-maven's Introduction

Deckard (for Maven)

Build Status

Deckard is the simplest possible Android project that uses Robolectric for testing and Maven to build. It has one Activity (with an empty layout), and a Robolectric test that creates that Activity.

Deckard also imports seamlessly into IntelliJ, due to IntelliJ's support for Maven. Just import the pom.xml.

Eclipse is also supported. Install the m2e-android plugin for Eclipse, and import the project as a Maven project. After importing into Eclipse, you have to mark the consume-aar goal as ignored, since aar consumption is not yet supported by m2e-android. To do this, simply apply the Quick fix on the "Plugin execution not covered by lifecycle configuration" error.

Setup

Note: These instructions assume you have a Java 1.6 JDK installed.

To start a new Android project:

  1. Install the Android SDK. On Mac OS X with Homebrew just run:

    brew install android-sdk
  2. Set your ANDROID_HOME environment variable to /usr/local/opt/android-sdk.

  3. Install Maven if you haven't already (run mvn to check). On OS X (as before) this is easiest with Homebrew:

    brew install maven
  4. Download Deckard from GitHub:

    wget https://github.com/robolectric/deckard-maven/archive/master.zip
    unzip master.zip
    mv deckard-maven-master my-new-project
  5. Run the setup script to install dependencies into Maven:

    my-new-project/setup.sh
  6. In the project directory you should be able to run the tests:

    cd my-new-project
    mvn clean test
  7. Optionally, import the project into IntelliJ (or Eclipse) by selecting 'Import Project' in IntelliJ and selecting the project's pom.xml. When prompted to pick an SDK you just need to select the Android SDK home and your JDK.

  8. Change the names of things from 'Deckard' to whatever is appropriate for your project. Package name, classes, and the AndroidManifest are good places to start.

  9. Build an app. Win.

deckard-maven's People

Contributors

avh4 avatar coreydowning avatar erd avatar gholker avatar mag avatar seadowg avatar wondercsabo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.