Skip to content

Instantly share code, notes, and snippets.

@rundis
Created February 18, 2013 18:43
Show Gist options
  • Save rundis/4979604 to your computer and use it in GitHub Desktop.
Save rundis/4979604 to your computer and use it in GitHub Desktop.
Sample workaround to get (troublesome ? ) classes into the gradle buildscript classpath
// what i want
// buildscript { classpath 'com.oracle:ojdbc6:11.2.0.2.0' }
configurations {
gradleRuntime {transitive = false}
}
dependencies {
gradleRuntime 'com.oracle:ojdbc6:11.2.0.2.0'
}
URLClassLoader loader = GroovyObject.class.classLoader
configurations.gradleRuntime.each { File file ->
loader.addURL(file.toURL())
logger.info "Added jar to gradle runtime: $file"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment