Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"permissions": {
"allow": [
"Bash(git -C *)",
"Bash(./gradlew :esque-core:test)",
"Bash(./gradlew :esque-core:compileTestKotlin)",
"Bash(./gradlew build)"
]
},
"enabledPlugins": {
"superpowers@claude-plugins-official": true,
"skill-creator@claude-plugins-official": true,
Expand Down
2 changes: 0 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:noble

ARG JAVA_VERSION=21.0.5-zulu
ARG MAVEN_VERSION=3.9.9
ARG KOTLIN_VERSION=2.4.0

SHELL ["/bin/bash", "-c"]
Expand All @@ -20,7 +19,6 @@ USER ${USER}
RUN curl -s "https://get.sdkman.io" | bash \
&& source ${HOME}/.sdkman/bin/sdkman-init.sh \
&& sdk install java ${JAVA_VERSION} \
&& sdk install maven ${MAVEN_VERSION} \
&& sdk install kotlin ${KOTLIN_VERSION}

# install gh cli
Expand Down
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"workspaceFolder": "/workspaces/esque",

"postAttachCommand": {
"maven-compile": "mvn compile",
"gradle-build": "./gradlew build",
"gradle-build": "./gradlew build"
}
}
35 changes: 0 additions & 35 deletions .github/workflows/maven-deploy.yml

This file was deleted.

49 changes: 13 additions & 36 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ Specs live in `.claude/superpowers/specs/` named `YYYY-MM-DD-<topic>-design.md`.

- **License:** Apache 2.0
- **Language:** Kotlin 2.4.0 (JVM 21)
- **Build:** Maven 3.9+ and Gradle 9.5.1 (both supported)
- **Build:** Gradle 9.5.1
- **Target:** Elasticsearch 9+ (client version 9.4.x low-level REST client)
- **Published to:** Maven Central via Central Portal

## Repository Structure

```
esque/
├── pom.xml # Parent POM (multi-module Maven build)
├── build.gradle.kts # Root Gradle build
├── settings.gradle.kts # Gradle settings (module declarations)
├── gradle/
Expand All @@ -33,11 +32,9 @@ esque/
│ ├── detekt.yml # Detekt rule configuration
│ └── baseline.xml # Baseline of pre-existing violations
├── .github/workflows/
│ ├── maven-deploy.yml # CI/CD: Maven build + deploy to Maven Central
│ └── gradle-deploy.yml # CI/CD: Gradle build + deploy to Maven Central
├── .devcontainer/ # Dev container (Ubuntu, Zulu JDK 21, Maven 3.9)
├── .devcontainer/ # Dev container (Ubuntu, Zulu JDK 21)
├── esque-core/ # Core library (the published artifact)
│ ├── pom.xml
│ ├── build.gradle.kts
│ └── src/main/kotlin/org/loesak/esque/core/
│ ├── Esque.kt # Main entry point / orchestrator
Expand All @@ -63,7 +60,7 @@ esque/
### Prerequisites

- Java 21 (Zulu distribution recommended)
- Maven 3.9+ or Gradle (wrapper included — no install needed)
- Gradle (wrapper included — no install needed)

### First-time setup

Expand All @@ -78,45 +75,33 @@ This sets `core.hooksPath = .githooks` in your local git config. Git won't do th
### Common Commands

```bash
# Maven — compile
mvn clean compile

# Maven — package (skip GPG signing for local dev)
mvn clean package -Dgpg.skip=true

# Maven — install to local repo
mvn clean install -Dgpg.skip=true

# Gradle — compile
# compile
./gradlew compileKotlin

# Gradle — build (compile + test)
# build (compile + test)
./gradlew build

# Gradle — pass version explicitly (mirrors version.sh output)
# pass version explicitly (mirrors version.sh output)
./gradlew -PprojectVersion=1.0.0-SNAPSHOT build

# Gradle — format code
# format code
./gradlew ktfmtFormat

