Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjohannes/onepiece-limits
https://github.com/jjohannes/onepiece-limits
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jjohannes/onepiece-limits
- Owner: jjohannes
- License: apache-2.0
- Created: 2019-01-26T19:08:32.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-09-08T10:49:18.000Z (over 2 years ago)
- Last Synced: 2024-11-11T04:23:52.322Z (2 months ago)
- Language: Kotlin
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ONEPIECE Limits
Gradle plugin to generate immutable datastructures (Kotlin source code) with collections that contain a limited set of elements addressed by coordinates.
Also generates tools to diff data and (de)serialize such diffs.# How to use this plugin
Add an empty subproject to your Gradle build and apply this plugin in addition to `javba-library` and `org.jetbrains.kotlin.jvm` / `org.jetbrains.kotlin.multiplatform`.
You define the data model directly inside the `build.gradle.kts` file.
No other files need to be added to the project.
All source code is generated.
Use the generated classes in other suproejcts (or builds) by depending on the project to which you applied this plugin.```
plugins {
id("java-library")
id("org.jetbrains.kotlin.jvm") version "1.5.10" // or 'multiplatform'
id("software.onepiece.limits") version "0.1"
}repositories {
mavenCentral()
}dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.1")
}limits {
basePackage.set("com.example.myapp")root("someData",
coordinate("pageNumber", 12, "pn"),
...
) {
...
}
}
```