Skip to content

Commit

Permalink
add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
leibi-actico committed Dec 8, 2023
1 parent cb1dcb8 commit f99f128
Showing 1 changed file with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,65 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'java-library'
id 'maven-publish'
id 'jacoco'
}

group = 'net.leibi'

java {
sourceCompatibility = '21'
sourceCompatibility = '21'
}

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter:3.2.0'
implementation 'org.springframework.boot:spring-boot-starter:3.2.0'

compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.0'
}

testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.0'
jacocoTestReport {
reports {
xml.required = true
}
}

publishing {

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/leibi-POCS/multitenancy-lib")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/leibi-POCS/multitenancy-lib")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}

tasks.named('test') {
useJUnitPlatform()
useJUnitPlatform()
}



test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}



reckonTagCreate.dependsOn check, test

0 comments on commit f99f128

Please sign in to comment.