diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 1891fdb6..e1a863b1 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -4,9 +4,9 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '17' @@ -15,15 +15,12 @@ jobs: with: gradle-version: wrapper arguments: detekt - properties: | - org.gradle.vfs.watch=false - org.gradle.vfs.verbose=false unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '17' @@ -31,7 +28,4 @@ jobs: uses: burrunan/gradle-cache-action@v1 with: gradle-version: wrapper - arguments: test koverCollectReports - properties: | - org.gradle.vfs.watch=false - org.gradle.vfs.verbose=false + arguments: test koverMergedReport diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d47688c5..fa1445f6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,8 @@ name: Publish to GitHub Packages on: push: branches: [ main ] + paths-ignore: + - docs/** env: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYPE_SIGNING_KEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} @@ -9,8 +11,8 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '17' @@ -19,8 +21,5 @@ jobs: with: gradle-version: wrapper arguments: publishAllPublicationsToGithubPackagesRepository - properties: | - org.gradle.vfs.watch=false - org.gradle.vfs.verbose=false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47d47fe0..378638ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,47 +1,53 @@ -name: Publish to GitHub Packages +name: Publish Release on: release: types: - prereleased - released -#env: -# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYPE_SIGNING_KEY }} -# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} +env: + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYPE_SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} jobs: - publish-to-github: + publish-to-nexus: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '17' - - name: Publish to GitHub Packages + - name: Publish to Maven Central uses: burrunan/gradle-cache-action@v1 with: gradle-version: wrapper - arguments: publishAllPublicationsToGithubPackagesRepository + arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository properties: | release=true - org.gradle.vfs.watch=false - org.gradle.vfs.verbose=false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# publish-to-nexus: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-java@v2 -# with: -# distribution: 'adopt' -# java-version: '17' -# - name: Publlish to GithubPackages -# uses: burrunan/gradle-cache-action@v1 -# with: -# gradle-version: wrapper -# arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository -# properties: | -# release=true -# org.gradle.vfs.watch=false -# org.gradle.vfs.verbose=false -# + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} + build-documentation: + runs-on: ubuntu-latest + needs: + - publish-to-nexus + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '17' + - name: Build New Documentation + uses: burrunan/gradle-cache-action@v1 + with: + gradle-version: wrapper + arguments: dokkaHtmlMultiModule + properties: | + release=true + - name: Push New Documentation + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + new_branch: main + message: 'doc: Added Latest Documentation ✨' diff --git a/CHANGELOG.md b/CHANGELOG.md index e160ceb0..a5ba2a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased [0.3.0-SNAPSHOT] +## Unreleased +### Added + +### Changed + +### Removed + +## [0.3.1] - September 17th, 2022 ### Added - Relational DAO now adds functions to query for indexed fields - API @GetBy diff --git a/Project.md b/Project.md new file mode 100644 index 00000000..9356fb90 --- /dev/null +++ b/Project.md @@ -0,0 +1,38 @@ +# Lerasium + +Welcome to Lerasium, a highly opinionated service generator for Kotlin + +## How to install + +Lerasium publishes all releases to Maven Central. As such, using the release versions of `Lerasium` is as simple as +declaring the dependencies block of your `build.gradle.kts` + +```kotlin +repositories { + mavenCentral() +} + +dependencies { + ksp("io.bkbn:lerasium-api-processor:latest.release") + implementation("io.bkbn:lerasium-api:latest.release") +} +``` + +In addition to publishing releases to Maven Central, a snapshot version gets published to GitHub Packages on every merge +to `main`. These can be consumed by adding the repository to your gradle build file. Instructions can be +found [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package) + +### Add the generated code as a source set + +TODO + +## Lerasium In a Nutshell + +TODO + +## The Playground + +In addition to the documentation available here, Lerasium has a working example available in the +playground module. + +Go ahead and fork the repo and run it directly to get a sense of what Lerasium can do! diff --git a/README.md b/README.md index cfcdd3de..d416318d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ # Lerasium -TODO +[![version](https://img.shields.io/maven-central/v/io.bkbn/lerasium-core?style=flat-square)](https://search.maven.org/search?q=io.bkbn%20lerasium-core) + +## Table of Contents + +- [What Is Lerasium](#what-is-lerasium) +- [Library Details](#library-details) +- [Local Development](#local-development) +- [The Playground](#the-playground) + +## What is Lerasium + +In a sentence, Lerasium is a highly opinionated service generator for Kotlin. It takes in a domain definition, and +generates +the boilerplate for your ORM, DAO, and API. + +# Library Details + +Library documentation lives alongside the source code, and is generated into a static site via Dokka. Can be +viewed [here](https://bkbnio.github.io/lerasium) + +## Local Development + +Lerasium should run locally right out of the box, no configuration necessary (assuming you have JDK 17+ installed). +New features can be built locally and published to your local maven repository with the `./gradlew publishToMavenLocal` +command! + +## The Playground + +This repo contains a `playground` module that contains a working example showcasing the power of Lerasium. Clone the +repo and give it a spin! diff --git a/gradle.properties b/gradle.properties index 4041689d..6286bdbb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Backbone -project.version=0.3.0 +project.version=0.3.1 # Kotlin kotlin.code.style=official @@ -17,7 +17,7 @@ kotlinxSerializationVersion=1.4.0 exposedVersion=0.39.2 flywayVersion=9.2.0 hikariCPVersion=5.0.1 -postgresVersion=42.4.2 +postgresVersion=42.5.0 kmongoVersion=4.7.0 konformVersion=0.4.0 kompendiumVersion=3.2.0 diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..7a3da2c6 --- /dev/null +++ b/renovate.json @@ -0,0 +1,15 @@ +{ + "extends": [ + "config:base" + ], + "packageRules": [ + { + "matchUpdateTypes": ["minor", "patch", "pin", "digest"], + "automerge": true + }, + { + "matchPackagePatterns": ["ktor"], + "groupName": "ktor" + } + ] +}