# Gradle — check formatting and lint (without building)
# check formatting and lint (without building)
./gradlew ktfmtCheck detekt
```

### GPG Signing

**Maven:** All artifacts are GPG-signed for Maven Central deployment. Pass `-Dgpg.skip=true` for local development. CI handles signing automatically via secrets.

**Gradle:** Signing uses in-memory PGP keys via vanniktech's `signingInPlaceKey` / `signingInPlaceKeyPassword` Gradle properties, supplied as environment variables in CI. No GPG keyring import needed.
Signing uses in-memory PGP keys via vanniktech's `signingInPlaceKey` / `signingInPlaceKeyPassword` Gradle properties, supplied as environment variables in CI. No GPG keyring import needed.

### Versioning

Version is derived from git tags via `version.sh`:
- If the tag matches `X.Y.Z` exactly, that version is used as-is
- Otherwise, the git describe output gets `-SNAPSHOT` appended

**Maven CI:** `mvn versions:set -DnewVersion=$(./version.sh)` before building.
**Gradle CI:** `-PprojectVersion=$(./version.sh)` passed on the command line.
`-PprojectVersion=$(./version.sh)` is passed on the command line in CI.

### Code Style and Linting

Expand All @@ -126,12 +111,7 @@ Version is derived from git tags via `version.sh`:

### CI/CD

Two GitHub Actions workflows trigger on push to `master`, pull requests to `master`, and GitHub releases:

- **`maven-deploy.yml`** — runs `mvn clean deploy`; signs with GPG via `maven-gpg-plugin`
- **`gradle-deploy.yml`** — runs `./gradlew ktfmtCheck detekt build` then `./gradlew publish -x test`; signs in-memory via vanniktech

Both workflows attempt SNAPSHOT publishing on every run. SNAPSHOT publishing requires the namespace to have snapshots enabled at central.sonatype.com.
`gradle-deploy.yml` triggers on push to `master`, pull requests to `master`, and GitHub releases. It runs `./gradlew ktfmtCheck detekt build` then `./gradlew publish -x test`, signing in-memory via vanniktech. SNAPSHOT publishing requires the namespace to have snapshots enabled at central.sonatype.com.

## Architecture

Expand Down Expand Up @@ -250,16 +230,13 @@ Integration tests live in `esque-core/src/test/kotlin/` and are named `*IT`. The
- **Testcontainers** (`testcontainers-elasticsearch`) to spin up a real ES instance via Docker
- **Logback** as the SLF4J implementation (test scope only)

**Maven:** Tests run via `maven-failsafe-plugin` during the `integration-test` phase (`mvn verify`).
**Gradle:** Tests run via the standard `test` task (`./gradlew test`).

Docker must be available for integration tests to run.
Tests run via the standard `test` task (`./gradlew test`). Docker must be available for integration tests to run.

## Module Notes

- **esque-core**: The published library artifact. Contains all core logic.
- **esque-examples**: Aggregator with example applications. Not published to Maven Central.
- **esque-example-core-aws-auth**: Placeholder only (POM exists but no implementation).
- **esque-example-core-aws-auth**: Placeholder only (no implementation).

## Known TODOs in Code

Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,24 @@ It is Flyway-esque but for Elasticsearch.
It basically executes queries and remembers which queries have been run on a cluster for a given migration key. You can organize its usage to your needs.

# Install
Add the following to your maven dependencies. Make sure to check the releases or Maven Central for the latest version.
Available on Maven Central. Make sure to check the releases for the latest version.

**Gradle (Kotlin DSL):**
```kotlin
implementation("org.loesak.esque:esque-core:0.2.1")
```

**Gradle (Groovy DSL):**
```groovy
implementation 'org.loesak.esque:esque-core:0.2.1'
```

**Maven:**
```xml
<dependency>
<groupId>org.loesak.esque</groupId>
<artifactId>esque-core</artifactId>
<version>0.1.4</version>
<version>0.2.1</version>
</dependency>
```

Expand Down
99 changes: 0 additions & 99 deletions esque-core/pom.xml

This file was deleted.

15 changes: 0 additions & 15 deletions esque-examples/esque-example-core-aws-auth/pom.xml

This file was deleted.

29 changes: 0 additions & 29 deletions esque-examples/esque-example-core-es-auth/pom.xml

This file was deleted.

Loading
Loading