Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Support #15

Closed
msgilligan opened this issue Jan 29, 2015 · 10 comments
Closed

Android Support #15

msgilligan opened this issue Jan 29, 2015 · 10 comments

Comments

@msgilligan
Copy link
Member

I'm interested in using the Java Money RI and these libraries in Android Apps. Is this possible using technologies like retrolambda?

Has anyone tried this?

What are the issues?

Note: I probably would have opened this issue in the RI repo, but issues aren't enabled there.

@keilw
Copy link
Member

keilw commented Jan 29, 2015

Not sure, interestingly compiling e.g. javamoney-lib against Java 7 still works despite the core API and Ri all using Lambdas and SE 8.

@msgilligan
Copy link
Member Author

I'm definitely most interested in API/RI on Android. Is there a place to create an Issue for the RI?

@keilw
Copy link
Member

keilw commented Jan 29, 2015

I'm afraid not. There is a currently empty "Backport" that would be a place for that.
https://github.com/JavaMoney/javamoney-api-bp Actually that's only the API, but implementations against the Java SE 8 API may not run on Android or SE 7, thus the Backport requires its own implementations, those should work on Android, too.

@msgilligan
Copy link
Member Author

Maybe it's best to look towards Joda Money for Android? Maybe I can implement my core currency classes on JDK 6 and then provide Joda Money and Java Money adapters -- if I can do what I need without extending any classes from one or the other. I'm still in the research/design phase so I'm just trying to learn the landscape.

@atsticks
Copy link
Member

My primary focus currently is bringing the JSR as a whole to an end. I
don't see capacity currently in doing the backport on top of that. But
given that we get the JSR final within one month or so, I could do the
backport to Java 7 during one of the next Hackergarten or so ;)

2015-01-29 23:46 GMT+01:00 Sean Gilligan notifications@github.com:

I'm definitely most interested in RI on Android. Is there a place to
create an Issue for the RI?


Reply to this email directly or view it on GitHub
#15 (comment)
.

Anatole Tresch
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon

Switzerland, Europe Zurich, GMT+1
Twitter: @atsticks
_Blogs: _http://javaremarkables.blogspot.ch/
http://javaremarkables.blogspot.ch/

Google: atsticksMobile +41-76 344 62 79

@msgilligan
Copy link
Member Author

@atsticks I understand your focus and don't want to distract you from finishing the JSR.

I'm just trying to understand the landscape and make the best choices for my current project. I'm looking to create some classes for digital currencies that can be used by exchanges. I would like those classes to be usable in Android apps. I would like to embrace JavaMoney as much as possible because it seems to be exactly what I need.

I need to read the spec more carefully and play with the implementation, but it looks like one issue for me is that I might want to have my classes extend javax.money.NumberValue. I suppose I can extend Number and have a conversion method, but if I could use the API JAR directly on Android, I could extend NumberValue which would be better.

Anyway, I need to do some further research and may code up some tests and examples. At that point, I'll be able to ask more intelligent questions. I may also be able to help with a backport.

@keilw
Copy link
Member

keilw commented Jan 30, 2015

Actually I just had a build job for shelter running against Java SE 7 and it no longer works. Build fails with "wrong JVM version" and you must compile against a Java 8 JDK. Meaning most of these JARs won't work unless the whole chain is backported;-|

@msgilligan
Copy link
Member Author

That makes sense. If the upstream JARs are built with 8, then that's going to break the build. We could try them with retrolambda and see what happens. But I've decided to start prototyping against the API using Java 8 (and Spock/Groovy 2.4) I need to create my own currency value classes and would like them to be as compatible with JSR 354 as possible. I need to map out my requirements more thoroughly.

Maybe I'll have to extend Number rather than NumberValue, but I need to actually prototype some code before I go much further. If NumberValue were an interface, I would have more flexibility, I think. But let me figure out exactly what I need and I'll get back to you guys.

@keilw
Copy link
Member

keilw commented Jan 30, 2015

If you use Groovy, I guess Andres (a dedicated Groovy enthusiast) might be interested in that, and as Anatole already mentioned the Hackergarten format he (Andres) was most involved in could be a good place to look into those (you seem Valley based, so one of the occasions it takes place there would be JavaOne;-)

@keilw
Copy link
Member

keilw commented Mar 8, 2015

I'd say this is more for the Shelter, please open a task there if you feel the topic deserves attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants