-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
107 lines (86 loc) · 3.25 KB
/
build.gradle
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
plugins {
id 'java'
id 'application'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.0'
id "com.github.node-gradle.node" version "5.0.0"
id "com.netflix.dgs.codegen" version "5.12.4"
}
group = 'com.gradle1'
version = '0.0.1-SNAPSHOT'
java.sourceCompatibility = JavaVersion.VERSION_20
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
node {
version = '16.15.1'
npmVersion = '9.8.1'
download=true
// workDir = file("${project.projectDir}/src/frontend/nodejs")
// npmWorkDir = file("${project.projectDir}/src/frontend/npm")
// // Set the work directory where node_modules should be located
// nodeModulesDir = file("${project.projectDir}/src/frontend")
}
tasks.register('npmInstallDependencies', NpmTask) {
dependsOn('npmSetup')
execOverrides {
it.ignoreExitValue = true
it.workingDir = 'src/frontend'
}
args = ['install']
}
tasks.register('npmBuild', NpmTask) {
dependsOn('npmInstallDependencies')
execOverrides {
it.workingDir = 'src/frontend'
}
args = ['run', 'build']
}
tasks.register('copyFrontendToBuild', Copy) {
dependsOn('npmBuild')
from "$projectDir/src/frontend/build/"
// include "*"
into "$buildDir/resources/main/static"
}
processResources{
dependsOn 'copyFrontendToBuild'
}
generateJava{
packageName = "ca.myapp.dgs" // The package name to use to generate sources
generateClientv2 = false // Enable generating the type safe query API
subPackageNameTypes = "graph.schema"
// schemaPaths = ["${projectDir}/src/main/resources/schema"]
generatedSourcesDir = "${projectDir}/src/main"
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation files('python')
implementation 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.postgresql:postgresql:42.5.4'
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.2'
//CLOUD GCP FOR POSTGRESQL
// implementation platform('com.google.cloud:spring-cloud-gcp-dependencies:4.5.1')
// implementation 'com.google.cloud:spring-cloud-gcp-starter-sql-postgresql'
//NETFLIX DGS
implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:7.3.4"))
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:7.3.4'
//LOMBOK
compileOnly 'org.projectlombok:lombok:1.18.28'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
//TEST
testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'
testImplementation 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.springframework.graphql:spring-graphql-test'
}
// need to fix test
// tasks.named('test') {
// useJUnitPlatform()
// }
//mainClassName='ca.myapp.Application'