-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle
More file actions
84 lines (70 loc) · 2.32 KB
/
build.gradle
File metadata and controls
84 lines (70 loc) · 2.32 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
83
84
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.pluginzip'
def packagePath = 'org.opensearch'
def pathToPlugin = 'org.opensearch.plugin'
opensearchplugin {
name 'opensearch-custom-plugin'
description 'Custom OpenSearch custom plugin for educational purposes'
classname 'org.opensearch.plugin.CustomPlugin'
licenseFile rootProject.file('LICENSE.txt')
noticeFile rootProject.file('NOTICE.txt')
}
// This requires an additional Jar not published as part of build-tools
loggerUsageCheck.enabled = false
// No need to validate pom, as we do not upload to maven/sonatype
validateNebulaPom.enabled = false
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}
version = '1.0.0'
tasks.register("preparePluginPathDirs") {
mustRunAfter clean
doLast {
def newPath = pathToPlugin.replace(".", "/")
mkdir "src/main/java/$packagePath/$newPath"
mkdir "src/test/java/$packagePath/$newPath"
}
}
// disabling some unnecessary validations for this plugin
testingConventions.enabled = false
loggerUsageCheck.enabled = false
validateNebulaPom.enabled = false
buildscript {
ext {
opensearch_version = "2.17.0"
}
repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.opensearch.gradle:build-tools:2.17.0"
}
}
repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.23.1'
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0'
}
configurations.all {
resolutionStrategy {
force 'org.apache.logging.log4j:log4j-core:2.23.1'
force 'org.apache.logging.log4j:log4j-api:2.23.1'
}
}