GSheetsPlus v10.0 – drive.file Support, Full Drive Compatibility and R8 Optimization
Hello everyone
I’m happy to announce GSheetsPlus v10.0
This version focuses mainly on:

Better Google Drive permission handling

Support for the restricted drive.file scope

Compatibility with full Google Drive access

R8 / ProGuard optimization for Android release builds

Better security for modern Android apps
The important point is that v10 does not remove full Drive access.
Instead, the library now supports two permission modes.

Recommended mode: drive.file
The default initializer now uses the more restricted Google Drive permission:
https://www.googleapis.com/auth/drive.file
Use:
GDrive.Initialize(Me, "GDrive")
This mode allows the application to work with files created by the app or files that the user has explicitly authorized for the app.
This is the recommended option for most new applications because it requests less access to the user's Google Drive.

Advantages:
Better privacy
Reduced permissions
Better aligned with Google's least-privilege model
Suitable for apps that only need to manage their own files
Easier to explain to users during authorization

Full Google Drive access is still supported
Some applications need to search or access arbitrary files already stored anywhere in the user's Google Drive.
For these applications, GSheetsPlus v10 still supports the full Drive scope:
https://www.googleapis.com/auth/drive
Use:
GDrive.Initialize2(Me, "GDrive")
This mode is useful when the application needs functionality such as:
Searching existing files by name
Searching existing folders by name
Accessing files that were not created by the application
Working with files outside the application's authorized file set
Managing more general Google Drive operations
So existing projects that really need full Drive access can continue using it.

Two permission modes
Restricted / recommended mode:
GDrive.Initialize(Me, "GDrive")
Uses:
https://www.googleapis.com/auth/drive.file
Full Drive mode:
GDrive.Initialize2(Me, "GDrive")
Uses:
https://www.googleapis.com/auth/drive
This way, each developer can choose the permission level required by the application.

Important difference when searching files
Using drive.file does not mean that Google Drive functionality is lost.
The application can still create, edit, upload, download and manage authorized files.

However, there is an important difference.
Functions that need to search arbitrary existing files or folders outside the application-authorized set may require full Drive access.
For example:
FindFileIDByName
FindFolderIDByName
If those functions need to search the user's entire Drive, initialize GDrive with:
GDrive.Initialize2(Me, "GDrive")

Application metadata support
Version 10 also includes support for application metadata using:
This helps identify files belonging to the application and can make it easier to recover those files later, including when the user works from another device.


Modern Google Authorization
GSheetsPlus continues using Google's modern authorization system based on:
The library handles:
Automatic authorization
Interactive authorization when required
Token retrieval
Token clearing
Account selection
Sign out
Authorization retries
Internet connection validation
The selected Drive scope is determined automatically by the initializer used.

R8 / ProGuard compatibility
Another important improvement in version 10 is better compatibility with Android optimized release builds.
GSheetsPlus internally uses JavaObject and Google Play Services classes that can be accessed dynamically.
When R8 optimization or obfuscation is enabled, some required classes or methods could otherwise be removed.
Version 10 includes its own:
with the required keep rules.
The configuration protects classes such as:
AuthorizationClient
SignInClient
AuthorizationRequest
AuthorizationResult
ClearTokenRequest
Scope
Task
and dynamically used methods such as:
authorize()
clearToken()
signOut()
getAuthorizationResultFromIntent()
isComplete()
isSuccessful()
getResult()
getException()
This improves compatibility with:
builds.

Debug and Release
GSheetsPlus v10 is designed to work both in:
and optimized production builds:
This is especially useful for applications prepared for Google Play or other production distribution.

Backward compatibility
The goal of version 10 is not to force all projects to migrate to drive.file.
Instead:
is now the recommended restricted mode.
And:
remains available for applications that genuinely require full Google Drive access.
This provides:

Better security for new applications

Compatibility with existing applications

GSheetsPlus v10 features
GSheetsPlus continues supporting functionality such as:
Google authentication
Google Sheets read operations
Google Sheets write operations
Insert rows
Update rows
Delete rows
Create spreadsheets
Create sheets
Upload files to Drive
Download files
Delete files
Create folders
Rename files
Search files and folders
Manage Drive permissions
Create shareable links
Account information
Storage quota information
Spreadsheet queries
Sign out
Application metadata
Restricted Drive access
Full Drive access when required
R8 optimized Android builds

Recommended configuration
For most new applications:
GDrive.Initialize(Me, "GDrive")
This uses:
https://www.googleapis.com/auth/drive.file
For applications that need broader Google Drive access:
GDrive.Initialize2(Me, "GDrive")
This uses:
https://www.googleapis.com/auth/drive

Request only the permissions that your application actually needs.

GSheetsPlus 10
Version 10 makes GSheetsPlus more suitable for modern production applications:

More secure by default

Backward compatible

R8 ready

Full Drive access still available when required

Better prepared for production Android apps