setup gradle

This commit is contained in:
Kilian Schuettler 2023-07-27 22:04:16 +02:00
parent d9f7b3f516
commit af1f4193d0
7 changed files with 188 additions and 0 deletions

15
buildSrc/build.gradle.kts Normal file
View File

@ -0,0 +1,15 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
// Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
`kotlin-dsl`
}
repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}

View File

@ -0,0 +1,69 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id("java")
`java-library`
`maven-publish`
pmd
checkstyle
jacoco
}
group = "com.iqser.red.service"
version = "4.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
tasks.pmdMain {
pmd.ruleSetFiles = files("${rootDir}/config/pmd/pmd.xml")
}
tasks.pmdTest {
pmd.ruleSetFiles = files("${rootDir}/config/pmd/test_pmd.xml")
}
tasks.named<Test>("test") {
useJUnitPlatform()
}
dependencies {
//testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
}
repositories {
mavenLocal()
maven {
url = uri("https://nexus.knecon.com/repository/gindev/");
credentials {
username = providers.gradleProperty("mavenUser").getOrNull();
password = providers.gradleProperty("mavenPassword").getOrNull();
}
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
maven {
url = uri("https://repo.spring.io/milestone")
}
maven {
url = uri("https://dist.wso2.org/maven2/")
}
maven {
url = uri("https://projectlombok.org/edge-releases")
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

14
config/pmd/pmd.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Knecon main pmd rules</description>
<rule ref="category/java/errorprone.xml">
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="MissingSerialVersionUID"/>
<exclude name="AvoidLiteralsInIfCondition"/>
</rule>
</ruleset>

12
config/pmd/test_pmd.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Knecon test pmd rules</description>
<rule ref="category/java/errorprone.xml">
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="MissingSerialVersionUID"/>
<exclude name="BeanMembersShouldSerialize"/>
</rule>
</ruleset>

View File

@ -0,0 +1,21 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id("com.iqser.red.service.java-conventions")
id("io.freefair.lombok") version "8.0.1"
}
dependencies {
api("org.springframework:spring-web:6.0.6")
api("com.iqser.red.service:persistence-service-internal-api-v1:2.79.0")
}
description = "redaction-service-api-v1"
java {
withJavadocJar()
}

View File

@ -0,0 +1,46 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id("com.iqser.red.service.java-conventions")
id("org.springframework.boot") version "3.0.6"
id("io.spring.dependency-management") version "1.1.0"
id("org.sonarqube") version "4.2.1.3168"
id("io.freefair.lombok") version "8.0.1"
}
dependencies {
implementation(project(":redaction-service-api-v1"))
implementation("com.iqser.red.commons:spring-commons:2.1.0") { exclude(group = "org.springframework.boot", module = "spring-boot-starter-log4j2") }
implementation("com.iqser.red.commons:metric-commons:2.1.0") { exclude(group = "org.springframework.boot", module = "spring-boot-starter-log4j2") }
implementation("com.iqser.red.commons:dictionary-merge-commons:1.3.0")
implementation("com.iqser.red.commons:storage-commons:2.1.0")
implementation("org.springframework.boot:spring-boot-starter-aop:3.0.4")
implementation("com.fasterxml.jackson.module:jackson-module-afterburner:2.14.2")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2")
implementation("org.ahocorasick:ahocorasick:0.6.3")
implementation("org.javassist:javassist:3.29.2-GA")
implementation("org.drools:drools-engine:8.37.0.Final")
implementation("org.drools:drools-mvel:8.37.0.Final")
implementation("org.kie:kie-spring:7.73.0.Final")
implementation("org.locationtech.jts:jts-core:1.19.0")
implementation("org.apache.pdfbox:pdfbox:2.0.24")
implementation("org.apache.pdfbox:pdfbox-tools:2.0.24")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.0.1")
implementation("org.springframework.boot:spring-boot-starter-amqp:3.0.4")
testImplementation("org.springframework.boot:spring-boot-starter-test:3.0.4")
}
description = "redaction-service-server-v1"
java {
withJavadocJar()
}

11
settings.gradle.kts Normal file
View File

@ -0,0 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/
rootProject.name = "redaction-service"
include(":redaction-service-api-v1")
include(":redaction-service-server-v1")
project(":redaction-service-api-v1").projectDir = file("redaction-service-v1/redaction-service-api-v1")
project(":redaction-service-server-v1").projectDir = file("redaction-service-v1/redaction-service-server-v1")