One jar library for Android and Java (One compiled library for both)

127 Views Asked by At

I'm writing a Java library that uses some classes available in Android and other in AWT (Like android Bitmap and JWT BufferedImage). I use these classes internally (None of them public).

Now I want both of them to be in same jar (I added checking (If Android or not) before calling any of these specific classes).

I tried it and it works fine.

Now the question, Is this safe, or there might be any problem that will face the users of this library when using it in their apps (Java or Android)?

0

There are 0 best solutions below