armanbilge / gcp4s

Cross-platform JVM/JS Google Cloud Platform integrations for fs2 and friends
Apache License 2.0
7 stars 2 forks source link

Discovery Plugin Changes for Scala 2.13 (and Google Drive) #139

Open bpholt opened 2 years ago

bpholt commented 2 years ago

As requested in https://github.com/armanbilge/gcp4s/issues/131#issuecomment-1150621614.

Originally, I copied the Discovery plugin stuff into a new project where I made these changes. In that project I was able to depend on a snapshot JAR built from topic/2.13, using CrossVersion.for2_13Use3. I couldn't find a way to get sbt to do that for a submodule, so this doesn't really here work as-is, but you get the gist of it.

Also FWIW, I'm pretty sure the FiniteDuration codecs in gcp4s.drive.model are not really going to work either—I'd be surprised if they actually represent the duration values in the same way Google does. They're only there to get things building for now, but if we wanted to actually include Drive, I would go figure out how those values actually need to be encoded/decoded.

armanbilge commented 2 years ago

Cool! I pushed some changes which I believe should make things more operational for you; please let me know if that works.

https://github.com/Dwolla/gcp4s/compare/drive-2.13...armanbilge:gcp4s:drive-2.13

Regarding the FiniteDuration codecs: ideally, they'd be a Google standard (one can hope!) in which case they could go into core. Otherwise, I guess we'll have to add a setting so additional imports can be added to Discovery-generated files.