Closed
Description
Description
I was poking around, trying to figure out why I can't see the Gradle plugin's source code in IntelliJ #3642, when I saw that the JAR for the SQL contained a lot of dependencies that I guess have been shaded in
Since the Gradle plugin uses the Gradle Worker API I suspect that shading isn't necessary. Instead, the plugin can
- create a resolvable configuration, called
slqdelightWorkerRuntime
or something - Add the dependencies required by SQLDelight to run its Grade tasks as default dependencies
- In
SqlDelightWorkerTask
, set the classpath for the worker to useslqdelightWorkerRuntime
https://github.com/cashapp/sqldelight/blob/4a942a8f56761e6e7871384a3b6174f318aba75a/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/SqlDelightWorkerTask.kt#L21-L28
This has the benefit that the classpath will use idiomatic Gradle functionality, dependencies can be shared, and the dependencies can be configurable by users, if necessary. However, maybe I've missed something!
(I've created this issue as a 'feature' because none of the other options provided seemed to make sense)