Modify bootclasspath in compiler args

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?

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

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?

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.

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