Skip to content

Commit

Permalink
Configure sonar build
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Sep 21, 2024
1 parent ae027ff commit dacae69
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# java-lua

An experimental Java library for embedding a Lua VM.

[![Build](https://github.com/kaklakariada/java-lua/actions/workflows/build.yml/badge.svg)](https://github.com/kaklakariada/java-lua/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=jlua&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=jlua)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=jlua&metric=bugs)](https://sonarcloud.io/summary/new_code?id=jlua)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=jlua&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=jlua)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=jlua&metric=coverage)](https://sonarcloud.io/summary/new_code?id=jlua)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=jlua&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=jlua)

## Development

### Check for Dependency Updates

```sh
./gradlew dependencyUpdates
```

### Run Tests

```sh
./gradlew check
```
25 changes: 25 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id 'java-library'
id 'jacoco'
id "com.github.ben-manes.versions" version "0.51.0"
id "org.sonarqube" version "5.1.0.4882"
}

repositories {
Expand All @@ -19,6 +21,29 @@ java {
}
}

javadoc {
enabled = true
failOnError = true
excludes = ["org/itsallcode/jlua/ffi/**"]
options.addBooleanOption('html5', true)
options.addStringOption('Xwerror', '-quiet')
}

jacocoTestReport {
reports {
xml.required = true
}
}

sonarqube {
properties {
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.organization", "kaklakariada-github"
}
}

tasks.sonarqube.dependsOn([tasks.jacocoTestReport])

testing {
suites {
test {
Expand Down

0 comments on commit dacae69

Please sign in to comment.