-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
75 lines (60 loc) · 1.82 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
plugins {
id 'io.micronaut.application'
id 'com.gradleup.shadow'
id 'io.micronaut.openapi'
id 'backend.server-conventions'
}
dependencies {
implementation(project(":core"))
// OpenAPI support
annotationProcessor(mn.micronaut.openapi)
compileOnly(mn.micronaut.openapi.annotations)
// To try out the functions locally via a Netty HTTP server
developmentOnly(mn.micronaut.http.server.netty)
// For rendering the MDENet Education Platform tools JSON file
implementation("org.eclipse.epsilon:org.eclipse.epsilon.egl.engine:${epsilonVersion}")
// For testing the additional logic for exposing the services as an MDENet EP tool
testImplementation(mn.micronaut.http.client)
testImplementation(mn.micronaut.reactor)
}
application {
mainClass = "org.eclipse.epsilon.labs.playground.Application"
}
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("org.eclipse.epsilon.labs.playground.fn.*")
}
}
tasks.named("dockerBuild") {
images = (
dockerTags
.split(',')
.collect {"ghcr.io/epsilonlabs/playground-backend/ep-tool-server:${it}"}
)
}
// Webpack for syntax highlighting
def webpackBuildDir = "build/webpack"
task webpack(type: Exec) {
inputs.file("package-lock.json").withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("src/main/js").withPathSensitivity(PathSensitivity.RELATIVE)
inputs.file("webpack.config.js")
outputs.dir(webpackBuildDir)
outputs.cacheIf { true }
commandLine 'sh', '-c', "npm ci && node_modules/.bin/webpack"
}
sourceSets {
main {
resources {
srcDir webpackBuildDir
}
}
}
tasks.named('processResources') {
dependsOn webpack
}
tasks.named('inspectRuntimeClasspath') {
dependsOn webpack
}