Xavier, I implemented a work around for this problem. I'm going to see about figuring out how to submit it to AOSP, but I wanted to run it by you first.
Essentially there are 3 parts to my solution: 1) Write a small java application that will wrap access to the dx.jar file. This application expects a text file to be passed to it on the command-line instead of all the class paths. This program then reads the list of class paths from the file argument and sends that to the dex command instead. 2) Modify dx.bat to launch the new wrapper program. 3) Modify the ant build script so that it now passes this text file as the argument when running dx.bat The only potential problem I see is people using dx.bat in non-standard ways. I could make the wrapper program gracefully degrade by having it simply forward its call into the original dx.jar if it doesnt see an expected "list of classpaths" file type. I'm sure another approach I could take is adding this sort of functionality directly to dx.jar. I didn't know if this type of feature would be desired or not. On Tuesday, January 14, 2014 5:30:04 PM UTC-5, Xavier Ducrohet wrote: > > There is no solution at the moment. > > The fix for it is for the Gradle plugin to load dx.jar instead of running > it from the command line. > https://code.google.com/p/android/issues/detail?id=64821 > > > > > On Tue, Jan 14, 2014 at 2:11 PM, Justin Breitfeller > <[email protected]<javascript:> > > wrote: > >> All, >> >> One of our projects depends upon a large number of library projects >> (20+). Due to this, ANT will fail to dex our project because the list of >> jars is simply too long to be passed to dx.bat. Is there a way around this >> issue? As a temporary solution, we have simply moved these projects into >> our drives root directory to reduce the length of each jar's path but >> obviously that solution will not work forever. I'm sorry to say that I am >> not familiar enough with the *nix build tools to know if the same issue >> would exist there. >> >> Thanks, >> Justin >> >> -- >> 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 [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > http://developer.android.com | http://tools.android.com > > Please do not send me questions directly. Thanks! > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
