-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
151 lines (126 loc) · 4.24 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
plugins {
id 'java'
id 'application'
id 'com.github.node-gradle.node' version '5.0.0'
id 'jacoco'
id 'maven-publish'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
node {
nodeProjectDir = file("${project.projectDir.toPath().resolve("scheduling-dsl-compiler")}")
version = '20.12.1'
download = true
}
task deleteConstraintsTypescript(type: Delete) {
delete project.projectDir.toPath().resolve('scheduling-dsl-compiler/src/libs/constraints')
}
task copyConstraintsTypescript(type: Copy) {
dependsOn deleteConstraintsTypescript
dependsOn ':merlin-server:assembleConstraintsDSLCompiler'
from rootDir.toPath().resolve('merlin-server/constraints-dsl-compiler/src/libs')
into project.projectDir.toPath().resolve('scheduling-dsl-compiler/src/libs/constraints')
}
clean {
dependsOn deleteConstraintsTypescript
}
task assembleSchedulingDSLCompiler(type: NpmTask) {
dependsOn copyConstraintsTypescript
dependsOn processResources
dependsOn npmInstall
args = ['--silent', 'run', 'build']
inputs.files('package.json', 'package-lock.json', 'tsconfig.json')
inputs.dir('src')
}
task generateDocumentation(type: NpmTask) {
dependsOn npmInstall
dependsOn processResources
dependsOn copyConstraintsTypescript
dependsOn assembleSchedulingDSLCompiler
args = ['--silent', 'run', 'generate-doc']
inputs.files('package.json', 'package-lock.json', 'tsconfig.json')
inputs.dir('src')
}
task cleanDocsFromDocsDir(type: Delete) {
delete rootDir.toPath().resolve('docs/edsl-api-docs/scheduling-edsl-api/develop')
}
task publishDocs {
dependsOn cleanDocsFromDocsDir
dependsOn generateDocumentation
}
assemble {
dependsOn assembleSchedulingDSLCompiler
dependsOn generateDocumentation
}
test {
dependsOn nodeSetup
dependsOn assembleSchedulingDSLCompiler
useJUnitPlatform()
testLogging {
exceptionFormat 'full'
}
// Add node bin directory to PATH, helps CI/CD services without node installed
environment 'NODE_PATH', node.computedNodeDir.get().toString().concat("/bin/node")
environment "SCHEDULING_DSL_COMPILER_ROOT", projectDir.toPath().resolve('scheduling-dsl-compiler')
environment "SCHEDULING_DSL_COMPILER_COMMAND", './build/main.js'
dependsOn ":examples:banananation:assemble"
dependsOn ":examples:minimal-mission-model:assemble"
environment 'AERIE_ROOT', rootDir.toString()
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
application {
mainClass = 'gov.nasa.jpl.aerie.scheduler.worker.SchedulerWorkerAppDriver'
applicationDefaultJvmArgs = ['-Xmx2g']
}
// Link references to standard Java classes to the official Java 11 documentation.
javadoc.options.links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
javadoc.options.links 'https://commons.apache.org/proper/commons-lang/javadocs/api-3.9/'
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
dependencies {
implementation project(':merlin-driver')
implementation project(':scheduler-driver')
implementation project(':scheduler-server')
implementation project(':parsing-utilities')
implementation project(':constraints')
implementation 'io.javalin:javalin:5.6.3'
implementation 'org.slf4j:slf4j-simple:2.0.7'
implementation 'org.eclipse:yasson:3.0.3'
implementation 'org.postgresql:postgresql:42.6.1'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'com.zaxxer:HikariCP:5.0.1'
testImplementation project(':examples:foo-missionmodel')
testImplementation testFixtures(project(':scheduler-server'))
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
publishing {
publications {
library(MavenPublication) {
version = findProperty('publishing.version')
from components.java
}
}
publishing {
repositories {
maven {
name = findProperty("publishing.name")
url = findProperty("publishing.url")
credentials {
username = System.getenv(findProperty("publishing.usernameEnvironmentVariable"))
password = System.getenv(findProperty("publishing.passwordEnvironmentVariable"))
}
}
}
}
}