1

I'm building a Java Micro Edition (ME) application which comes with it's own standard library (Cinterion Mobility Toolkit). When compiling my application class files with Gradle, I would like to replace JDK standard library with my own set of JAR files.

Most likely I'll have to write a custom Gradle plugin (extending Gradle Java plugin) but any suggestion is welcome.

P.S. There is a similar question How to remove the java standard library from a gradle project? - but that is also missing an answer.

Neeme Praks
  • 8,956
  • 5
  • 47
  • 47

1 Answers1

0

Adding the following snipped did the trick:

compileJava {
  options.bootstrapClasspath = fileTree("/path/to/cinterion/wtk/home") {
    include 'lib/*.jar'
    include 'resources/*.jar'
  }
}

Obviously, replace "/path/to/cinterion/wtk/home" with your own path.

Neeme Praks
  • 8,956
  • 5
  • 47
  • 47