square / assertj-android

A set of AssertJ helpers geared toward testing Android.
https://square.github.io/assertj-android/
Apache License 2.0
1.58k stars 156 forks source link

Error since the new com.android.tools.build:gradle #99

Closed bmonjoie closed 10 years ago

bmonjoie commented 10 years ago

Hello,

I'm using fest-android for my unit testing and I first would like to thank you for your great job. Yet, I'm encountering an error since I have updated Android's gradle tool to version 0.12. Here is the error message : Module version com.squareup:fest-android:1.0.8 depends on libraries but is not a library itself.

That would be great if you could fix this issue.

Thank you very much.

Best regards

f2prateek commented 10 years ago

You can work around this by specifying the packaging type : compile 'com.squareup:fest-android:1.0.8@aar

bmonjoie commented 10 years ago

Thank you for your quick reply, I have added the @aar at the end of the line and now gradle doesn't complain about this anymore.

Nevertheless, it didn't fix my problem as it now cannot find my import (which was "import static org.fest.assertions.api.Assertions.assertThat;") but find this import : "import static org.fest.assertions.api.ANDROID.assertThat;" which has implementation only for Android Object and not for regular Object.

I'm sorry if I'm missing something obvious here but I cannot figure out what I'm doing wrong.

bmonjoie commented 10 years ago

Using the following lines has solved my problem :

androidTestCompile ('com.squareup:fest-android:1.0.+') {
    exclude group: 'com.android.support', module: 'support-v4'
}