OpenSearch/plugins/attachments/build.gradle

91 lines
2.2 KiB
Groovy
Raw Normal View History

dependsOn(':elasticsearch')
usePlugin 'java'
archivesBaseName = "elasticsearch-attachments"
explodedDistDir = new File(distsDir, 'exploded')
manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Attachments", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)
2010-03-29 05:45:13 -04:00
configurations.compile.transitive = true
configurations.testCompile.transitive = true
// no need to use the resource dir
sourceSets.main.resources.srcDir 'src/main/java'
sourceSets.test.resources.srcDir 'src/test/java'
2010-04-01 16:05:05 -04:00
jar {
from sourceSets.main.allJava
}
2010-03-29 05:45:13 -04:00
configurations {
dists
distLib {
visible = false
transitive = false
}
}
dependencies {
compile project(':elasticsearch')
compile('org.apache.tika:tika-app:0.6') { transitive = false }
2010-03-29 05:45:13 -04:00
distLib('org.apache.tika:tika-app:0.6') { transitive = false }
testCompile project(':test-testng')
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
testCompile 'org.hamcrest:hamcrest-all:1.1'
}
test {
useTestNG()
jmvArgs = ["-ea", "-Xmx1024m"]
options.suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = [
"es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties")
]
}
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
[explodedDistDir]*.mkdirs()
copy {
2010-03-29 05:45:13 -04:00
from configurations.distLib
into explodedDistDir
}
// remove elasticsearch files (compile above adds the elasticsearch one)
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*.jar") }
copy {
from libsDir
into explodedDistDir
}
}
task zip(type: Zip) {
dependsOn explodedDist
// classifier = 'all'
}
zip.doFirst {task ->
zipRootFolder = "" // its the plugin, don't create it under a specific name
task.configure {
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
// just copy over everything
}
}
}
task release(dependsOn: [zip]) << {
ant.delete(dir: explodedDistDir)
copy {
from distsDir
into(new File(rootProject.distsDir, "plugins"))
}
}