Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Build and Usage

Nimrod Dayan edited this page Sep 11, 2013 · 31 revisions

WizarDroid build is done via Gradle. As of Google I/O 2013, Android has a new build system mechanism via Gradle, replacing Ant/Maven.

WizarDroid on Maven Central Repository

Gradle

If you are already using Gradle to build your project then this is going to be very easy. Just include the following in your project's build.gradle and WizarDroid library will be downloaded automatically from Maven Central repository.

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.codepond.android.wizardroid:wizardroid-core:1.0.0'
}

Maven

Unfortunately, there is no easy way to include WizarDroid dependency in pom.xml without some manual work beforehand. Since WizarDroid uses the latest support-library-v4 r18 which is not available in Maven Central Repository. (Tutorial coming soon...)

Build from source with Gradle

Prerequisites

  1. Download and install Gradle 1.7+
  2. Download and install Maven 3+ (Not sure if this is needed)
  3. Configure ANDROID_HOME environment variable
  4. Install Android Support Repository in Android SDK Manager

Run gradle assemble from the project's root folder.

This will build the library in .aar format and then place it in wizardroid-core/build/libs. You can then copy it from there to your project's libs folder and reference it from your project.

Including WizarDroid as a sub Gradle module

You can include wizardroid-core folder as a sub-module of your project. See Google's tutorial if you are unfamiliar with how to set up a multi-module Gradle project.

First, make sure you fulfil the prerequisites. Then, there are 3 files which you need to modify to look like these:

project-root-dir/settings.gradle:

include ':wizardroid-core'
include ':app-dir'

project-root-dir/build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}

allprojects {
    version = "1.0.0"
    group = "com.example"
}

subprojects {
    repositories {
        mavenCentral()
    }
}

project-root-dir/app-dir/build.gradle:

apply plugin: 'android'

android {
    compileSdkVersion 18
    buildToolsVersion "18.0.1"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 18
    }
}

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    compile project(':wizardroid-core')
}

NOTE: WizarDroid depends on support-library-v4 r18. In order to successfully built WizarDroid, you have to install 'Android Support Repository' in Android SDK Manager.

Download pre-compiled binary

Download the pre-compiled WizarDroid AAR from SourceForge.