I’m very new in gradle. Could someone help to to solve my question? Thanks a lot in advance. Below is my question:
I’ve download the gradle source code and need to add some codes in it.
Ex: I may need to add “command.add(”-X");" in AndroidBuilder.java which is located in /home/xxxxx/gradle/build/builder/src/main/java/com/android/builder
in the gradle source code.
However, I don’t know how to re-compile the AndroidBuilder.java after adding special code. Could someone give me some directions? Thanks a lot.
This doesn’t quite make sense as a thing to do. Doing something like this means you’ll have to maintain your own version of the Android SDK and this isn’t something you want to do.
I suggest asking for help on the ADT Google Group. You are also likely to get better help if you explain your problem to them instead of your desired solution.
You will have to checkout the Android SDK source code, make your changes, build the binaries, push the binaries to somewhere where your project can find them, configure your project to use this custom build.
I think I may misunderstand somthing on your comment. Coudl you please give me some directions again? Thanks a lot.
The detailed question is :
(1)I’ve done build one android project using “gradle assemble --debug” command. (2)From the build log, I found I need to add one flag during the compilation. (3)After downloading the gradle source code from http://www.gradle.org/downloads (gradle-1.6-all.zip), I found the flag can be added in AndroidBuilder.java which is located in gradle-1.6-all directory, instead of the android sdk directory. (4)I need to find ways to re-compile AndroidBuilder.java for custom build. (5)If my thoughts are incorrect, please correct me.
5 is the case. You are going the very long and painful way about this.
I suggest asking for help on the ADT Google Group. You are also likely to get better help if you explain your problem to them instead of your desired solution.