I am trying to incorporate Houndify API into my project. However my gradle file would not build.
I downloaded a sample project from their site and it worked normally. I am migrating codes from that project gradle file to mine.
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "edu.drexel.cs.ptn32.pennapps"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("debug.keystore")
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
repositories {
maven {
// The username and password for this repo is set below
url 'https://houndify.com/maven/'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile ('hound.android:hound-sdk:0.2.15@aar'){
transitive=true
}
compile ('hound.android:phrasespotter:1.4.0'){
transitive=true
}
}
setHoundifyMavenCredentials("user", "pw")
def setHoundifyMavenCredentials(username, password) {
for (repo in repositories) {
if (repo.properties.url.toString().equals("https://houndify.com/maven/")) {
repo.properties.credentials.username = username
repo.properties.credentials.password = password
}
}
}