plugins { id 'java' id 'idea' id 'application' id 'io.spring.dependency-management' id 'org.springframework.boot' id 'jacoco' id 'com.gorylenko.gradle-git-properties' } def appVersion = getAppVersion() group = 'org.onap' version = appVersion sourceCompatibility = '17' targetCompatibility = '17' springBoot { buildInfo { properties { artifact = "onap-portal-ng-preferences" version = appVersion group = "org.onap.portalng" name = "Portal-ng user preferences service" } } } application { mainClass = 'org.onap.portalng.preferences.PreferencesApplication' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() maven { url "https://plugins.gradle.org/m2/" } } ext { problemVersion = '0.27.1' logstashLogbackVersion = '7.2' embedMongoVersion = '4.7.0' embedMongoIntegrationVersion = '4.7.0' springCloudWiremockVersion = '4.0.3' micrometerVersion = '1.0.0' } dependencies { implementation project(':openapi') implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation "org.zalando:problem:$problemVersion" implementation "net.logstash.logback:logstash-logback-encoder:$logstashLogbackVersion" implementation(platform("io.micrometer:micrometer-tracing-bom:$micrometerVersion")) implementation("io.micrometer:micrometer-tracing") implementation("io.micrometer:micrometer-tracing-bridge-otel") implementation("io.opentelemetry:opentelemetry-exporter-zipkin") compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'io.projectreactor:reactor-test' testImplementation 'io.rest-assured:rest-assured' testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock:$springCloudWiremockVersion" testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion" testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring30x:$embedMongoIntegrationVersion" testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } test { useJUnitPlatform() finalizedBy(jacocoTestReport) } jacocoTestReport { reports { xml.required = true } } configurations.implementation.setCanBeResolved(true) // avoid generating X.X.X-plain.jar jar { enabled = false } def String getAppVersion() { Properties versionProperties = getVersionProperties() String major = versionProperties.getProperty('major') String minor = versionProperties.getProperty('minor') String patch = versionProperties.getProperty('patch') return major + '.' + minor + '.' + patch } def Properties getVersionProperties() { def versionProperties = new Properties() rootProject.file('version.properties').withInputStream { versionProperties.load(it) } return versionProperties }