-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
82 lines (71 loc) · 2.56 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
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
////********************************************************************************
//// use local artifacts
////--------------------------------------------------------------------------------
//dependencies {
// classpath files('../build/libs/gradle-jaxb-plugin.jar') // ./gradlew unversionedJar
// //classpath files("/${gradle.gradleHomeDir}/lib/plugins/gradle-jaxb-plugin.jar") // ./gradlew installPlugin
// classpath 'com.google.inject:guice:3.0'
// classpath 'com.google.inject.extensions:guice-assistedinject:3.0'
//}
//********************************************************************************
// use artifacts from the Gradle Plugin repository
//--------------------------------------------------------------------------------
dependencies {
classpath 'gradle.plugin.org.openrepose:gradle-jaxb-plugin:2.5.0'
}
//********************************************************************************
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
subprojects { project ->
if (project.name.endsWith("-schema") ||
Boolean.valueOf(project.getProperties().getOrDefault('doJAXB', 'false'))) {
apply plugin: 'org.openrepose.gradle.plugins.jaxb'
dependencies {
jaxb 'org.glassfish.jaxb:jaxb-xjc:2.2.11'
jaxb 'org.glassfish.jaxb:jaxb-runtime:2.2.11'
}
def generatedDir = "${project.buildDir}/generated-sources/xjc"
jaxb {
xjc {
destinationDir = "$generatedDir"
}
}
apply plugin: 'scala'
tasks.withType(ScalaCompile) { dependsOn('xjc') }
dependencies {
// 54.4. Dependency management
compile 'org.scala-lang:scala-library:2.11.1'
compile 'com.typesafe.scala-logging:scala-logging-slf4j_2.11:2.1.2'
// 7.2. Declaring your dependencies
testCompile group: 'junit', name: 'junit', version: '4.11'
}
sourceSets {
main {
scala {
srcDirs += "$generatedDir"
}
}
}
}
}
tasks.withType(ScalaCompile) {
// 54.9. Compiling in external process
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
}
// 54.10. Incremental compilation
scalaCompileOptions.useAnt = false
}