Skip to content

Instantly share code, notes, and snippets.

@nekocode
Last active October 25, 2018 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nekocode/2e470440f85bc0b19156881fe7ada2c0 to your computer and use it in GitHub Desktop.
Save nekocode/2e470440f85bc0b19156881fe7ada2c0 to your computer and use it in GitHub Desktop.
def classpathConfig = project.configurations.maybeCreate("gradleClasspath")
project.dependencies {
gradleClasspath "org.xerial:sqlite-jdbc:3.25.2"
}
def classloader = Thread.currentThread().contextClassLoader as URLClassLoader
classpathConfig.each {
classloader.addURL(it.toURI().toURL())
}
project.configurations.remove(classpathConfig)
// Now you can use classes insdie the 'sqlite-jdbc' library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment