Skip to content

Commit

Permalink
Merge branch 'feature/configure-github-actions' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
SMILEY4 committed Jul 29, 2023
2 parents 45428f8 + 565b9da commit 91a3d80
Show file tree
Hide file tree
Showing 67 changed files with 978 additions and 134 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/buildTestVerify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Checks

on: [ push, pull_request ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.7.0
with:
arguments: build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Ktor Swagger-UI

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.smiley4/ktor-swagger-ui/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.smiley4/ktor-swagger-ui)
[![Checks Passing](https://github.com/SMILEY4/ktor-swagger-ui/actions/workflows/buildTestVerify.yml/badge.svg?branch=develop)](https://github.com/SMILEY4/ktor-swagger-ui/actions/workflows/buildTestVerify.yml)


This library provides a Ktor plugin to document routes, generate an OpenApi Specification and serve a Swagger UI. It is meant to be minimally invasive, meaning it can be plugged into existing application without requiring immediate changes to the code. Routes can then be gradually enhanced with documentation.
Expand Down
27 changes: 25 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.vanniktech.maven.publish.SonatypeHost
import io.gitlab.arturbosch.detekt.Detekt

object Meta {
const val groupId = "io.github.smiley4"
Expand All @@ -18,10 +19,11 @@ group = Meta.groupId
version = Meta.version

plugins {
kotlin("jvm") version "1.7.21"
kotlin("jvm") version "1.8.21"
kotlin("plugin.serialization") version "1.8.21"
id("org.owasp.dependencycheck") version "8.2.1"
id("com.vanniktech.maven.publish") version "0.25.2"
id("io.gitlab.arturbosch.detekt") version "1.23.0"
}

repositories {
Expand Down Expand Up @@ -78,7 +80,28 @@ dependencies {
}

kotlin {
jvmToolchain(8)
jvmToolchain(11)
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

detekt {
buildUponDefaultConfig = true
allRules = false
config.setFrom("$projectDir/config/detekt.yml")
baseline = file("$projectDir/config/baseline.xml")
}

tasks.withType<Detekt>().configureEach {
reports {
html.required.set(true)
md.required.set(true)
xml.required.set(false)
txt.required.set(false)
sarif.required.set(false)
}
}

mavenPublishing {
Expand Down
Loading

0 comments on commit 91a3d80

Please sign in to comment.