Skip to content

Commit 9715147

Browse files
committed
Modernize gradle build scripts
Includes: - Translate Groovy DSL to Kotlin DSL - Implement 'convention plugin' (see https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html#sec:convention_plugins_vs_cross_configuration) - Implement version catalog - Upgrade to gradle 8.7 - Implement ktlint and correct code format problems - Translate remaining Java files into Kotlin
1 parent aa7c320 commit 9715147

File tree

717 files changed

+18815
-16536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

717 files changed

+18815
-16536
lines changed

.editorconfig

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,23 @@ root = true
88
# Change these settings to your own preference
99
indent_style = space
1010
indent_size = 4
11-
continuation_indent_size = 8
11+
ij_continuation_indent_size = 8
1212

1313
# We recommend you to keep these unchanged
1414
end_of_line = lf
1515
charset = utf-8
1616
trim_trailing_whitespace = true
1717
insert_final_newline = true
1818

19+
[{*.kt,*.kts}]
20+
ktlint_code_style = ktlint_official
21+
ij_kotlin_packages_to_use_import_on_demand = java.util.*
22+
23+
[{*.java}]
24+
1925
[*.ts]
2026
quote_type = single
21-
continuation_indent_size = 4
27+
ij_continuation_indent_size = 4
2228

2329
[*.md]
2430
trim_trailing_whitespace = false

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ out/
8989
######################
9090
# Gradle
9191
######################
92-
.gradle/
93-
/build/
92+
.gradle
93+
build
9494
.gradletasknamecache
9595

9696
######################

Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,33 @@ COPY .yarn /code/.yarn
1919
RUN yarn install --network-timeout 1000000
2020

2121
COPY gradle gradle
22-
COPY gradlew build.gradle gradle.properties settings.gradle /code/
23-
COPY radar-auth/build.gradle radar-auth/
22+
COPY gradlew build.gradle.kts gradle.properties settings.gradle.kts /code/
23+
COPY radar-auth/build.gradle.kts radar-auth/
24+
COPY portal/build.gradle.kts portal/
25+
COPY buildSrc/ buildSrc/
2426

2527
RUN ./gradlew downloadDependencies
2628

27-
# now we copy our application source code and build it
28-
2929
COPY angular.json proxy.conf.json tsconfig.app.json \
3030
tsconfig.spec.json tsconfig.json tslint.json /code/
3131
COPY webpack webpack
3232

33+
COPY portal portal
3334
COPY radar-auth radar-auth
34-
COPY src src
35+
36+
WORKDIR /code/portal
3537
RUN ./gradlew -s bootWar
3638

3739
# Run stage
3840
FROM eclipse-temurin:17-jre
3941

4042
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
4143
JHIPSTER_SLEEP=0 \
42-
JAVA_OPTS=""
44+
JAVA_OPTS=""
4345

4446
# Add the war and changelogs files from build stage
45-
COPY --from=builder /code/build/libs/*.war /app.war
46-
COPY --from=builder /code/src/main/docker/etc /mp-includes
47+
COPY --from=builder build/libs/*.war /app.war
48+
COPY --from=builder src/main/docker/etc /mp-includes
4749

4850
EXPOSE 8080 5701/udp
4951
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \

0 commit comments

Comments
 (0)