Use flysystem adapter
https://github.com/nao-pon/flysystem-google-drive
as suggested by @Hemant-Mann here https://github.com/owncloud/files_external_gdrive/issues/2#issuecomment-313859029
@Hemant-Mann that could be a good idea, yes. My original concern was that it would take a while to do the port but then if it anyway would take a lot of time to port to the new SDK, then the move to flysystem could be worthwhile, assuming that the adapter is being maintained.
The Adapter is available on composer with support for both v2 and v3 API so I think it's currently maintained. We can clarify further with the developer if needed by creating an issue
@Hemant-Mann as someone who ported Dropbox to the flysystem adapter, how much time do you think it would take to do the same for the GDrive implementation ? Note that GDrive has a few twists like allowing multiple files with the same name to exist within the same folder... and Google Docs must use an export API to be downloaded... so likely more work than for Dropbox.
@PVince81 Yes I think GDrive implementation would require some more time compared to Dropbox because of the twists you mentioned. The current stable 10 implementation also checks for duplicate filenames Storage/Google.php. I think downloading should not be much of an issue if user has sufficient permissions to download the file, according to the docs https://developers.google.com/drive/v3/web/manage-downloads export API are provided by the SDK itself :)
I won't have time to do this myself, so unless you have some time to do it after your Dropbox port, I'd leave this aside and focus on making this GDrive repo mirror whatever we had in core before, with minor changes to make it work with your oauth2 event changes.
This will also bring Team Drive Support https://github.com/nao-pon/flysystem-google-drive/blob/master/src/GoogleDriveAdapter.php Users who have their data in team drive, can't access the data with our current implementation.
Okay so do we have any plan on updating the app?
I think the major task is the verification i.e working of app, if we have proper tests setup then this app can be easily converted to use the flysystem implementation