Fix gradle build issue during spotlessCheck (#1521)
This commit is contained in:
1 parent
1ba54f11a9
commit
2e0b4a3a97
1 file changed
+2
-1
@@ -42,7 +42,8 @@ class PklFormatterFunc(@Transient private val configuration: Configuration) :
|
||||
|
||||
private val classLoader by lazy {
|
||||
val urls = configuration.files.map { it.toURI().toURL() }
|
||||
URLClassLoader(urls.toTypedArray())
|
||||
// Use the platform classloader as parent to isolate from Gradle's classloader
|
||||
URLClassLoader(urls.toTypedArray(), ClassLoader.getPlatformClassLoader())
|
||||
}
|
||||
|
||||
private val formatterClass by lazy { classLoader.loadClass("org.pkl.formatter.Formatter") }
|
||||
|
||||
Reference in new issue
Block a user