dev.monosoul.jooq.util.CodegenClasspathAwareClassLoaders.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jooq-gradle-plugin Show documentation
Show all versions of jooq-gradle-plugin Show documentation
Generates jOOQ classes using dockerized database
The newest version!
package dev.monosoul.jooq.util
import org.gradle.api.file.FileCollection
import java.net.URLClassLoader
internal class CodegenClasspathAwareClassLoaders(
val buildscriptExclusive: URLClassLoader,
val buildscriptInclusive: URLClassLoader,
) {
companion object {
fun from(classpath: FileCollection) =
classpath
.map {
it.toURI().toURL()
}.toTypedArray()
.let {
CodegenClasspathAwareClassLoaders(
buildscriptExclusive = URLClassLoader(it),
buildscriptInclusive = URLClassLoader(it, CodegenClasspathAwareClassLoaders::class.java.classLoader),
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy