
Fixed registering multiple users in the authentication microservice See merge request cse2115/2023-2024/group-12/team-12a!1
121 lines
2.7 KiB
Groovy
121 lines
2.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
//Needed only for SNAPSHOT versions
|
|
//maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
|
}
|
|
dependencies {
|
|
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.5.2'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.springframework.boot' version '2.4.13'
|
|
id 'io.spring.dependency-management' version '1.1.4'
|
|
id 'java'
|
|
// Test coverage
|
|
id 'jacoco'
|
|
|
|
// Code style
|
|
id 'checkstyle'
|
|
|
|
// PMD
|
|
id 'pmd'
|
|
|
|
// PITest
|
|
id 'info.solidsoft.pitest' version '1.5.2'
|
|
}
|
|
|
|
group = 'nl.tudelft.cse.sem.template'
|
|
version = '0.0.1-SNAPSHOT'
|
|
sourceCompatibility = 15
|
|
targetCompatibility = 15
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.24'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.24'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt
|
|
implementation 'io.jsonwebtoken:jjwt:0.9.1'
|
|
|
|
|
|
// Local test database (in-memory)
|
|
implementation 'com.h2database:h2'
|
|
developmentOnly 'org.hibernate:hibernate-entitymanager'
|
|
|
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
|
}
|
|
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
|
|
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4'
|
|
testImplementation('org.assertj:assertj-core:3.23.1')
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
jacoco {
|
|
enabled = true
|
|
includes = ['nl.tudelft.sem.template.*']
|
|
excludes = []
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.7" // Use the desired version of JaCoCo
|
|
}
|
|
|
|
jacocoTestCoverageVerification() {
|
|
dependsOn test
|
|
violationRules {
|
|
rule {
|
|
enabled = true
|
|
element = 'CLASS'
|
|
includes = ['nl.tudelft.sem.template.*']
|
|
|
|
limit {
|
|
counter = 'BRANCH'
|
|
value = 'COVEREDRATIO'
|
|
minimum = 0.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
checkstyle {
|
|
toolVersion "10.12.5"
|
|
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
|
|
ignoreFailures = false
|
|
maxErrors = 0
|
|
maxWarnings = 0
|
|
}
|
|
|
|
pmd {
|
|
incrementalAnalysis = true
|
|
sourceSets = [sourceSets.main]
|
|
}
|
|
|
|
apply plugin: 'info.solidsoft.pitest'
|
|
pitest {
|
|
//adds dependency to org.pitest:pitest-junit5-plugin and sets "testPlugin" to "junit5"
|
|
junit5PluginVersion = '0.12'
|
|
|
|
targetClasses = ['nl.tudelft.sem.template.*'] //by default "${project.group}.*"
|
|
pitestVersion = '1.5.1' //not needed when a default PIT version should be used
|
|
threads = 4
|
|
outputFormats = ['XML', 'HTML']
|
|
timestampedReports = false
|
|
}
|