diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d3c4b91..6e59f42 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,7 +7,7 @@ on: jobs: release: - name: Release main to Maven Central + name: Release to Maven Central runs-on: ubuntu-latest if: github.repository == 'Thijsiez/panache-kotlin-dsl' steps: @@ -18,7 +18,6 @@ jobs: with: distribution: 'temurin' java-version: '17' - - run: chmod +x gradlew - env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e26047d..d56b3d3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,7 +17,6 @@ jobs: with: distribution: 'temurin' java-version: '17' - - run: chmod +x gradlew - run: ./gradlew koverXmlReport --no-daemon --continue - env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecb6c20..35c02e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ # Release Checklist -- Run all tests to make sure there are no regressions -- Update the `version` in gradle.properties to match this release's tag -- Update all unpinned dependencies in both the library and tests project's gradle.properties -- Make sure the versions in the README's Requirements section match the used dependency versions +- Make sure all tests are passing so we can be fairly sure there are no regressions +- Update `version` in gradle.properties to match this release's tag +- Upgrade all unpinned dependencies in both the library and tests project's gradle.properties +- Make sure the versions in the README's Requirements section match the actual dependencies - Add a new section to the CHANGELOG describing what has changed - Update the versions in the README's Getting Started section -- Add a tag with the new version to the commit which will be built and released +- Finally, add a tag with the new version, which will then be built and released diff --git a/README.md b/README.md index e99d78d..e6d3559 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ A dynamic, type-safe way to write your queries [Changelog](CHANGELOG.md) | [Contributing](CONTRIBUTING.md) +## Examples +TODO + ## Getting Started
Gradle Kotlin DSL @@ -72,9 +75,6 @@ project.afterEvaluate { - Your KSP version needs to match your Kotlin version. This is a strict requirement! For example, when your Kotlin version is `2.0.21`, your KSP version needs to be built for and start with the same version, such as `2.0.21-1.0.25` -## Examples -TODO - ## Features ### Queries - Supports the following expressions in a type-safe and null-safe way for all columns @@ -82,16 +82,16 @@ TODO - Supports `like` and `notLike` expressions in a null-safe way for String columns - Supports `and` and `or` expressions for building up a query - Adds the `PanacheSingleResult` sealed class and `singleResultSafe()` extension function to return a single result without throwing exceptions. -Allows you to handle no/multiple results with a `when (result) { ... }` block instead of try-catching + - Allows you to handle no/multiple results with a `when (result) {...}` block instead of try-catching ### Code Generation -- Generate `Column`s for non-transient and non-mapped fields in classes annotated `@Entity` and extending `PanacheEntity`/`PanacheEntityBase` -- Generate query entry point extension functions for classes with companion objects extending `PanacheCompanion`/`PanacheCompanionBase` +- Generate `Column`s for non-transient and non-mapped fields in Panache entities +- Generate query entry point extension functions for entities with Panache companion objects - `where` to start building a SELECT queries, which can be chained to other Panache functions - `update` with setters to bulk-update multiple rows at once - - Shortcut functions for single expression `count`, `delete`, `find`, `stream`, `single`, `singleSafe`, and `multiple` + - Single expression `count`, `delete`, `find`, `stream`, `single`, `singleSafe`, and `multiple` - Allows for overriding the generated `Column`'s type parameter using `@ColumnType` - Especially useful when using a JPA `@Converter` when the field's type is different to the column's type -- Optionally annotate generated code with `@Generated` so it can more easily be excluded from test coverage reporting +- Optionally annotate generated code with `@Generated` so it can be excluded from test coverage reporting ## Known Issues - Code generation does not handle fields of generic types (e.g. `List`, `Set`, etc.), but as far as I'm aware this is difficult to get working with Hibernate anyway. Consider using a JPA `@Converter` in combination with `@ColumnType`