-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
44 lines (35 loc) · 1.07 KB
/
Copy pathbuild.gradle
File metadata and controls
44 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
}
group = 'com.codealpha'
version = '1.0.0'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
// Spring Boot Web (REST API support)
implementation 'org.springframework.boot:spring-boot-starter-web'
// Spring Boot Data JPA (database support)
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// H2 In-Memory Database (no external DB needed)
runtimeOnly 'com.h2database:h2'
// Spring Boot Validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
// Testing dependencies
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
// Custom task to display build info
tasks.register('buildInfo') {
doLast {
println "Project: ${project.name}"
println "Version: ${project.version}"
println "Java: ${sourceCompatibility}"
println "Build time: ${new Date()}"
}
}