Skip to content

Commit

Permalink
Modernize gradle build scripts
Browse files Browse the repository at this point in the history
Includes:
- Move management portal code to separate project (no longer present in root project)
- 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
  • Loading branch information
pvannierop committed Sep 27, 2024
1 parent aa7c320 commit f286c17
Show file tree
Hide file tree
Showing 1,267 changed files with 39,473 additions and 37,191 deletions.
10 changes: 8 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ root = true
# Change these settings to your own preference
indent_style = space
indent_size = 4
continuation_indent_size = 8
ij_continuation_indent_size = 8

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.kt,*.kts}]
ktlint_code_style = ktlint_official
ij_kotlin_packages_to_use_import_on_demand = java.util.*

[{*.java}]

[*.ts]
quote_type = single
continuation_indent_size = 4
ij_continuation_indent_size = 4

[*.md]
trim_trailing_whitespace = false
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ out/
######################
# Gradle
######################
.gradle/
/build/
.gradle
build
.gradletasknamecache

######################
Expand Down
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,33 @@ COPY .yarn /code/.yarn
RUN yarn install --network-timeout 1000000

COPY gradle gradle
COPY gradlew build.gradle gradle.properties settings.gradle /code/
COPY radar-auth/build.gradle radar-auth/
COPY gradlew build.gradle.kts gradle.properties settings.gradle.kts /code/
COPY radar-auth/build.gradle.kts radar-auth/
COPY portal/build.gradle.kts portal/
COPY buildSrc/ buildSrc/

RUN ./gradlew downloadDependencies

# now we copy our application source code and build it

COPY angular.json proxy.conf.json tsconfig.app.json \
tsconfig.spec.json tsconfig.json tslint.json /code/
COPY webpack webpack

COPY portal portal
COPY radar-auth radar-auth
COPY src src

WORKDIR /code/portal
RUN ./gradlew -s bootWar

# Run stage
FROM eclipse-temurin:17-jre

ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JHIPSTER_SLEEP=0 \
JAVA_OPTS=""
JAVA_OPTS=""

# Add the war and changelogs files from build stage
COPY --from=builder /code/build/libs/*.war /app.war
COPY --from=builder /code/src/main/docker/etc /mp-includes
COPY --from=builder build/libs/*.war /app.war
COPY --from=builder src/main/docker/etc /mp-includes

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

0 comments on commit f286c17

Please sign in to comment.