it's not there yet but someone is working on it. I will make it's documented once it's out.
On Sun, Jun 5, 2016 at 6:46 AM, Ariel Cattan <ar...@safedk.com> wrote: > Hi Jerome, > > Is it possible to do Dex transformations using the transform API in Gradle > plugin 2.2.0-alpha2 ? If yes - is there any documentation for it? And if > not - is it still planned for 2.2.0? > > Thanks :) > Ariel > > On Tuesday, April 12, 2016 at 9:51:34 AM UTC+3, Ariel Cattan wrote: >> >> That's excellent news! Thanks!! >> Ariel >> >> On Monday, April 11, 2016 at 11:50:40 PM UTC+3, Jerome Dochez wrote: >>> >>> got it. yes this is relatively easy, we should add it in 2.2 timeframe. >>> >>> https://code.google.com/p/android/issues/detail?id=206504 >>> >>> Jerome >>> >>> On Mon, Apr 11, 2016 at 1:35 PM Ariel Cattan <ar...@safedk.com> wrote: >>> >>>> Hi Jerome, >>>> >>>> Actually we are already doing very extensive dex transformations today. >>>> We found we had much more control with dex transformations, and in fact >>>> switched our entire solution to be based on dex transformations. >>>> Today our Gradle plugin finds its way through the various Android >>>> plugin tasks, takes the output of the dex task, does the transformations, >>>> and then adjusts the inputs of the packaging task so that it uses our >>>> instrumented dex files instead of the original ones. We are doing it with >>>> Android plugins below version 1.5.0, as well as above. However, since >>>> these are not official APIs, we have to "chase" you guys with every release >>>> :-) >>>> That's why we are striving to have an official, stable API that will >>>> allow us to do that. >>>> Using the Jack API may be interesting, depending on what capabilities >>>> it will expose. However since we're already heavily invested in dex >>>> instrumentation, it will be better for us to just be able to get the dex >>>> files as an input to a transform, and output back instrumented dex files. >>>> Wouldn't it be relatively easy for you to support such a path, using >>>> the transform API? >>>> >>>> Thanks! >>>> Ariel >>>> >>>> >>>> On Monday, April 11, 2016 at 10:41:31 PM UTC+3, Jerome Dochez wrote: >>>> >>>>> Hi Ariel >>>>> >>>>> I think this discussion can go into different directions. >>>>> >>>>> - we might at some point give access to transforms that manipulate dex >>>>> files but the question remain, how do you plan to do the actual >>>>> transformation ? asm-dex seems to not be complete for instance. >>>>> >>>>> - we will keep a path (even with jack enabled) where javac will be >>>>> used to compile java code into .class files and bytecode manipulation will >>>>> still be possible before the .class files are reinjected into the jack >>>>> pipeline (which will be how instant-run+jack will be implemented >>>>> initially). >>>>> >>>>> - Jack will also provide an API (based on ECJ) to register jack native >>>>> bytecode enhancement that will allow you to do byte code manipulation as >>>>> well (although constructs will be at a higher level obviously). This might >>>>> be how instant-run will evolve. >>>>> >>>>> which path would you rather take ? >>>>> >>>>> On Mon, Apr 11, 2016 at 6:26 AM Ariel Cattan <ar...@safedk.com> wrote: >>>>> >>>> Hi, >>>>>> >>>>>> At the initial stages of the Transform API there seemed to be a way >>>>>> to add a Dex transformation, but this was taken away. >>>>>> We are seeking for official/safe ways to instrument Dex files. It >>>>>> became important when Jack was introduced (as Java bytecode >>>>>> instrumentation >>>>>> is not possible with Jack), and now with Instant Run it is again very >>>>>> relevant. We would like to have the build system call our plugin in order >>>>>> to transform each Dex file being created, so that we could instrument it. >>>>>> With Instant Run, for example, once a new small Dex is created - if we >>>>>> could have a transform being called and handed this changed file - we >>>>>> could >>>>>> instrument it on-the-fly, as part of the instant run build. >>>>>> Is there a way to do it today, or plans to support such functionality >>>>>> in the future? >>>>>> >>>>>> Thanks! >>>>>> Ariel Cattan >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "adt-dev" group. >>>>>> >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>>> an email to adt-dev+u...@googlegroups.com. >>>>> >>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "adt-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to adt-dev+u...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "adt-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to adt-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.