dimanche 29 mars 2015

Android Studio Gradle 1.1 and Roboeletric

i'm having a hard time to make AS with gradle 1.1 work with Roboeletric. I've readed a few tutorials e try some things but none seen to work.


This is my Project build.gradle file:



buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}


The robo eletric got download and all and here is my module build.gradle:



android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "br.com.boozeprice"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

apply plugin: 'org.robolectric'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'

compile project(':androidcore')
compile project(':persistencecore')

testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:2.4'
}


The gradle compiles and all but it seens that i don't have the library in project, i can't import the roboeletric classes neither their annotations.


Am i missing something?


Thank you in advance.


Aucun commentaire:

Enregistrer un commentaire