-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
69 lines (56 loc) · 1.63 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
buildscript {
dependencies {
classpath "gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.22.1"
}
}
plugins {
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id 'com.palantir.docker' version '0.22.1'
}
group = 'io.github.iethem'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.firebase:firebase-admin:6.12.2'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
docker {
name "iethem/${project.name}:latest"
tags 'latest'
dockerfile file('src/main/docker/Dockerfile')
files tasks.jar.outputs,
'src/main/docker/run.sh'
copySpec.rename("${project.name}-${version}.jar", "app.jar")
buildArgs([BUILD_VERSION: "${version}"])
buildArgs([PROJECT: "${project.name}"])
labels(['project': "${project.name}"])
}
test {
useJUnitPlatform()
}
task npmInstall(type: Exec) {
workingDir 'src/main/javascript'
commandLine 'npm', 'install'
}
task npmBuild(type: Exec) {
workingDir 'src/main/javascript'
commandLine 'npm', 'run', 'build'
}
task deleteOldBuild(type: Delete) {
delete "src/main/resources/web/"
}
task copyNewBuild(type: Copy) {
from 'src/main/javascript/build'
into 'src/main/resources/web/'
}
copyNewBuild.dependsOn(deleteOldBuild)