-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
84 lines (70 loc) · 2.17 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
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
group = "com.timgroup"
ext.releaseVersion = '1.0'
version = version(project)
dependencies {
testCompile group: "junit", name: 'junit-dep', version: "4.9"
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.1'
testCompile (group: 'org.mockito', name: 'mockito-core', version: '1.8.5') {
exclude module: 'hamcrest-core'
}
}
repositories {
mavenCentral()
}
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
}
project('Option-Utils') {
dependencies {
compile project(':Option-Main')
}
}
project('Option-Main') {
dependencies {
compile group: 'com.timgroup', name: 'Functional', version: '1.0'
compile group: 'com.googlecode.lambdaj', name: 'lambdaj', version: '2.3.1'
}
repositories {
maven {
url 'http://lambdaj.googlecode.com/svn/repo/releases'
}
}
}
project('Option-Scala') {
ext.scalaVersion = "2.9.0-1"
dependencies {
compile project(':Option-Main')
compile "org.scala-lang:scala-library:$scalaVersion"
}
}
//task jarAll(type: Jar, dependsOn: subprojects.assemble) {
// baseName = 'Option-all'
// subprojects.each { subproject ->
// if (!subproject.name.contains('Scala'))
// from subproject.configurations.archives.allArtifactFiles.collect { zipTree(it) }
// }
//}
def version(Project project) {
def releaseVersion = '0';
if (project.hasProperty('releaseVersion') && !project.releaseVersion.isEmpty()) {
releaseVersion = project.releaseVersion
}
String projectVersion
def ciBuildNumber = System.getenv("BUILD_NUMBER")
if (ciBuildNumber == null || ciBuildNumber.isEmpty()) {
projectVersion = releaseVersion + '.0.' + (new Date()).format("yyyyMMdd-HHmmss") + '-dev'
} else {
projectVersion = releaseVersion + '.' + ciBuildNumber
}
return projectVersion
}