This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
176 lines (142 loc) · 5.47 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'org.standardout:bnd-platform:1.2.0'
classpath 'org.standardout:gradle-versioneye-plugin:1.0.0'
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3+'
}
}
apply plugin: 'org.standardout.bnd-platform'
apply plugin: 'org.standardout.versioneye'
defaultTasks 'clean', 'updateSiteZip'
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
repositories {
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url 'http://repo.typesafe.com/typesafe/maven-releases'
}
}
ext {
scalaVersion = '2.10'
playVersion = '2.2.3'
jgitVersion = '3.2.0.201312181205-r'
akkaVersion = '2.2.4' // Play 2.2 not compatible with Akka 2.3
scalaLoggingVersion = '2.1.2' // Scala 2.11 needed for 3+
}
configurations {
platform {
// exclude Scala (provided through other means)
exclude group: 'org.scala-lang', module: 'scala-library'
// exclude slf4-api (causes conflict (wtf!) with newer version in HALE platform)
exclude group: 'org.slf4j', module: 'slf4j-api'
// don't want any slf4j-log4j
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
// in Akka 2.2 akka-osgi contains akka-actor (and depends on it)
// exclude akka-actor to prevent package uses conflicts
// XXX remove if switching to 2.3 or higher
exclude group: 'com.typesafe.akka', module: "akka-actor_$scalaVersion" as String
}
}
dependencies {
// secure social
platform group: "ws.securesocial", name: "securesocial_$scalaVersion", version: "2.1.4", {
// exclude anything play related (we only depend on model classes)
exclude group: 'com.typesafe.play'
exclude group: 'com.typesafe'
}
// newman
//XXX to many dependencies for my taste (though it is planned for it to be split in modules)
//platform group: "com.stackmob", name: "newman_$scalaVersion", version: "1.3.5"
// Async Http Client
platform 'com.ning:async-http-client:1.8.13'
// Scala Logging
// XXX don't use scala-logging as it (even version 2) does not work reliable
// with Scala 2.10 (see https://github.com/typesafehub/scala-logging/issues/16)
// platform group: "com.typesafe.scala-logging", name: "scala-logging-slf4j_$scalaVersion", version: scalaLoggingVersion
// Grizzled SLF4J
platform group: 'org.clapper', name: "grizzled-slf4j_$scalaVersion", version: '1.0.2'
// play Json API
platform group: "com.typesafe.play", name: "play-json_$scalaVersion", version: playVersion
// slick 2
platform group: "com.typesafe.slick", name: "slick_$scalaVersion", version: "2.0.1"
// H2 database for tests
platform group: 'com.h2database', name: 'h2', version: '1.3.175'
// needed in addition to joda-time as otherwise Scala will complain about missing constructors (e.g. in DateTime)
platform 'org.joda:joda-convert:1.4'
// data sources
platform 'commons-dbcp:commons-dbcp:1.4'
// staxon
platform 'de.odysseus.staxon:staxon:1.3'
// JGit
platform group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: jgitVersion
platform group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.java7', version: jgitVersion
// Commons Email
platform 'org.apache.commons:commons-email:1.3.3'
// Twirl API
platform group: 'com.typesafe.play', name: "twirl-api_$scalaVersion", version: '1.0.2'
// Jackson JAXB Module (nice approach but does not support JAXBElement)
// platform group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.4.0'
// EclipseLink MOXy
platform 'org.eclipse.persistence:org.eclipse.persistence.moxy:2.5.2'
}
platform {
// generate package imports w/ version numbers
determineImportVersions = true
bnd group: "ws.securesocial", name: "securesocial_$scalaVersion", {
// exclude anything play related (we only depend on model classes)
instruction 'Export-Package', "securesocial.core.*;version=$version"
// make play related imports optional
optionalImport 'play.*', 'com.typesafe.plugin', 'views.*'
}
bnd group: 'com.h2database', name: 'h2', {
optionalImport 'org.osgi.service.jdbc'
}
// JDBC drivers
def jdbcBundles = ['org.h2', 'org.postgresql.jdbc']
def requireJdbc = jdbcBundles.collect{ it + ';resolution:=optional' }.join(',')
bnd group: "com.typesafe.slick", name: "slick_$scalaVersion", {
// slick must be able to access the database drivers (uses Class.forName)
instruction 'Require-Bundle', requireJdbc
}
bnd 'commons-dbcp:commons-dbcp', {
// dbcp must be able to access database drivers
instruction 'Require-Bundle', requireJdbc
}
// Typesafe config
// explicit dependency to update version to at least 1.2.1 (contains needed fix https://github.com/typesafehub/config/pull/147)
bundle group: 'com.typesafe', name: 'config', version: '1.2.1'
// Akka
bundle group: 'com.typesafe.akka', name: "akka-osgi_$scalaVersion", version: akkaVersion, {
bnd {
// allow using fixed version of config
prependImport 'com.typesafe.config;version=1.2.1'
}
}
bundle group: 'com.typesafe.akka', name: "akka-testkit_$scalaVersion", version: akkaVersion, {
bnd {
// allow using fixed version of config
prependImport 'com.typesafe.config;version=1.2.1'
}
}
// extJWNL
merge {
bundle group: 'net.sf.extjwnl', name: 'extjwnl', version: '1.8.0'
bundle group: 'net.sf.extjwnl', name: 'extjwnl-data-wn31', version: '1.2'
bnd {
symbolicName = 'net.sf.extjwnl'
bundleName = 'extJWNL with default resource'
version = '1.8.0.wn31-12'
}
}
}