-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
82 lines (70 loc) · 2.6 KB
/
build.gradle
File metadata and controls
82 lines (70 loc) · 2.6 KB
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
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Paths;
// Apply the java plugin to add support for Java
apply plugin: 'java'
// apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = "bumblebee.samples.elastic_application.Main"
sourceCompatibility = 17
targetCompatibility = 17
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
repositories {
mavenCentral()
//jcenter()
}
dependencies {
implementation 'com.zendesk:mysql-binlog-connector-java:0.25.0'
implementation 'com.typesafe:config:1.3.0'
implementation 'mysql:mysql-connector-java:8.0.11'
implementation 'org.apache.logging.log4j:log4j-api:2.7'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.7'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-log4j12:1.7.25'
implementation group: 'org.elasticsearch.client', name: 'transport', version: '7.9.0'
implementation 'org.elasticsearch.client:transport:7.9.0'
implementation 'org.apache.tika:tika-parsers:1.12'
// AWS SDK 2.x
implementation 'software.amazon.awssdk:auth:2.20.0'
implementation 'software.amazon.awssdk:apache-client:2.20.0'
implementation 'software.amazon.awssdk:regions:2.20.0'
// OpenSearch Java Client (oficial)
implementation 'org.opensearch.client:opensearch-java:2.2.0'
testImplementation 'junit:junit:4.+'
testImplementation 'com.h2database:h2:1.4.187'
testImplementation 'org.mockito:mockito-core:1.+'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation group: 'org.elasticsearch.client', name: 'transport', version: '7.9.0:test'
}
test {
systemProperties 'property': 'value'
}
task copyToLib() {
doLast {
String directory = "./dist/lib/"
File distDir = new File(directory)
if(!distDir.exists()){
distDir.mkdirs();
}
configurations.testRuntimeClasspath.files.each { File sourceFile ->
if (sourceFile != null && sourceFile.exists() && sourceFile.isFile()) {
String newJarFilePath = directory + sourceFile.name
File targetFile = new File(newJarFilePath)
if(!targetFile.exists()){
try {
Files.copy(sourceFile.toPath(), targetFile.toPath());
} catch (Exception e) {
println "Warning: Could not copy ${sourceFile.name}: ${e.message}"
}
}
}
}
}
}
jar.dependsOn('copyToLib')