forked from poiati/gmongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (59 loc) · 1.78 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
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'signing'
group = 'com.gmongo'
version = '0.9.6'
artifact = 'gmongo'
bundleDir = "$buildDir/bundle"
repositories {
mavenCentral()
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.6'
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '2.7.3'
testCompile group: 'junit', name: 'junit', version: '4.10'
}
task source << {
ant.jar(destfile: "$buildDir/$artifact-${version}-sources.jar") {
fileset (dir: 'src/main/groovy', includes: '**/*.groovy')
}
}
task prepareBundle(dependsOn: [ 'build', 'source', 'groovydoc', 'pom' ]) << {
ant.copy(file: "$buildDir/libs/$artifact-${version}.jar", todir: bundleDir)
ant.copy(file: "$buildDir/$artifact-$version-sources.jar", todir: bundleDir)
ant.copy(file: "$buildDir/pom.xml", todir: bundleDir)
ant.jar(destfile: "$bundleDir/$artifact-$version-javadoc.jar") {
fileset (dir: "$buildDir/docs/groovydoc")
}
sign(new File(bundleDir).listFiles());
}
task packBundle << {
ant.jar(destfile: "$bundleDir/$artifact-$version-bundle.jar", basedir: new File(bundleDir))
}
task pom << {
pom {
project {
name artifact
description 'Mongodb for Groovy'
url 'http://blog.paulopoiati.com/2010/06/20/gmongo-0-5-released/'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
url 'http://github.com/poiati/gmongo'
}
developers {
developer {
name 'Paulo Poiati'
email '[email protected]'
url 'http://blog.paulopoiati.com'
}
}
}
}.writeTo("$buildDir/pom.xml")
}