Skip to content

Commit

Permalink
Modernize gradle build scripts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pvannierop committed Sep 29, 2024
1 parent aa7c320 commit 481bb85
Show file tree
Hide file tree
Showing 717 changed files with 18,809 additions and 16,531 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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ 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 buildSrc/ buildSrc/

RUN ./gradlew downloadDependencies

Expand All @@ -39,7 +40,7 @@ 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
Expand Down
326 changes: 0 additions & 326 deletions build.gradle

This file was deleted.

Loading

0 comments on commit 481bb85

Please sign in to comment.