42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies { classpath "commons-io:commons-io:2.5" }
|
|
}
|
|
|
|
import org.apache.commons.io.FilenameUtils;
|
|
|
|
sourceSets {
|
|
main.java.srcDirs = ['src/main/java']
|
|
}
|
|
dependencies {
|
|
compile group: 'commons-io', name: 'commons-io', version: '2.5'
|
|
compile group: 'org.apache.lucene', name: 'lucene-core', version: '6.6.0'
|
|
compile group: 'org.apache.lucene', name: 'lucene-queryparser', version: '6.6.0'
|
|
compile group: 'org.apache.lucene', name: 'lucene-analyzers-common', version: '6.6.0'
|
|
}
|
|
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
def getShortJar = { e -> FilenameUtils.getName(e) }
|
|
eclipse.classpath.file {
|
|
withXml{xml ->
|
|
def node = xml.asNode()
|
|
|
|
node.classpathentry.each{
|
|
if (it.@kind == 'lib') {
|
|
it.@path = 'lib/' + getShortJar(it.@path);
|
|
it.@sourcepath = 'lib/' + getShortJar(it.@sourcepath);
|
|
}
|
|
|
|
}
|
|
}
|
|
} |