From b4580707edff23f92c0de229ce8484ef930d4991 Mon Sep 17 00:00:00 2001 From: lorenz <stu203404@mail.uni-kiel.de> Date: Sat, 19 Dec 2020 15:37:39 +0100 Subject: [PATCH] Extend Readme - contain script and detekt description --- theodolite-quarkus/README.md | 32 +++++++++++++++++++++++++++++--- theodolite-quarkus/build.gradle | 8 ++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/theodolite-quarkus/README.md b/theodolite-quarkus/README.md index 053c3e214..bb99f34e8 100644 --- a/theodolite-quarkus/README.md +++ b/theodolite-quarkus/README.md @@ -29,17 +29,18 @@ The application is now runnable using `java -jar build/theodolite-quarkus-1.0.0- ## Creating a native executable -You can create a native executable using: +You can create a native executable using: ```shell script ./gradlew build -Dquarkus.package.type=native ``` -Or, if you don't have GraalVM installed, you can run the native executable build in a container using: +Or, if you don't have GraalVM installed, you can run the native executable build in a container using: ```shell script ./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true ``` -You can then execute your native executable with: `./build/theodolite-quarkus-1.0.0-SNAPSHOT-runner` +You can then execute your native executable with: +```./build/theodolite-quarkus-1.0.0-SNAPSHOT-runner``` If you want to learn more about building native executables, please consult https://quarkus.io/guides/gradle-tooling. @@ -48,3 +49,28 @@ If you want to learn more about building native executables, please consult http <p>A Hello World RESTEasy resource</p> Guide: https://quarkus.io/guides/rest-json + +## Build and afterwards run the application in Docker container + +```build_jvm.sh``` to build the jvm version + +```build_native.sh``` to build the native image graal version + +## Install Detekt Code analysis Plugin + + +Install https://plugins.jetbrains.com/plugin/10761-detekt + +- Install the plugin +- Navigate to Settings/Preferences -> Tools -> Detekt +- Check Enable Detekt +- Specify your detekt configuration and baseline file (optional) + + +-> detekt issues will be annotated on-the-fly while coding + +**ingore Failures in build:** add + +```ignoreFailures = true``` + + to build.gradle detekt task diff --git a/theodolite-quarkus/build.gradle b/theodolite-quarkus/build.gradle index b3848d241..71ddbf657 100644 --- a/theodolite-quarkus/build.gradle +++ b/theodolite-quarkus/build.gradle @@ -2,11 +2,13 @@ plugins { id 'org.jetbrains.kotlin.jvm' version "1.3.72" id "org.jetbrains.kotlin.plugin.allopen" version "1.3.72" id 'io.quarkus' + id "io.gitlab.arturbosch.detekt" version "1.15.0" } repositories { mavenLocal() mavenCentral() + jcenter() } dependencies { @@ -45,3 +47,9 @@ compileKotlin { compileTestKotlin { kotlinOptions.jvmTarget = JavaVersion.VERSION_11 } + +detekt { + failFast = true // fail build on any finding + buildUponDefaultConfig = true + ignoreFailures = true +} -- GitLab