Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SQLDelight Gradle plugin contains a lot of dependencies, including JUnit #3644

Closed
@aSemy

Description

@aSemy

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

image

Since the Gradle plugin uses the Gradle Worker API I suspect that shading isn't necessary. Instead, the plugin can

  1. create a resolvable configuration, called slqdelightWorkerRuntime or something
  2. Add the dependencies required by SQLDelight to run its Grade tasks as default dependencies
  3. In SqlDelightWorkerTask, set the classpath for the worker to use slqdelightWorkerRuntime
    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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions