You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,25 +8,34 @@ SDKMAN Broker is a Kotlin-based Ktor application that brokers SDKMAN candidate a
8
8
9
9
## Build & Run
10
10
11
-
-**Run service:**`./gradlew run` (starts Ktor on port 8080; requires MongoDB and PostgreSQL — see Database Setup below)
11
+
Built with the Kotlin Toolchain (Amper engine). The `./kotlin` wrapper auto-provisions both the JDK and the toolchain; no `setup-java` or local install required.
12
+
13
+
-**Run service:**`./kotlin run` (starts Ktor on port 8080; requires MongoDB and PostgreSQL — see Database Setup below)
12
14
13
15
## Validation
14
16
15
17
Run after every implementation to get immediate feedback:
-**`project.yaml`** — registers all modules and local plugins.
33
+
-**`gradle/libs.versions.toml`** — Gradle-format version catalog reused as the `$libs.*` catalog (the directory name is historical; the file is consumed natively by the Kotlin Toolchain).
34
+
-**`plugins/{release,jib,detekt,ktlint}/`** — local plugins replacing the Gradle plugins of the same name. Reimplement behavior here rather than reaching for Gradle plugins.
35
+
27
36
## Database Setup (Dev Server Only)
28
37
29
-
The dev server (`./gradlew run`) connects to MongoDB and PostgreSQL on localhost. Start them in Docker:
38
+
The dev server (`./kotlin run`) connects to MongoDB and PostgreSQL on localhost. Start them in Docker:
30
39
31
40
```bash
32
41
docker run -d --restart=always -p=27017:27017 --name mongo mongo:3.2
Copy file name to clipboardExpand all lines: README.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,31 +14,44 @@ This application implements a health check endpoint that performs a deep health
14
14
15
15
### Prerequisites
16
16
17
-
- JDK 21 (Temurin recommended)
18
17
- MongoDB (or use Docker)
19
18
- Postgres (or use Docker)
20
-
-Gradle
19
+
-The Kotlin Toolchain (formerly Amper) — auto-provisioned by the bundled `./kotlin` wrapper. Installing it globally is optional.
21
20
22
21
### SDKMAN Setup
23
22
24
-
This project uses SDKMAN to manage the JDK version:
23
+
This project uses SDKMAN to manage the JDK and the Kotlin Toolchain CLI:
25
24
26
25
```
27
26
sdk env
28
27
```
29
28
29
+
That installs the JDK declared in `.sdkmanrc` and the Kotlin Toolchain CLI. Alternatively, the `./kotlin` wrapper checked into the project root auto-provisions both on first use.
30
+
30
31
### Building and Testing
31
32
32
33
Build the project:
33
34
34
35
```
35
-
./gradlew build
36
+
./kotlin build
36
37
```
37
38
38
39
Run tests:
39
40
40
41
```
41
-
./gradlew check
42
+
./kotlin test
43
+
```
44
+
45
+
Run all verification checks (detekt + ktlint):
46
+
47
+
```
48
+
./kotlin check
49
+
```
50
+
51
+
Auto-format Kotlin sources:
52
+
53
+
```
54
+
./kotlin do ktlintFormat
42
55
```
43
56
44
57
### Running Locally
@@ -78,7 +91,7 @@ mongosh --eval 'db.getSiblingDB("sdkman").application.insertOne({ alive: "OK", s
78
91
Run the application:
79
92
80
93
```
81
-
./gradlew run
94
+
./kotlin run
82
95
```
83
96
84
97
## API Endpoints
@@ -138,14 +151,14 @@ This project uses GitHub Actions for CI/CD:
138
151
- Builds a Docker image and pushes it to Digital Ocean Container Registry
139
152
- The image is tagged with the version number, commit hash, and "latest"
140
153
141
-
The version is managed by the Axion Release Plugin based on Git tags.
154
+
The version is managed by the local `release` Kotlin Toolchain plugin (`plugins/release/`), which derives the version from Git tags.
142
155
143
156
### Checking the Current Version
144
157
145
158
To check the current version of the application, run:
146
159
147
160
```
148
-
./gradlew currentVersion
161
+
./kotlin do currentVersion
149
162
```
150
163
151
-
This will display the current version as determined by the Axion Release Plugin.
164
+
This will display the current version as determined by the local release plugin.
0 commit comments