forked from apache/openwhisk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
39 lines (35 loc) · 1015 Bytes
/
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "cz.alenkacz:gradle-scalafmt:${gradle.scalafmt.version}"
}
}
subprojects {
apply plugin: 'scalafmt'
scalafmt.configFilePath = gradle.scalafmt.config
afterEvaluate {
if (project.plugins.hasPlugin('application')
&& project.plugins.hasPlugin('scala')) {
startScripts {
doLast {
unixScript.text = configureUnixClasspath(unixScript)
}
}
}
}
}
def configureUnixClasspath(File script) {
script
.readLines()
.collect { line ->
// Looking for the line that starts with CLASSPATH=
line = line.replaceAll(~/^CLASSPATH=.*$/) { original ->
// Get original line and append it
// with the configuration directory.
original += ':$APP_HOME/ext-lib/*:$APP_HOME/config'
}
}
.join('\n')
}