-
Notifications
You must be signed in to change notification settings - Fork 80
Build and Usage
- WizarDroid's Maven Dependency
- Build from source with Gradle
- Include WizarDroid as a sub Gradle module
- Download pre-compiled binary
WizarDroid build is done via Gradle. As of Google I/O 2013, Android has a new build system mechanism via Gradle, replacing Ant/Maven.
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'
}
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...)
- Download and install Gradle 1.7+
- Download and install Maven 3+ (Not sure if this is needed)
- Configure ANDROID_HOME environment variable
- 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.
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 the pre-compiled WizarDroid AAR from SourceForge.