Skip to content

Instantly share code, notes, and snippets.

@jackgris
Last active December 30, 2015 06:49
Show Gist options
  • Save jackgris/7792325 to your computer and use it in GitHub Desktop.
Save jackgris/7792325 to your computer and use it in GitHub Desktop.
Gradle configuration file, for projects in Android Studio: Frameworks: * Guava * JUnit * Robolectric * ActionBarSherlock * GreenDao src/test : this folder is for the tests with Robolectric and JUnit src/src-gen: this folder is for manage the project for greenDao Remember for run the tests, on the folder of the project: gradlew test
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
}
}
apply plugin: 'android'
apply plugin: 'android-test'
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
}
buildTypes {
release {
runProguard true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
}
}
productFlavors {
defaultFlavor {
proguardFile 'proguard-rules.txt'
}
}
sourceSets {
main {
java.srcDirs = ['src/main/java', 'src-gen/main/java']
}
instrumentTest.setRoot('src/test')
}
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:18.0.+'
compile 'de.greenrobot:greendao:1.3.7'
compile group: 'com.google.guava', name: 'guava', version: '15.0'
testCompile 'junit:junit:4.10'
testCompile 'org.robolectric:robolectric:2.1.+'
testCompile 'com.squareup:fest-android:1.0.+'
instrumentTestCompile 'junit:junit:4.10'
instrumentTestCompile 'org.robolectric:robolectric:2.1.+'
instrumentTestCompile 'com.squareup:fest-android:1.0.+'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment