Skip to content

Commit 517bf22

Browse files
authored
docs: added templates updates for version 1.2.0-beta.7 (#128)
1 parent 5273773 commit 517bf22

5 files changed

Lines changed: 74 additions & 17 deletions

File tree

docs/get-started/gradle-plugin.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ flamingock {
6363
| Method | Description |
6464
|--------|-------------|
6565
| `community()` | Enables Community edition (adds BOM and core library) |
66+
| `sql()` | Adds SQL template and target system support |
67+
| `mongodb()` | Adds MongoDB sync template and target system support |
68+
| `dynamodb()` | Adds DynamoDB target system support |
69+
| `couchbase()` | Adds Couchbase target system support |
6670
| `springboot()` | Adds Spring Boot integration and test support |
6771
| `graalvm()` | Adds GraalVM native image support |
6872
| `mongock()` | Enables seamless migration from Mongock — imports audit log, detects legacy change units, and executes pending ones |
@@ -86,6 +90,38 @@ implementation("io.flamingock:flamingock-community")
8690
testImplementation("io.flamingock:flamingock-test-support")
8791
```
8892

93+
### sql()
94+
95+
```kotlin
96+
implementation("io.flamingock:flamingock-sql-template")
97+
implementation("io.flamingock:flamingock-sql-targetsystem")
98+
```
99+
100+
### mongodb()
101+
102+
```kotlin
103+
implementation("io.flamingock:flamingock-mongodb-sync-template")
104+
implementation("io.flamingock:flamingock-mongodb-sync-targetsystem")
105+
```
106+
107+
When `springboot()` is also enabled:
108+
109+
```kotlin
110+
implementation("io.flamingock:flamingock-mongodb-springdata-targetsystem")
111+
```
112+
113+
### dynamodb()
114+
115+
```kotlin
116+
implementation("io.flamingock:flamingock-dynamodb-targetsystem")
117+
```
118+
119+
### couchbase()
120+
121+
```kotlin
122+
implementation("io.flamingock:flamingock-couchbase-targetsystem")
123+
```
124+
89125
### springboot()
90126

91127
```kotlin

docs/templates/create-your-own-template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ While official Flamingock templates are experimental, you can already build and
1717

1818
## Dependency
1919

20-
Creating a template requires the `flamingock-core-api` artifact on the classpath. This dependency is transitively included by the core Flamingock library, so you only need to declare it explicitly when the template lives in its own dedicated module (e.g., a reusable template library):
20+
Creating a template requires the `flamingock-template-api` artifact on the classpath. This dependency is transitively included by the core Flamingock library, so you only need to declare it explicitly when the template lives in its own dedicated module (e.g., a reusable template library):
2121

2222
<Tabs groupId="gradle_maven">
2323
<TabItem value="gradle" label="Gradle">
2424
```kotlin
2525
implementation(platform("io.flamingock:flamingock-community-bom:$version"))
26-
implementation("io.flamingock:flamingock-core-api")
26+
implementation("io.flamingock:flamingock-template-api")
2727
```
2828
</TabItem>
2929
<TabItem value="maven" label="Maven">
3030
```xml
3131
<dependency>
3232
<groupId>io.flamingock</groupId>
33-
<artifactId>flamingock-core-api</artifactId>
33+
<artifactId>flamingock-template-api</artifactId>
3434
</dependency>
3535
```
3636
</TabItem>

docs/templates/mongodb-template.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,20 @@ This single YAML file replaces what would typically require a Java class with an
5555
<Tabs groupId="gradle_maven">
5656
<TabItem value="gradle" label="Gradle">
5757
```kotlin
58-
import io.flamingock.gradle.FlamingockTemplate.MONGODB
59-
6058
flamingock {
6159
//...
62-
templates(MONGODB)
60+
mongodb()
6361
}
6462
```
6563
</TabItem>
6664
<TabItem value="maven" label="Maven">
65+
66+
Requires the [Flamingock BOM](../get-started/quick-start.md) in your `<dependencyManagement>` section:
67+
6768
```xml
6869
<dependency>
6970
<groupId>io.flamingock</groupId>
70-
<artifactId>flamingock-java-template-mongodb</artifactId>
71+
<artifactId>flamingock-mongodb-template</artifactId>
7172
</dependency>
7273
```
7374
</TabItem>

docs/templates/sql-template.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@ rollback: "DROP TABLE users;"
3636
<Tabs groupId="gradle_maven">
3737
<TabItem value="gradle" label="Gradle">
3838
```kotlin
39-
import io.flamingock.gradle.FlamingockTemplate.SQL
40-
4139
flamingock {
4240
//...
43-
templates(SQL)
41+
sql()
4442
}
4543
```
4644
</TabItem>
4745
<TabItem value="maven" label="Maven">
46+
47+
Requires the [Flamingock BOM](../get-started/quick-start.md) in your `<dependencyManagement>` section:
48+
4849
```xml
4950
<dependency>
5051
<groupId>io.flamingock</groupId>
51-
<artifactId>flamingock-java-template-sql</artifactId>
52+
<artifactId>flamingock-sql-template</artifactId>
5253
</dependency>
5354
```
5455
</TabItem>

docs/templates/templates-how-to-use.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,50 @@ Using a Flamingock Template is straightforward. Here's an example of how you can
1515
This section uses the **SQL Template** as example.
1616
:::
1717

18-
## Step 1: Add the Template dependency
18+
## Step 1: Add the template dependency
1919

20-
Ensure your **Flamingock Template** dependency is included in your project. Example of using `sql-template`:
20+
How you set up the dependency depends on where the template comes from.
21+
22+
### Official Flamingock templates
23+
24+
Official templates are included in the Flamingock Gradle plugin and the BOM, so no version management is needed. For example, to use the SQL Template:
2125

2226
<Tabs groupId="gradle_maven">
2327
<TabItem value="gradle" label="Gradle">
2428
```kotlin
25-
import io.flamingock.gradle.FlamingockTemplate.SQL
26-
2729
flamingock {
2830
//...
29-
templates(SQL)
31+
sql()
3032
}
3133
```
3234
</TabItem>
3335
<TabItem value="maven" label="Maven">
36+
37+
Requires the [Flamingock BOM](../get-started/quick-start.md) in your `<dependencyManagement>` section. Then add the template dependency without a version:
38+
3439
```xml
3540
<dependency>
3641
<groupId>io.flamingock</groupId>
37-
<artifactId>flamingock-java-template-sql</artifactId>
42+
<artifactId>flamingock-sql-template</artifactId>
3843
</dependency>
3944
```
4045
</TabItem>
4146
</Tabs>
4247

48+
Each official template has its own plugin function (`sql()`, `mongodb()`, etc.) and BOM-managed artifact. See the individual template reference pages for the exact setup.
49+
50+
### Third-party or community templates
51+
52+
For templates published by third parties, add them as a standard dependency:
53+
54+
```kotlin
55+
implementation("com.example:custom-template:1.0.0")
56+
```
57+
58+
### In-project templates
59+
60+
If the template is defined within your own project, no additional dependency is needed — Flamingock discovers it automatically via [ServiceLoader registration](./create-your-own-template.md#3-register-the-template-with-serviceloader).
61+
4362
## Step 2: Create the change file
4463

4564
Template-based changes are defined in **YAML files** placed inside your application's resources directory. Each file represents a single change.

0 commit comments

Comments
 (0)