Using the following versions we run into an error with the less compiler:
Grails: 6.2.0
Groovy: 3.0.21
Gradle: 7.6.4
Java: 17
When running the application locally the asset compilation using the standard less compiler failed with the following exception for each less asset:
Failed to open file JavaException: groovy.lang.MissingPropertyException: No such property: connected for class: asset.pipeline.utils.AssetConnection
failed to open file asset:/path/to/asset.less JavaException: groovy.lang.MissingPropertyException: No such property: connected for class: asset.pipeline.utils.AssetConnection
The reason is the call of AssetConnection#connect which sets the connected property of its parent class java.net.URLConnection. As this property is protected and the classes are not in the same namespace, this modification is not allowed.
Using the following versions we run into an error with the less compiler:
When running the application locally the asset compilation using the standard less compiler failed with the following exception for each less asset:
The reason is the call of
AssetConnection#connect
which sets theconnected
property of its parent classjava.net.URLConnection
. As this property isprotected
and the classes are not in the same namespace, this modification is not allowed.I got the idea for the fix from Creating a Custom URL Connection
buildSrc/build.gradle
build.gradle
buildSrc/build.gradle