This repository has been archived on 2023-06-07. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2023-01-22 16:58:09 +01:00
.idea publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
gradle/wrapper [WIP] Restructure code, use multiple processors and visitor pattern where possible 2022-12-31 21:57:57 +01:00
roomex-android publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
roomex-common publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
roomex-processor publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
roomex-sample publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
.gitignore Initial commit 2021-11-15 14:57:47 +01:00
build.gradle.kts prepare to publish to maven 2023-01-19 22:20:33 +01:00
CODE_OF_CONDUCT.md add CODE_OF_CONDUCT 2023-01-16 13:05:23 +01:00
CONTRIBUTING.md add CONTRIBUTING 2023-01-16 13:04:07 +01:00
gradle.properties publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
gradlew Empty project - initialized with KSP 2021-12-23 21:21:46 +01:00
gradlew.bat Empty project - initialized with KSP 2021-12-23 21:21:46 +01:00
LICENSE.md renaming license file 2023-01-16 13:10:35 +01:00
README.md publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00
settings.gradle.kts publish roomex to OSSRH/Maven repository 2023-01-22 16:56:42 +01:00

RoomEx

Extension for Android Room to simplify creating, resolving and working with database relations.
RoomEx allows you to define relations between entities:

@Entity
class Address(
    var streetName: String,
    var city: String,
    var houseNumber: String

): RoomExEntity() { }
@Entity
class User(
    var userName: String,
    var email: String

): RoomExEntity() { 

    @Ignore 
    @OneToOneEx(cascade = Cascade.All) // Here, a 1:1 relation will be created, with create, read, update and delete cascade
    var address: Address? = null
}

Installing

With repository

The release of RoomEx on the Maven Repository is still pending. As soon as RoomEx is available through the repository, you can add RoomEx as a dependency:

implementation("de.dutches.roomex:roomex-android:1.7.21-0.9.0") // 1.7.21 = kotlin version, 0.9.0 = roomex version
implementation("de.dutches.roomex:roomex-common:1.7.21-0.9.0")
ksp("de.dutches.roomex:roomex-processor:1.7.21-0.9.0")

Also add the KSP plugin to your plugins:

id("com.google.devtools.ksp")

Built With

  • Room - Database Object Mapping library
  • KSP - Kotlin Symbol Processing API
  • KotlinPoet - API for generating code files

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for versioning. RoomEx has been built using KSP. KSP releases are tightly coupled to specific Kotlin versions.
Therefore, make sure the version matches your Kotlin version. RoomEx uses the following naming pattern for releases:

RoomEx-KotlinVersion-RoomExVersion

For the versions available, see the tags on this repository.

Authors

  • Marcel van der Heide - Idea and initial source code - FlyingDutchman

License

This project is licensed under the MIT license - see the LICENSE.md file for details