Created
February 18, 2013 18:43
-
-
Save rundis/4979604 to your computer and use it in GitHub Desktop.
Sample workaround to get (troublesome ? ) classes into the gradle buildscript classpath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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