-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (76 loc) · 2.63 KB
/
build.gradle
File metadata and controls
87 lines (76 loc) · 2.63 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
plugins {
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.imd'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
/**
* Spring Core dependencies
*
* The version of org.springframework.boot is declared at plugins block that placed top of this script.
*/
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
/**
* Database dependencies
*/
// It would be used until the database setup is done.
runtimeOnly 'com.h2database:h2'
// The version of the connector will be fixed when the database setup is done.
runtimeOnly 'org.postgresql:postgresql'
/**
* Test dependencies
*/
testImplementation 'org.springframework.boot:spring-boot-starter-test'
/**
* Tools
*/
/*Lombok*/
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
/*query dsl*/
implementation group: 'com.querydsl', name: 'querydsl-apt', version: '4.4.0'
implementation group: 'com.querydsl', name: 'querydsl-jpa', version: '4.4.0'
annotationProcessor group: 'com.querydsl', name: 'querydsl-apt', classifier:'jpa', version: '4.4.0'
annotationProcessor group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '1.3.5'
annotationProcessor group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '2.2.3'
/*swagger*/
implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.5.3'
implementation group: 'org.springdoc', name: 'springdoc-openapi-data-rest', version: '1.5.3'
/*devtools*/
developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
ext.profile = (!project.hasProperty('profile') || !profile) ? 'dev' : profile
sourceSets {
main {
java {
}
resources {
srcDirs += ["src/main/resources-${profile}"]
}
}
}
test {
useJUnitPlatform()
}
task buildProd(type: Exec) {
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
commandLine "gradlew.bat"
} else {
commandLine "./gradlew"
}
args "clean", "build", "-Pprofile=prod"
}