Skip to content

Instantly share code, notes, and snippets.

@kikoso
Created May 16, 2014 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kikoso/0f0047d401fef612a40f to your computer and use it in GitHub Desktop.
Save kikoso/0f0047d401fef612a40f to your computer and use it in GitHub Desktop.
apply plugin: 'android-library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
repositories {
mavenCentral()
}
project.gradle.taskGraph.whenReady {
connectedAndroidTestRacDebug {
ignoreFailures = true
}
}
check.dependsOn('connectedCheck')
android {
compileSdkVersion "Google Inc.:Google APIs:17"
buildToolsVersion "19.0.3"
defaultPublishConfig "coreRelease"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
}
// This is important, it will run lint checks but won't abort build
lintOptions {
abortOnError false
}
productFlavors {
core
rac {
}
drivenow
}
packagingOptions {
exclude 'LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
sourceSets {
testLocal {
java.srcDir file('androidTest/java/')
resources.srcDir file('src/test/res')
}
}
dependencies {
androidTestCompile 'org.hamcrest:hamcrest-core:1.3'
androidTestCompile 'org.mockito:mockito-core:1.9.5'
androidTestCompile 'com.google.dexmaker:dexmaker:1.0'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
//testLocalCompile 'junit:junit:4.10'
// Google Play Services
compile 'com.google.android.gms:play-services:4.3.23'
compile 'com.android.support:support-v4:19.1.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile files('libs/android-async-http-1.4.5-experimental.jar')
compile 'com.google.maps.android:android-maps-utils:0.3.1'
compile 'com.github.chrisbanes.photoview:library:1.2.2'
compile files('libs/gson-2.2.3.jar')
compile files('libs/guice-3.0-no_aop.jar')
compile files('libs/httpmime-4.1.2.jar')
compile files('libs/javax.inject.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile 'org.projectlombok:lombok:1.12.4'
compile files('libs/osmdroid-android-3.0.10.jar')
compile('org.roboguice:roboguice:2.0') {
exclude module: 'guice'
transitive = true
}
compile files('libs/slf4j-api-1.7.5.jar')
compile files('libs/slf4j-jcl-1.7.5.jar')
compile files('libs/sugar-1.2.jar')
compile files('libs/universal-image-loader-1.9.1-with-sources.jar')
compile ('com.squareup.retrofit:retrofit:1.4.1') {
exclude module: 'gson'
}
compile ('com.octo.android.robospice:robospice:1.4.11') {
exclude module: 'gson'
}
compile ('com.octo.android.robospice:robospice-retrofit:1.4.11') {
exclude module: 'gson'
}
}
task localTest(type: Test, dependsOn: assemble) {
testClassesDir = sourceSets.testLocal.output.classesDir
android.sourceSets.main.java.srcDirs.each { dir ->
def buildDir = dir.getAbsolutePath().split('/')
buildDir = (buildDir[0..(buildDir.length - 4)] + ['build', 'classes', 'debug']).join('/')
sourceSets.testLocal.compileClasspath += files(buildDir)
sourceSets.testLocal.runtimeClasspath += files(buildDir)
}
classpath = sourceSets.testLocal.runtimeClasspath
}
check.dependsOn localTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment