-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
116 lines (98 loc) · 3.35 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
/*
* Copyright (c) 2010 Yahoo! Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License. See accompanying LICENSE file.
*/
/*
* S4-Meter Top Level Build Script
*
*
*
*/
allprojects {
}
version = new Version(major: 0, minor: 1, releaseType: 'SNAPSHOT')
group = 'io.s4'
/* Read environment variables. */
env = System.getenv()
s4Image = env['S4_IMAGE']
if (s4Image == null) {
logger.warn("\nEnvironment variable S4_IMAGE not set.")
System.exit(-1)
}
/* All project libraries must be defined here. */
libraries = [
s4_core: 'io.s4:s4-core:0.3-SNAPSHOT',
s4_driver: 'io.s4:s4-driver:0.3-SNAPSHOT',
restlet_api: 'org.restlet.jse:org.restlet:2.0.6',
restlet_json: 'org.restlet.jse:org.restlet.ext.json:2.0.6',
restlet_xml: 'org.restlet.jse:org.restlet.ext.xml:2.0.6',
json: 'org.json:json:20090211',
log4j: 'log4j:log4j:1.2.15',
junit: 'junit:junit:3.8.1',
jakarta_regexp: 'jakarta-regexp:jakarta-regexp:1.4',
commons_logging: 'commons-logging:commons-logging:1.1.1',
commons_io: 'commons-io:commons-io:2.0.1',
commons_config: 'commons-configuration:commons-configuration:1.6',
spring: 'org.springframework:spring:2.5.6',
guice: 'com.google.inject:guice:3.0',
junit: 'junit:junit:4.4'
]
subprojects {
apply plugin: 'eclipse'
apply plugin: 'java'
//archivesBaseName = 's4-meter' + '-' + project.name
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
flatDir name: 's4core', dirs: "${s4Image}/s4-core/lib"
flatDir name: 's4driver', dirs: "${s4Image}/s4-driver/lib"
mavenRepo name: "restlet_repo", urls: "http://maven.restlet.org"
mavenLocal()
mavenCentral()
}
/* Dependencies. */
dependencies {
compile( libraries.log4j )
compile( libraries.commons_logging )
compile( libraries.commons_io )
compile( libraries.commons_config )
compile( libraries.restlet_api )
compile( libraries.guice )
testCompile( libraries.junit )
}
manifest.mainAttributes(
provider: 'gradle',
'Implementation-Url': 'http://s4.io',
'Implementation-Version': version,
'Implementation-Vendor': 'The S4 Project',
'Implementation-Vendor-Id': 'io.s4'
)
eclipseClasspath {
downloadSources = false; // required for eclipseClasspath to work
}
}
/* Generates the gradlew scripts.
http://www.gradle.org/1.0-milestone-3/docs/userguide/gradle_wrapper.html */
task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-3'
}
class Version {
int major
int minor
int bugfix
String releaseType
String toString() {
"$major.$minor-$releaseType${bugfix ?: ''}"
}
}