Skip to content
Newer
Older
100644 123 lines (101 sloc) 4.23 KB
b3337c3 @kimchy initial commit
kimchy authored
1 import java.text.SimpleDateFormat
2
bd8d52f @kimchy move to SNAPSHOT suffix for dev builds, when an actual release will t…
kimchy authored
3 defaultTasks "clean", "release"
b3337c3 @kimchy initial commit
kimchy authored
4
6ed2374 @kimchy upgrade to gradle 0.9 preview 1
kimchy authored
5 apply plugin: 'base'
b3337c3 @kimchy initial commit
kimchy authored
6
7 archivesBaseName = 'elasticsearch'
8
9 buildTime = new Date()
10 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
11 sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
12 buildTimeStr = sdf.format(buildTime)
13
8cc2638 @kimchy update to 0.9.0 SNAPSHOT
kimchy authored
14 versionNumber = '0.9.0-SNAPSHOT'
b3337c3 @kimchy initial commit
kimchy authored
15
16 explodedDistDir = new File(distsDir, 'exploded')
17 explodedDistLibDir = new File(explodedDistDir, 'lib')
18 explodedDistBinDir = new File(explodedDistDir, 'bin')
19 explodedDistConfigDir = new File(explodedDistDir, 'config')
20
cb7e92b @kimchy start work on the groovy plugin
kimchy authored
21 //mavenRepoUrl = "file://localhost/" + projectDir.absolutePath + "/build/maven/repository"
22 //mavenSnapshotRepoUrl = "file://localhost/" + projectDir.absolutePath + "/build/maven/snapshotRepository"
23 mavenRepoUrl = "http://oss.sonatype.org/service/local/staging/deploy/maven2/"
24 mavenSnapshotRepoUrl = "http://oss.sonatype.org/content/repositories/snapshots"
25 mavenRepoUser = "kimchy"
26 mavenRepoPass = System.getenv("REPO_PASS")
b3337c3 @kimchy initial commit
kimchy authored
27
28 allprojects {
29 group = 'org.elasticsearch'
30 version = versionNumber
31
32 plugins.withType(JavaPlugin).whenPluginAdded {
33 sourceCompatibility = 1.6
34 targetCompatibility = 1.6
35 }
36
37 repositories {
38 mavenCentral()
2642eca @kimchy fix the jboss repo
kimchy authored
39 mavenRepo urls: 'https://repository.jboss.org/nexus/content/groups/public'
751c56f @kimchy Query DSL: custom score (scripted) query, closes #220.
kimchy authored
40 mavenRepo urls: 'http://repository.codehaus.org/'
dfd002b @kimchy add custom elasticsearch repo on google code
kimchy authored
41 mavenRepo urls: 'http://elasticsearch.googlecode.com/svn/maven'
b3337c3 @kimchy initial commit
kimchy authored
42 }
43 }
44
45 configurations {
46 dists
47 distLib {
48 visible = false
49 }
50 }
51
52 dependencies {
53 distLib project(':elasticsearch')
54 }
55
56 task explodedDist(dependsOn: [configurations.distLib], description: 'Builds a minimal distribution image') << {
f6777f1 @kimchy jarjar netty as well, so it won't be exposed to users using elasticse…
kimchy authored
57 ant.delete(dir: explodedDistDir) // clean the exploded dir
b3337c3 @kimchy initial commit
kimchy authored
58 [explodedDistDir, explodedDistLibDir, explodedDistBinDir, explodedDistConfigDir]*.mkdirs()
59 // remove old elasticsearch files
60 ant.delete { fileset(dir: explodedDistLibDir, includes: "$archivesBaseName-*.jar") }
61
62 copy {
63 from configurations.distLib
64 into explodedDistLibDir
65 }
66
67 copy { from('bin'); into explodedDistBinDir }
68 copy { from('config'); into explodedDistConfigDir }
371bfeb @kimchy initial support for process monitoring using sigar
kimchy authored
69 copy { from('lib'); into explodedDistLibDir }
b3337c3 @kimchy initial commit
kimchy authored
70
71 copy {
72 from('.')
73 into explodedDistDir
74 include 'LICENSE.txt'
75 include 'NOTICE.txt'
76 include 'README.textile'
77 }
78
9549b9c @kimchy fix wrong handling of doc ids to load when request is not serialized
kimchy authored
79 ant.delete { fileset(dir: explodedDistLibDir, includes: "$archivesBaseName-*-javadoc.jar") }
80 ant.delete { fileset(dir: explodedDistLibDir, includes: "$archivesBaseName-*-sources.jar") }
bda476e @kimchy Remove dependency on slf4j for logging, create own internal abstracti…
kimchy authored
81 ant.delete { fileset(dir: explodedDistLibDir, includes: "slf4j-*.jar") } // no need for slf4j
70a2a3e @kimchy jarjar jackson and joda
kimchy authored
82 ant.delete { fileset(dir: explodedDistLibDir, includes: "jackson-*.jar") } // no need jackson, we jarjar it
83 ant.delete { fileset(dir: explodedDistLibDir, includes: "joda-*.jar") } // no need joda, we jarjar it
b0e1c58 @kimchy Add online plugin repository and a 'plugin' command to download them,…
kimchy authored
84 ant.delete { fileset(dir: explodedDistLibDir, includes: "snakeyaml-*.jar") } // no need snakeyaml, we jarjar it
371bfeb @kimchy initial support for process monitoring using sigar
kimchy authored
85 ant.delete { fileset(dir: explodedDistLibDir, includes: "sigar-*.jar") } // no need sigar directly under lib...
751c56f @kimchy Query DSL: custom score (scripted) query, closes #220.
kimchy authored
86 ant.delete { fileset(dir: explodedDistLibDir, includes: "netty-*.jar") } // no need netty directly under lib...
87 ant.delete { fileset(dir: explodedDistLibDir, includes: "mvel2-*.jar") } // no need mvel2 directly under lib...
9549b9c @kimchy fix wrong handling of doc ids to load when request is not serialized
kimchy authored
88
b3337c3 @kimchy initial commit
kimchy authored
89 ant.chmod(dir: "$explodedDistDir/bin", perm: "ugo+rx", includes: "**/*")
90 }
91
6ed2374 @kimchy upgrade to gradle 0.9 preview 1
kimchy authored
92 task zip(type: Zip, dependsOn: ['explodedDist']) {
b3337c3 @kimchy initial commit
kimchy authored
93 zipRootFolder = "$archivesBaseName-${-> version}"
6ed2374 @kimchy upgrade to gradle 0.9 preview 1
kimchy authored
94 from(explodedDistDir) {
95 into zipRootFolder
dad0686 @kimchy fix chmod of elasticsearch in dist zip
kimchy authored
96 exclude 'bin/elasticsearch'
b0e1c58 @kimchy Add online plugin repository and a 'plugin' command to download them,…
kimchy authored
97 exclude 'bin/plugin'
97958c3 @kimchy Service Wrapper: A Java Service Wrapper integration, closes #154.
kimchy authored
98 exclude 'bin/service/elasticsearch'
99 exclude 'bin/service/elasticsearch32'
100 exclude 'bin/service/elasticsearch64'
101 exclude 'bin/service/exec/**'
6ed2374 @kimchy upgrade to gradle 0.9 preview 1
kimchy authored
102 }
103 from(explodedDistDir) {
104 into zipRootFolder
dad0686 @kimchy fix chmod of elasticsearch in dist zip
kimchy authored
105 include 'bin/elasticsearch'
b0e1c58 @kimchy Add online plugin repository and a 'plugin' command to download them,…
kimchy authored
106 include 'bin/plugin'
97958c3 @kimchy Service Wrapper: A Java Service Wrapper integration, closes #154.
kimchy authored
107 include 'bin/service/elasticsearch'
108 include 'bin/service/elasticsearch32'
109 include 'bin/service/elasticsearch64'
110 include 'bin/service/exec/**'
dad0686 @kimchy fix chmod of elasticsearch in dist zip
kimchy authored
111 fileMode = 0755
b3337c3 @kimchy initial commit
kimchy authored
112 }
113 }
114
10f0eaa @kimchy refactor plugins into sub groups
kimchy authored
115 task release(dependsOn: [zip]) << {
691a336 @kimchy bring out exploded
kimchy authored
116 ant.delete(dir: explodedDistDir)
b3337c3 @kimchy initial commit
kimchy authored
117 }
118
119 task wrapper(type: Wrapper) {
288aa36 @kimchy upgrade to gradle 0.9 preview3
kimchy authored
120 gradleVersion = '0.9-preview-3'
b3337c3 @kimchy initial commit
kimchy authored
121 jarPath = 'gradle'
122 }
Something went wrong with that request. Please try again.