This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
85 lines (73 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
85
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'groovy'
apply plugin: 'com.jfrog.artifactory'
project.group = 'com.meltwater'
sourceCompatibility = 1.7
repositories{
mavenLocal()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.18.2"
}
}
task version() {
println project.version
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
publishing {
publications {
JavaArtifacts(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'This library contains custom queries and query optimizations for Elasticsearch used at Meltwater.')
root.appendNode('name', project.name)
root.appendNode('url', 'https://github.com/meltwater/meltwater-elasticsearch-queries')
root.children().last() + pomConfig
}
}
}
}
artifactory {
contextUrl = 'https://meltwater.jfrog.io/meltwater'
publish {
repository {
repoKey = 'team-horace'
username = System.getProperty("artifactory_user")
password = System.getProperty("artifactory_password")
maven = true
}
defaults {
publishConfigs('archives', 'artifacts')
}
}
}
def LUCENE_VERSION = '5.3.1'
dependencies {
compile 'org.slf4j:slf4j-api:1.7.12'
compile "org.apache.lucene:lucene-core:${LUCENE_VERSION}"
compile "org.apache.lucene:lucene-join:${LUCENE_VERSION}"
compile "org.apache.lucene:lucene-analyzers-common:${LUCENE_VERSION}"
compile 'com.google.guava:guava:18.0'
testCompile 'junit:junit:4.12'
testCompile 'org.codehaus.groovy:groovy-all:2.4'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
}