Effortlessly Sew Your Room Persistence Layer Together
Tired of writing repetitive Room boilerplate code? Stitch is a Kotlin compiler plugin that automatically generates Repositories, Repository Implementations, and Operations based on your Room DAOs and entities.
Add the following to your root build.gradle.kts:
plugins {
id("dev.teogor.stitch") version "1.0.0-alpha02"
}And in your module's build.gradle.kts:
plugins {
id("dev.teogor.stitch")
}
stitch {
generatedPackageName = "com.your.app.generated"
}@Dao
interface UserDao {
@Query("SELECT * FROM User")
fun getAllUsers(): Flow<List<User>>
}Stitch will automatically generate a UserRepository and its implementation for you!
- π οΈ Automatic Code Generation: Generates Repositories and Operations from Room components.
- π¦ KMP Ready: Full support for Kotlin Multiplatform projects and Room3.
- π DI Integration: Seamlessly integrates with Metro and other DI frameworks.
- π Asynchronous Agility: Built-in support for Coroutines and Flow.
- π§© Customizable: Fine-tune package names, suffixes, and more via Gradle DSL.
For detailed guides and reference, visit our Documentation Site.
- β Star this repository to show your support!
- π€ Follow teogor for more open-source tools.
- π€ Sponsor me to help maintain this project.
Copyright 2024 teogor (Teodor Grigor)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
