Skip to content

Commit 91bf5f7

Browse files
committed
feat: replace maven with gradle
1 parent 488012e commit 91bf5f7

File tree

13 files changed

+355
-673
lines changed

13 files changed

+355
-673
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "maven"
3+
- package-ecosystem: "gradle"
44
directory: "/"
55
schedule:
66
interval: "weekly"

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
with:
2121
distribution: 'temurin'
2222
java-version: ${{ matrix.java-version }}
23-
cache: 'maven'
23+
cache: 'gradle'
2424

2525
- name: Run tests
26-
run: ./mvnw clean test -B
26+
run: ./gradlew test -x processTestAot
2727

2828
- uses: graalvm/setup-graalvm@v1
2929
with:
3030
distribution: 'liberica'
3131
java-version: ${{ matrix.graalvm-version }}
32-
cache: 'maven'
32+
cache: 'gradle'
3333

3434
- name: GraalVM Compile
35-
run: ./mvnw clean -Pnative native:compile
35+
run: ./gradlew nativeCompile
3636
continue-on-error: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ properties/local.properties
33
logs
44
.idea/
55
*.iml
6+
.gradle
7+
build/
8+
!**/src/main/**/build/
9+
!**/src/test/**/build/

.mvn/wrapper/maven-wrapper.properties

Lines changed: 0 additions & 19 deletions
This file was deleted.

build.gradle.kts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
plugins {
2+
java
3+
checkstyle
4+
id("org.springframework.boot") version "4.0.0-RC2"
5+
id("io.spring.dependency-management") version "1.1.7"
6+
id("org.graalvm.buildtools.native") version "0.11.2"
7+
}
8+
9+
group = "com.mpalourdio.projects"
10+
version = "1.0.0-SNAPSHOT"
11+
description = "Spring Boot Template"
12+
13+
java {
14+
toolchain {
15+
languageVersion = JavaLanguageVersion.of(25)
16+
}
17+
}
18+
19+
repositories {
20+
mavenCentral()
21+
}
22+
23+
configurations {
24+
compileOnly {
25+
extendsFrom(configurations.annotationProcessor.get())
26+
}
27+
}
28+
29+
extra["springCloudVersion"] = "2025.1.0-RC1"
30+
extra["commonTextVersion"] = "1.14.0"
31+
extra["poiVersion"] = "4.1.2"
32+
extra["mavenCheckstylePluginConfigLocation"] =
33+
"https://raw.githubusercontent.com/mpalourdio/configuration/main/checkstyle.xml"
34+
//temp fix for https://github.com/testcontainers/testcontainers-java/issues/11212
35+
extra["testcontainers.version"] =
36+
"2.0.2"
37+
38+
checkstyle {
39+
config = resources.text.fromUri("${property("mavenCheckstylePluginConfigLocation")}")
40+
toolVersion = "12.1.1"
41+
}
42+
tasks.checkstyleTest { enabled = false }
43+
44+
dependencies {
45+
implementation("org.springframework.boot:spring-boot-starter-web")
46+
implementation("org.springframework.boot:spring-boot-starter-restclient")
47+
implementation("org.springframework.boot:spring-boot-starter-actuator")
48+
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
49+
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
50+
implementation("org.springframework.boot:spring-boot-starter-security")
51+
implementation("org.springframework.boot:spring-boot-starter-webflux")
52+
implementation("org.springframework.cloud:spring-cloud-starter-config")
53+
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
54+
55+
implementation("commons-codec:commons-codec")
56+
implementation("org.apache.commons:commons-lang3")
57+
implementation("org.apache.commons:commons-text:${property("commonTextVersion")}")
58+
implementation("org.apache.poi:poi:${property("poiVersion")}")
59+
runtimeOnly("org.postgresql:postgresql")
60+
implementation("org.apache.httpcomponents.client5:httpclient5")
61+
implementation("com.google.code.gson:gson")
62+
63+
annotationProcessor("org.projectlombok:lombok")
64+
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
65+
66+
developmentOnly("org.springframework.boot:spring-boot-devtools")
67+
developmentOnly("org.springframework.boot:spring-boot-properties-migrator")
68+
69+
testImplementation("org.springframework.boot:spring-boot-starter-test")
70+
testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
71+
testImplementation("org.springframework.boot:spring-boot-starter-data-jpa-test")
72+
testImplementation("org.springframework.boot:spring-boot-starter-webflux-test")
73+
testImplementation("org.springframework.boot:spring-boot-starter-security-test")
74+
testImplementation("org.springframework.boot:spring-boot-testcontainers")
75+
testImplementation("org.testcontainers:testcontainers-junit-jupiter")
76+
testImplementation("org.testcontainers:testcontainers-postgresql")
77+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
78+
}
79+
80+
dependencyManagement {
81+
imports {
82+
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
83+
}
84+
}
85+
86+
tasks.withType<Test> {
87+
useJUnitPlatform()
88+
}

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.gradle.configuration-cache=true
2+

gradle/wrapper/gradle-wrapper.jar

44.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)