Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Groovy on Android

With the advent of ASMDEX (ASM for dex files) and dexmaker, shouldn't it be possible to port Groovy to Android? Both frameworks allow the generation of dex bytecode at runtime.

As I understand it, it is impossible to modify dex classes from the APK in memory. But wouldn't it be possible to copy those classes to writable memory, modify those copies at runtime and use them?

What else needs to be ported to handle dex class files? CGLIB?

like image 857
Dirk Jäckel Avatar asked May 27 '12 21:05

Dirk Jäckel


1 Answers

The original porting project is named discobot then some guys made a new project called discobot2 Afaik the first project had no runtime transformation of classes, but was able to run first Groovy programs on Android, with a very slow startup time. As for the second project the last to me known state is that they solved most issues and are now translating classes at runtime. But I never tried it out.

Update: since Groovy 2.4 a third version to run Groovy on Android is possible

like image 68
blackdrag Avatar answered Oct 04 '22 21:10

blackdrag