Skip to content
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

Enhance Room Plugin with Schema Export Support #160

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

teogor
Copy link
Owner

@teogor teogor commented Oct 27, 2023

This PR introduces the RoomOptionsExtension to configure schema export settings for the Android Room Convention Plugin. The RoomOptionsExtension allows you to fine-tune the behavior of schema export, which is essential for Room database auto migrations and version management.

Changes Made

  • Added the RoomOptionsExtension to provide schema export configuration options.
  • Enhanced the plugin to dynamically configure schema export settings based on the RoomOptions extension.

How to Use

To configure schema export, you can make use of the roomOptions extension in your build.gradle.kts or build.gradle files. For instance, by setting enableSchemaProvider = true, you enable schema export. You can also specify the directory where the schema files are stored using schemasPath. For example:

roomOptions {
  enableSchemaProvider = true
  schemasPath = "custom_schemas_directory"
}

This use case would enable schema export and set the schema directory to "custom_schemas_directory." It ensures that schema files are available for Room auto migrations and version management.

For more details and the benefits of schema export, please refer to the Room documentation on Exporting Schemas.

@teogor teogor added @documentation Improvements or additions to documentation @environment @priority-medium labels Oct 27, 2023
@teogor teogor added this to the 1.0.0-alpha04 milestone Oct 27, 2023
@teogor teogor self-assigned this Oct 27, 2023
@teogor teogor merged commit f47499a into main Oct 27, 2023
4 checks passed
@zeobot zeobot bot deleted the feature/add-room-schema-arg-provider branch October 27, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@documentation Improvements or additions to documentation @environment @priority-medium
Projects
Development

Successfully merging this pull request may close these issues.

1 participant