Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gradle Kotlin DSL #12

Merged
merged 4 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'

- name: Validate Gradle wrapper
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.gradle
.idea
.DS_Store
build
lib
lib
TODO.md
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[![Continuous Integration](https://github.com/nicklaswallgren/bankid-java-sdk/workflows/ci/badge.svg)](https://github.com/nicklaswallgren/bankid-java-sdk/actions)
[![License](https://img.shields.io/github/license/nicklaswallgren/bankid-java-sdk)](https://github.com/nicklaswallgren/bankid-java-sdk/blob/master/LICENSE)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/NicklasWallgren/bankid-java-sdk.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/NicklasWallgren/bankid-java-sdk/context:java)
[![Continuous Integration](https://github.com/e-identification/bankid-java-sdk/workflows/ci/badge.svg)](https://github.com/e-identification/bankid-java-sdk/actions)
[![License](https://img.shields.io/github/license/e-identification/bankid-java-sdk)](https://github.com/e-identification/bankid-java-sdk/blob/master/LICENSE)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/e-identification/bankid-java-sdk.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/e-identification/bankid-java-sdk/context:java)

# BankID SDK

SDK to interact with BankID API. It includes support for all the v6.0 features. There are
some [examples that may be useful](./examples).

## Documentation
See the project's [Javadoc](https://nicklaswallgren.github.io/bankid-java-sdk/).
See the project's [Javadoc](https://e-identification.github.io/bankid-java-sdk/).

## Installation

Expand Down
46 changes: 0 additions & 46 deletions build.gradle

This file was deleted.

62 changes: 62 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
plugins {
id("java")
id("checkstyle-conventions")
id("spotbugs-conventions")
id("errorprone-conventions")
id("test-conventions")
id("publish-conventions")
}

group = "dev.nicklasw"
version = "0.15.0-SNAPSHOT"

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

repositories {
mavenCentral()
}

dependencies {
implementation(libs.jackson.core.databind)
implementation(libs.jspecify)

testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.mockito.jupiter)
testImplementation(libs.mockito.inline)

testRuntimeOnly(libs.junit.jupiter.engine)
}

java {
withSourcesJar()
withJavadocJar()
}

tasks {
javadoc {
options {
// Suppress the warnings
(this as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet")
}
}
}

tasks.register("code-quality") {
description = "Run Checkstyle, SpotBugs and ErrorProne analysis on both main and test classes"
group = "code-quality"

dependsOn(tasks.named("checkstyle").get())
dependsOn(tasks.named("spotbugs").get())
dependsOn(tasks.named("errorProne").get()) // Only on main classes
}

tasks.register("cq") {
description = "Alias for code-quality"
group = "code-quality"

dependsOn(tasks.named("code-quality").get())
}
7 changes: 7 additions & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files="SuppressFBWarnings\.java" checks="[a-zA-Z0-9]*"/>
</suppressions>
3 changes: 3 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,7 @@
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-suppressions.xml" />
</module>
</module>
Loading
Loading