From 079ae934aa4b63f8e3dab9ab302d4b97038f8a6e Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Tue, 7 May 2024 14:36:26 +0200 Subject: Make openapi dependencies in bff compileOnly - make openapi deps compileOnly - adjust instructions for locally running the app Issue-ID: PORTALNG-95 Change-Id: I0be66ada6046b527b6a5b5c74546193b78535b51 Signed-off-by: Fiete Ostkamp --- README.md | 4 ++-- development/run.sh | 2 +- openapi/build.gradle | 9 +-------- openapi/client-history/build.gradle | 12 +----------- openapi/client-keycloak/build.gradle | 12 +----------- openapi/client-preferences/build.gradle | 12 +----------- openapi/server/build.gradle | 15 +++------------ 7 files changed, 10 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index fa8de71..a1851ef 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,10 @@ Currently there are three spring profiles that can be used to run the applicatio To launch the application with a specific profile run ``` sh -SPRING_PROFILES_ACTIVE=local ./gradlew bootRun +SPRING_PROFILES_ACTIVE=local ./gradlew app:bootRun # or export SPRING_PROFILES_ACTIVE=local -./gradlew bootRun +./gradlew app:bootRun ``` ## Development diff --git a/development/run.sh b/development/run.sh index 020889f..cd9996b 100755 --- a/development/run.sh +++ b/development/run.sh @@ -3,4 +3,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) docker compose -f "$SCRIPT_DIR/docker-compose.yml" up -d cd $SCRIPT_DIR/.. -SPRING_PROFILES_ACTIVE=local ./gradlew bootRun \ No newline at end of file +SPRING_PROFILES_ACTIVE=local ./gradlew app:bootRun \ No newline at end of file diff --git a/openapi/build.gradle b/openapi/build.gradle index e128f6f..75e66b2 100644 --- a/openapi/build.gradle +++ b/openapi/build.gradle @@ -1,15 +1,8 @@ plugins { id 'java' - id 'io.spring.dependency-management' -} - -dependencies { - implementation project('server') - implementation project('client-history') - implementation project('client-keycloak') - implementation project('client-preferences') } ext { openapiVersion = '7.4.0' + springBootVersion = '3.2.3' } \ No newline at end of file diff --git a/openapi/client-history/build.gradle b/openapi/client-history/build.gradle index 7b734d2..ef47381 100644 --- a/openapi/client-history/build.gradle +++ b/openapi/client-history/build.gradle @@ -1,13 +1,11 @@ plugins { id 'java' id 'idea' - id 'org.springframework.boot' - id 'io.spring.dependency-management' id 'org.openapi.generator' } dependencies { - compileOnly 'org.springframework.boot:spring-boot-starter-webflux' + compileOnly "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion" compileOnly "org.openapitools:openapi-generator:$openapiVersion" } @@ -52,11 +50,3 @@ idea { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } } - -bootJar { - enabled = false -} - -jar { - enabled = true -} \ No newline at end of file diff --git a/openapi/client-keycloak/build.gradle b/openapi/client-keycloak/build.gradle index eff24ec..21229bc 100644 --- a/openapi/client-keycloak/build.gradle +++ b/openapi/client-keycloak/build.gradle @@ -1,13 +1,11 @@ plugins { id 'java' id 'idea' - id 'org.springframework.boot' - id 'io.spring.dependency-management' id 'org.openapi.generator' } dependencies { - compileOnly 'org.springframework.boot:spring-boot-starter-webflux' + compileOnly "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion" compileOnly "org.openapitools:openapi-generator:$openapiVersion" } @@ -51,12 +49,4 @@ idea { module { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } -} - -bootJar { - enabled = false -} - -jar { - enabled = true } \ No newline at end of file diff --git a/openapi/client-preferences/build.gradle b/openapi/client-preferences/build.gradle index 668dc37..8342ee3 100644 --- a/openapi/client-preferences/build.gradle +++ b/openapi/client-preferences/build.gradle @@ -1,13 +1,11 @@ plugins { id 'java' id 'idea' - id 'org.springframework.boot' - id 'io.spring.dependency-management' id 'org.openapi.generator' } dependencies { - compileOnly 'org.springframework.boot:spring-boot-starter-webflux' + compileOnly "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion" compileOnly "org.openapitools:openapi-generator:$openapiVersion" } @@ -56,11 +54,3 @@ idea { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } } - -bootJar { - enabled = false -} - -jar { - enabled = true -} \ No newline at end of file diff --git a/openapi/server/build.gradle b/openapi/server/build.gradle index bdb7b1e..95206ed 100644 --- a/openapi/server/build.gradle +++ b/openapi/server/build.gradle @@ -1,15 +1,14 @@ plugins { id 'java' id 'idea' - id 'org.springframework.boot' - id 'io.spring.dependency-management' id 'org.openapi.generator' } dependencies { - compileOnly 'org.springframework.boot:spring-boot-starter-webflux' + compileOnly "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion" compileOnly "org.openapitools:openapi-generator:$openapiVersion" - // implementation 'jakarta.validation:jakarta.validation-api:3.0.2' + compileOnly 'jakarta.validation:jakarta.validation-api:3.0.2' + constraints { compileOnly('io.swagger.core.v3:swagger-annotations:2.2.5') { @@ -59,12 +58,4 @@ idea { module { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } -} - -bootJar { - enabled = false -} - -jar { - enabled = true } \ No newline at end of file -- cgit 1.2.3-korg