Skip to content

Commit

Permalink
Feature/update gradle build (#3496)
Browse files Browse the repository at this point in the history
* Oppdatert diverse spring dependencies og gradle byggescript
* Oppdatert gradle til siste versjon
* Refaktorert deprecated argumenter under gradle setup og build
* Oppdatert frontend rammeverk og migrert kode til å støtte React-pdf v9
  • Loading branch information
stigus authored Jun 4, 2024
1 parent e0eb245 commit 45ea913
Show file tree
Hide file tree
Showing 315 changed files with 1,143 additions and 1,123 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/common.integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
java-version: 21
distribution: 'temurin'
- name: "Gradle"
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: "Build"
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
uses: gradle/gradle-build-action@v2
with:
arguments: assemble --scan
cache-read-only: false
run: ./gradlew assemble --scan
- name: "Start docker containers"
run: |
JWK=$(cat ./mocks/jwk.json) docker-compose up -d --build
Expand All @@ -43,11 +44,12 @@ jobs:
echo Wait on service...
bash -c 'while [[ "$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' ${{ inputs.healthcheck }})" != "200" ]]; do echo ...; sleep 5; done; echo Service is up;'
- name: "Run integration tests"
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: iTest --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew iTest --scan
- name: "Stop docker containers"
run: |
docker-compose down -v --remove-orphans
11 changes: 6 additions & 5 deletions .github/workflows/common.workflow.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || ''}} --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || ''}} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -115,7 +116,7 @@ jobs:
image: ${{ steps.docker-build-push.outputs.image }}

deploy:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy == 'true'
concurrency: ${{ inputs.image-suffix }}
runs-on: ubuntu-latest
Expand All @@ -130,7 +131,7 @@ jobs:
VAR: image=${{ needs.build.outputs.image }}

deploy-test:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-test == 'true'
concurrency: ${{ inputs.image-suffix }}-test
runs-on: ubuntu-latest
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/common.workflow.frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,18 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
cache-read-only: false
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: "Reporting"
if: failure() && steps.gradle.outcome == 'failure'
uses: actions/upload-artifact@v4
Expand All @@ -149,7 +153,7 @@ jobs:
image: ${{ steps.docker-build-push.outputs.image }}

deploy:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy == 'true'
concurrency: ${{ inputs.image-suffix }}
runs-on: ubuntu-latest
Expand All @@ -164,7 +168,7 @@ jobs:
VAR: image=${{ needs.build.outputs.image }}

deploy-test:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-test == 'true'
concurrency: ${{ inputs.image-suffix }}-test
runs-on: ubuntu-latest
Expand All @@ -180,7 +184,7 @@ jobs:

# Only used by dolly-frontend.
deploy-idporten:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-idporten == 'true'
concurrency: ${{ inputs.image-suffix }}-idporten
runs-on: ubuntu-latest
Expand All @@ -196,7 +200,7 @@ jobs:

# Only used by dolly-frontend.
deploy-unstable:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-unstable == 'true'
concurrency: ${{ inputs.image-suffix }}-unstable
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/common.workflow.libs.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
- name: "Gradle"
uses: gradle/actions/setup-gradle@v3
- name: "Create version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,44 +47,32 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :avro-schema:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :avro-schema:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release data-transfer-objects"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :data-transfer-objects:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :data-transfer-objects:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-core"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-core:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :reactive-core:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-proxy"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-proxy:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :reactive-proxy:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-security"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-security:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :reactive-security:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-frontend"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-frontend:publish -PreleaseVersion=${{ env.VERSION }}
run: ./gradlew :reactive-frontend:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Git tag og push"
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions apps/adresse-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java'
id "org.sonarqube" version "4.4.1.3373"
id 'org.springframework.boot' version "3.2.1"
id 'io.spring.dependency-management' version "1.1.4"
id "org.sonarqube" version "5.0.0.4638"
id 'org.springframework.boot' version "3.2.6"
id 'io.spring.dependency-management' version "1.1.5"
id "jacoco"
}

Expand Down Expand Up @@ -33,7 +33,7 @@ bootJar {
dependencyManagement {
applyMavenExclusions = false
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions apps/adresse-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.enterprise" version "3.12.3"
id "com.gradle.develocity" version "3.17.4"
}

rootProject.name = 'adresse-service'
Expand All @@ -10,9 +10,9 @@ includeBuild '../../libs/servlet-security'
includeBuild '../../libs/data-transfer-objects'


gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
}
}
8 changes: 4 additions & 4 deletions apps/amelding-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java'
id "org.sonarqube" version "4.4.1.3373"
id 'org.springframework.boot' version "3.2.1"
id 'io.spring.dependency-management' version "1.1.4"
id "org.sonarqube" version "5.0.0.4638"
id 'org.springframework.boot' version "3.2.6"
id 'io.spring.dependency-management' version "1.1.5"
id "jacoco"
}

Expand Down Expand Up @@ -33,7 +33,7 @@ bootJar {
dependencyManagement {
applyMavenExclusions = false
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions apps/amelding-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.enterprise" version "3.12.3"
id "com.gradle.develocity" version "3.17.4"
}

rootProject.name = 'amelding-service'
Expand All @@ -11,9 +11,9 @@ includeBuild '../../libs/commands'
includeBuild '../../libs/avro-schema'
includeBuild '../../libs/data-transfer-objects'

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
}
}
8 changes: 4 additions & 4 deletions apps/app-tilgang-analyse-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java'
id "org.sonarqube" version "4.4.1.3373"
id 'org.springframework.boot' version "3.2.1"
id 'io.spring.dependency-management' version "1.1.4"
id "org.sonarqube" version "5.0.0.4638"
id 'org.springframework.boot' version "3.2.6"
id 'io.spring.dependency-management' version "1.1.5"
id "jacoco"
}

Expand Down Expand Up @@ -32,7 +32,7 @@ bootJar {
dependencyManagement {
applyMavenExclusions = false
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions apps/app-tilgang-analyse-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.enterprise" version "3.12.3"
id "com.gradle.develocity" version "3.17.4"
}

rootProject.name = 'app-tilgang-analyse-service'
Expand All @@ -8,9 +8,9 @@ includeBuild '../../libs/reactive-core'
includeBuild '../../libs/reactive-security'
includeBuild '../../libs/data-transfer-objects'

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
}
}
14 changes: 7 additions & 7 deletions apps/arbeidsforhold-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java'
id "org.sonarqube" version "4.4.1.3373"
id 'org.springframework.boot' version "3.2.1"
id 'io.spring.dependency-management' version "1.1.4"
id "org.sonarqube" version "5.0.0.4638"
id 'org.springframework.boot' version "3.2.6"
id 'io.spring.dependency-management' version "1.1.5"
id "jacoco"
}

Expand Down Expand Up @@ -33,7 +33,7 @@ bootJar {
dependencyManagement {
applyMavenExclusions = false
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1'
}
}

Expand All @@ -44,8 +44,8 @@ repositories {

dependencies {

implementation 'com.google.guava:guava:31.1-jre'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
implementation 'com.google.guava:guava:33.2.0-jre'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
implementation 'javax.activation:activation:1.1.1'
implementation 'org.glassfish.jaxb:jaxb-runtime'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
Expand All @@ -69,7 +69,7 @@ dependencies {
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20'
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21'

implementation 'net.logstash.logback:logstash-logback-encoder:7.4'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 45ea913

Please sign in to comment.