Modify bootclasspath in compiler args

(twistedgaspar) #1

I’m currently trying to figure out how to add additional dependency to my bootclasspath while using the “”.

I have this:

allprojects {
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << '-bootclasspath /home/test/custom-android.jar'

I’m getting this: invalid flag: -bootclasspath /home/test/custom-android.jar

any ideas of how to resolve this issue?

(Gary Hale) #2

Shouldn’t the option be “-Xbootclasspath/a:/home/test/custom-android.jar”?

(twistedgaspar) #3

It is correct, this way i won’t be gettin invalid flag error. But the original bootclasspath which is generated & attached by android-gradle plugin is still there. I need a way to remove the default bootClasspath parameter and use my own. Any ideas?

(Gary Hale) #4

Just remove the “/a” i.e. “-Xbootclasspath:/home/test/custom-android.jar”. If you run “java -X” it will show you the various options for configuring the bootclasspath.

(twistedgaspar) #5

OK, it works i had to preapend the bootclasspath. Thanks.