This repository has been archived by the owner on May 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
70 lines (52 loc) · 1.67 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
version = '6.8.4'
buildscript {
ext.kotlin_version = '1.3.0'
ext.elasticsearch_version = '6.8.4'
ext.log4j_version = '2.9.1'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'idea'
repositories {
mavenCentral()
}
configurations {
localDeps
}
dependencies {
localDeps group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
localDeps group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
implementation configurations.localDeps
compileOnly "org.elasticsearch:elasticsearch:$elasticsearch_version"
compileOnly "org.apache.logging.log4j:log4j-core:$log4j_version"
compileOnly "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.3.1'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testCompile "org.elasticsearch.test:framework:$elasticsearch_version"
}
task copyForDist(type: Copy) {
dependsOn build
mkdir "$buildDir/elasticsearch"
from "$libsDir"
include "*.jar"
into "$buildDir/elasticsearch"
from configurations.localDeps
into "$buildDir/elasticsearch"
from "$buildDir/resources/main"
include '*'
into "$buildDir/elasticsearch"
}
task distZip(type: Zip) {
dependsOn copyForDist
archivesBaseName = rootProject.name
destinationDir = file("$buildDir/dist")
from "$buildDir/elasticsearch"
into "/"
}