-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom SqlDriver #4806
Allow custom SqlDriver #4806
Conversation
@hbmartin: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
👷 Deploy request for apollo-android-docs pending review.Visit the deploys page to approve it
|
@@ -49,13 +49,13 @@ kotlin { | |||
|
|||
findByName("jvmMain")?.apply { | |||
dependencies { | |||
implementation(golatac.lib("sqldelight.jvm")) | |||
api(golatac.lib("sqldelight.jvm")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try adding api("app.cash.sqldelight:runtime")
to the commonMain
source set instead of each individual platform? SqlDriver
is in the runtime
artifact (which is added automatically by the plugin) so there should be no need to leak other things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinbonnin Done! Used the version catalog + golatac for the reference, does that work?
re: incubating, I think it makes sense? Happy to put it wherever you think best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, looks good 👍 . FWIW, the golatac stuff is a workaround for gradle/gradle#22095. We've seen some tasks being rerun due to version catalog accessors. Maybe it's better in newer versions of Gradle, I'll double check.
Re: incubating, incubating is easier for me because the API is still experimental so we can change it more easily. Let's start with this and if people ask for it in the main artifact, I'll backport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this! Just a quick note that this in the incubating artifacts and not the regular ones. I'm assuming you're ok with this?
* Allow custom SqlDriver * expose api sqldelight runtime only --------- Co-authored-by: Harold Martin <harold@theworkingname.com>
Implementation for discussion at #4504
Publicly exposes
SqlNormalizedCacheFactory
constructors which take aSqlDriver
argument.