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 6
/
Copy pathbuild.gradle
132 lines (109 loc) · 2.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import org.apache.tools.ant.filters.ReplaceTokens
import static java.lang.System.getenv
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: "maven-publish"
apply plugin: 'com.jfrog.bintray'
group = 'com.meltwater'
sourceCompatibility = 1.7
project.group = 'com.meltwater'
repositories{
jcenter()
mavenLocal()
if (getenv('MAVEN_URL')!=null) {
maven {
credentials {
username getenv('MAVEN_USER')
password getenv('MAVEN_PASSWORD')
}
url getenv('MAVEN_URL')
}
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7"
}
}
dependencies {
compile 'org.elasticsearch:elasticsearch:1.7.1'
compile 'com.meltwater:meltwater-elasticsearch-queries:1.1.1'
testCompile 'com.jayway.jsonpath:json-path:2.2.0'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'com.ning:async-http-client:1.9.31'
testCompile 'io.netty:netty:3.10.4.Final'
testCompile 'org.slf4j:slf4j-simple:1.7.25'
}
task pluginZipFile(type: Zip){
from(project.configurations.compile.filter {
//Do not include elasticsearch dependencies
it.getName().startsWith('meltwater-elasticsearch-queries')
})
from(project.jar)
}
build.dependsOn pluginZipFile
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
processResources {
filesMatching('*.properties') {
filter ReplaceTokens, tokens: [ 'plugin.version': project.version ]
}
}
publishing {
publications {
JavaArtifacts(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
artifact pluginZipFile.archivePath
groupId project.group
artifactId project.name
version project.version
}
}
repositories {
maven {
credentials {
username getenv('MAVEN_USER')
password getenv('MAVEN_PASSWORD')
}
url getenv('MAVEN_URL')
}
}
}
bintray {
user = getenv('BINTRAY_USER')
key = getenv('BINTRAY_KEY')
publications = ['JavaArtifacts']
publish = true
pkg {
repo = 'elasticsearch-batch-percolator'
name = 'elasticsearch-batch-percolator'
userOrg = 'meltwater'
licenses = ['Apache 2.0']
vcsUrl = "https://github.com/meltwater/${project.name}"
version {
gpg{
sign = true
}
released = new Date()
}
}
}
task ('wrapper', type:Wrapper) {
gradleVersion = '3.1'
}
test{
jvmArgs '-Xmx1G', '-XX:MaxPermSize=512M', '-XX:-UseSplitVerifier'
}