aboutsummaryrefslogtreecommitdiffstats
path: root/app/build.gradle
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-22 09:58:20 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-22 10:05:58 +0000
commita42b5abcbb1bea0b20374500a2a294f31de1927a (patch)
tree142508e32ec0caef7c87edfb5428bc2fe6164a0f /app/build.gradle
parent6bd5a8e1de4307a55a1129e2f2015599ef00acf3 (diff)
Migrate away from legacy gradle buildscript syntax
- replace the buildscript way of declaring plugins with the plugins {} block - have duplicate openapi client declarations since programmatic way of registering openapiGenerate task does not seem to be working Issue-ID: PORTALNG-47 Change-Id: I9e007127726e558363409d1b224dc7b2b9e52719 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'app/build.gradle')
-rw-r--r--app/build.gradle76
1 files changed, 40 insertions, 36 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 6febc07..8faa791 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,26 +1,41 @@
plugins {
- id 'application'
- id 'org.springframework.boot'
- id 'io.spring.dependency-management'
- id 'com.gorylenko.gradle-git-properties'
- id 'jacoco'
+ id 'java'
+ id 'org.springframework.boot'
+ id 'io.spring.dependency-management'
+ id 'com.gorylenko.gradle-git-properties' // commit information in actuator
+ id 'jacoco' // code coverage
id 'com.diffplug.spotless'
}
-dependencyManagement {
- imports {
- mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:$springCloudVersion"
- }
+group = 'org.onap.portalng'
+
+java {
+ sourceCompatibility = JavaVersion.VERSION_17
+}
+
+configurations {
+ compileOnly {
+ extendsFrom annotationProcessor
+ }
}
+// repositories {
+// mavenCentral()
+// }
+
dependencies {
- implementation project(':openapi:server')
- implementation project(':openapi:client-portal-prefs')
+ implementation project(':openapi:server')
implementation project(':openapi:client-portal-history')
+ implementation project(':openapi:client-portal-prefs')
implementation project(':openapi:client-portal-keycloak')
-
- implementation project(':lib')
-
+ implementation project(':lib')
+
+ implementation 'org.springframework.boot:spring-boot-starter-webflux'
+ implementation 'org.springframework.boot:spring-boot-starter-actuator'
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ implementation 'org.springframework.boot:spring-boot-starter-security'
+ implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
+ implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-validation'
@@ -37,39 +52,29 @@ dependencies {
implementation "org.mapstruct.extensions.spring:mapstruct-spring-annotations:$mapStructExtensionsVersion"
implementation "org.mapstruct.extensions.spring:mapstruct-spring-extensions:$mapStructExtensionsVersion"
+ implementation "org.springframework.boot:spring-boot-starter-logging"
+ implementation "net.logstash.logback:logstash-logback-encoder:$logbackVersion"
+ compileOnly "org.projectlombok:lombok:$lombokVersion"
+ annotationProcessor "org.projectlombok:lombok:$lombokVersion"
+ testCompileOnly "org.projectlombok:lombok:$lombokVersion"
+ testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
+
testImplementation 'io.projectreactor:reactor-test'
- testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock'
+ testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock:$wiremockVersion"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured'
}
-mainClassName = 'org.onap.portalng.bff.Application'
-
-bootJar {
- launchScript()
- enabled = true
- excludes = ['**/application-local.yml', '**/application-development.yml', '**/log4j.xml']
-}
-
-springBoot {
- buildInfo {
- properties {
- artifact = 'org-onap-portalng-bff'
- version = getVersion()
- group = rootProject.group
- name = 'portal-ng backend for frontend'
- }
- }
+tasks.named('test') {
+ useJUnitPlatform()
}
+test.finalizedBy jacocoTestReport
jacocoTestReport {
reports {
xml.required = true
}
}
-test.finalizedBy jacocoTestReport
-
-configurations.implementation.setCanBeResolved(true)
spotless {
java {
@@ -78,7 +83,6 @@ spotless {
googleJavaFormat('1.15.0')
}
}
-
tasks.withType(JavaCompile) {
dependsOn 'spotlessApply'
} \ No newline at end of file