mtedone / podam

PODAM - POjo DAta Mocker
https://mtedone.github.io/podam
MIT License
323 stars 750 forks source link

Android project does not compile when podam lib is included #192

Closed miguelbcr closed 8 years ago

miguelbcr commented 8 years ago

Hi! I've been trying to use podam in a new project, but it has not been successful. When in a new Android project I include in gradle:

compile 'uk.co.jemos.podam:podam:6.0.2.RELEASE'

it does not compile and shows this output many times (about 58 times)

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(org.springframework.cglib.beans.BeanMapEmitter$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(org.springframework.cglib.core.AbstractClassGenerator$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(org.springframework.cglib.core.ClassEmitter$2) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class.

Is this library suitable for Android projects?

Thanks!

daivanov commented 8 years ago

Hi,

If you use podam for testing it should be just fine. But inclusion podam version later than 5.4.1 into production code brings Spring as a dependency and this is definitely not good for mobile application.

Regarding exact error I would say you have some issue with gradle build configuration.

Thanks, Daniil

miguelbcr commented 8 years ago

Ok, thank you!