From 3b8cfb4572cd3d6a68495a1aea00c78ff51cebb6 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Thu, 19 Dec 2024 12:01:27 -0500 Subject: [PATCH] Update Gradle to 8.12 Signed-off-by: Andriy Redko --- build.gradle | 8 ++-- buildSrc/build.gradle | 2 +- .../gradle/plugin/PluginBuildPlugin.groovy | 4 +- .../org/opensearch/gradle/EmptyDirTask.java | 9 +++- .../ExportOpenSearchBuildResourcesTask.java | 8 +++- .../org/opensearch/gradle/LoggedExec.java | 6 ++- .../gradle/docker/DockerBuildTask.java | 13 ++++-- .../precommit/DependencyLicensesTask.java | 17 +++++-- .../gradle/precommit/FilePermissionsTask.java | 15 +++++-- .../precommit/ForbiddenPatternsTask.java | 17 ++++--- .../gradle/precommit/JarHellTask.java | 11 ++++- .../gradle/precommit/LoggerUsageTask.java | 15 +++++-- .../gradle/precommit/PomValidationTask.java | 11 ++++- .../gradle/precommit/PrecommitTask.java | 11 ++++- .../gradle/precommit/ThirdPartyAuditTask.java | 45 +++++++++++-------- .../test/ErrorReportingTestListener.java | 4 ++ .../gradle/test/GradleDistroTestTask.java | 18 +++++--- .../gradle/vagrant/VagrantShellTask.java | 20 ++++++--- .../build.gradle | 6 +-- distribution/docker/build.gradle | 4 +- distribution/packages/build.gradle | 16 +++---- doc-tools/build.gradle | 4 +- doc-tools/missing-doclet/build.gradle | 4 +- gradle/ide.gradle | 2 +- gradle/missing-javadoc.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 4 +- libs/common/build.gradle | 2 +- modules/aggs-matrix-stats/build.gradle | 4 +- modules/analysis-common/build.gradle | 4 +- modules/build.gradle | 2 +- modules/cache-common/build.gradle | 4 +- modules/geo/build.gradle | 4 +- modules/ingest-common/build.gradle | 4 +- modules/ingest-geoip/build.gradle | 4 +- modules/ingest-user-agent/build.gradle | 4 +- modules/lang-expression/build.gradle | 4 +- modules/lang-mustache/build.gradle | 4 +- modules/lang-painless/build.gradle | 4 +- modules/mapper-extras/build.gradle | 4 +- modules/opensearch-dashboards/build.gradle | 4 +- modules/parent-join/build.gradle | 4 +- modules/percolator/build.gradle | 4 +- modules/rank-eval/build.gradle | 4 +- modules/reindex/build.gradle | 4 +- modules/repository-url/build.gradle | 4 +- modules/search-pipeline-common/build.gradle | 4 +- modules/systemd/build.gradle | 4 +- modules/transport-netty4/build.gradle | 4 +- plugins/analysis-icu/build.gradle | 4 +- plugins/analysis-kuromoji/build.gradle | 4 +- plugins/analysis-nori/build.gradle | 4 +- plugins/analysis-phonenumber/build.gradle | 4 +- plugins/analysis-phonetic/build.gradle | 4 +- plugins/analysis-smartcn/build.gradle | 4 +- plugins/analysis-stempel/build.gradle | 4 +- plugins/analysis-ukrainian/build.gradle | 4 +- plugins/build.gradle | 6 +-- plugins/cache-ehcache/build.gradle | 4 +- plugins/crypto-kms/build.gradle | 4 +- plugins/discovery-azure-classic/build.gradle | 4 +- plugins/discovery-ec2/build.gradle | 4 +- plugins/discovery-gce/build.gradle | 4 +- plugins/examples/custom-settings/build.gradle | 10 ++--- .../build.gradle | 10 ++--- .../examples/custom-suggester/build.gradle | 10 ++--- .../examples/painless-allowlist/build.gradle | 10 ++--- plugins/examples/rescore/build.gradle | 10 ++--- plugins/examples/rest-handler/build.gradle | 10 ++--- .../script-expert-scoring/build.gradle | 10 ++--- plugins/identity-shiro/build.gradle | 10 ++--- plugins/ingest-attachment/build.gradle | 4 +- plugins/mapper-annotated-text/build.gradle | 4 +- plugins/mapper-murmur3/build.gradle | 4 +- plugins/mapper-size/build.gradle | 4 +- plugins/repository-azure/build.gradle | 4 +- plugins/repository-gcs/build.gradle | 4 +- plugins/repository-hdfs/build.gradle | 6 +-- plugins/repository-s3/build.gradle | 4 +- plugins/store-smb/build.gradle | 4 +- plugins/telemetry-otel/build.gradle | 4 +- plugins/transport-grpc/build.gradle | 4 +- plugins/transport-nio/build.gradle | 4 +- plugins/transport-reactor-netty4/build.gradle | 4 +- plugins/workload-management/build.gradle | 4 +- qa/die-with-dignity/build.gradle | 4 +- sandbox/plugins/build.gradle | 6 +-- server/build.gradle | 2 +- test/external-modules/build.gradle | 6 +-- .../delayed-aggs/build.gradle | 4 +- 89 files changed, 341 insertions(+), 239 deletions(-) diff --git a/build.gradle b/build.gradle index f720b46bec143..679f7b9299248 100644 --- a/build.gradle +++ b/build.gradle @@ -127,8 +127,8 @@ subprojects { name = 'Snapshots' url = 'https://aws.oss.sonatype.org/content/repositories/snapshots' credentials { - username "$System.env.SONATYPE_USERNAME" - password "$System.env.SONATYPE_PASSWORD" + username = "$System.env.SONATYPE_USERNAME" + password = "$System.env.SONATYPE_PASSWORD" } } } @@ -420,7 +420,7 @@ allprojects { gradle.projectsEvaluated { allprojects { project.tasks.withType(JavaForkOptions) { - maxHeapSize project.property('options.forkOptions.memoryMaximumSize') + maxHeapSize = project.property('options.forkOptions.memoryMaximumSize') } if (project.path == ':test:framework') { @@ -736,7 +736,7 @@ tasks.named(JavaBasePlugin.CHECK_TASK_NAME) { } tasks.register('checkCompatibility', CheckCompatibilityTask) { - description('Checks the compatibility with child components') + description = 'Checks the compatibility with child components' } allprojects { project -> diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c62f20e106e8c..f7fc0d7760993 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -106,7 +106,7 @@ dependencies { api "org.apache.commons:commons-compress:${props.getProperty('commonscompress')}" api 'org.apache.ant:ant:1.10.14' api 'com.netflix.nebula:gradle-extra-configurations-plugin:10.0.0' - api 'com.netflix.nebula:nebula-publishing-plugin:21.0.0' + api 'com.netflix.nebula:nebula-publishing-plugin:21.1.0' api 'com.netflix.nebula:gradle-info-plugin:12.1.6' api 'org.apache.rat:apache-rat:0.15' api "commons-io:commons-io:${props.getProperty('commonsio')}" diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy index 13f5f8724c6f2..ad4bdb3258fcc 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy @@ -160,14 +160,14 @@ class PluginBuildPlugin implements Plugin { archiveBaseName = archiveBaseName.get() + "-client" } // always configure publishing for client jars - project.publishing.publications.nebula(MavenPublication).artifactId(extension.name + "-client") + project.publishing.publications.nebula(MavenPublication).artifactId = extension.name + "-client" final BasePluginExtension base = project.getExtensions().findByType(BasePluginExtension.class) project.tasks.withType(GenerateMavenPom.class).configureEach { GenerateMavenPom generatePOMTask -> generatePOMTask.destination = "${project.buildDir}/distributions/${base.archivesName}-client-${project.versions.opensearch}.pom" } } else { if (project.plugins.hasPlugin(MavenPublishPlugin)) { - project.publishing.publications.nebula(MavenPublication).artifactId(extension.name) + project.publishing.publications.nebula(MavenPublication).artifactId = extension.name } } } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/EmptyDirTask.java b/buildSrc/src/main/java/org/opensearch/gradle/EmptyDirTask.java index 96d7c69699c68..36aa1f99aa894 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/EmptyDirTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/EmptyDirTask.java @@ -32,6 +32,7 @@ package org.opensearch.gradle; import org.gradle.api.DefaultTask; +import org.gradle.api.Project; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.TaskAction; @@ -48,6 +49,12 @@ public class EmptyDirTask extends DefaultTask { private File dir; private int dirMode = 0755; + private final Project project; + + @Inject + public EmptyDirTask(Project project) { + this.project = project; + } /** * Creates an empty directory with the configured permissions. @@ -84,7 +91,7 @@ public void setDir(File dir) { * @param dir The path of the directory to create. Takes a String and coerces it to a file. */ public void setDir(String dir) { - this.dir = getProject().file(dir); + this.dir = project.file(dir); } @Input diff --git a/buildSrc/src/main/java/org/opensearch/gradle/ExportOpenSearchBuildResourcesTask.java b/buildSrc/src/main/java/org/opensearch/gradle/ExportOpenSearchBuildResourcesTask.java index d00e790c94fcc..072b6fa788cbd 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/ExportOpenSearchBuildResourcesTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/ExportOpenSearchBuildResourcesTask.java @@ -33,6 +33,7 @@ import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; +import org.gradle.api.Project; import org.gradle.api.file.DirectoryProperty; import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; @@ -42,6 +43,8 @@ import org.gradle.api.tasks.StopExecutionException; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -67,8 +70,9 @@ public class ExportOpenSearchBuildResourcesTask extends DefaultTask { private DirectoryProperty outputDir; - public ExportOpenSearchBuildResourcesTask() { - outputDir = getProject().getObjects().directoryProperty(); + @Inject + public ExportOpenSearchBuildResourcesTask(Project project) { + outputDir = project.getObjects().directoryProperty(); } @OutputDirectory diff --git a/buildSrc/src/main/java/org/opensearch/gradle/LoggedExec.java b/buildSrc/src/main/java/org/opensearch/gradle/LoggedExec.java index 4c62f4a6b4ee8..3557ef6ef3df7 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/LoggedExec.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/LoggedExec.java @@ -70,6 +70,7 @@ public class LoggedExec extends Exec implements FileSystemOperationsAware { private static final Logger LOGGER = Logging.getLogger(LoggedExec.class); private Consumer outputLogger; private FileSystemOperations fileSystemOperations; + private final Project project; interface InjectedExecOps { @Inject @@ -77,8 +78,9 @@ interface InjectedExecOps { } @Inject - public LoggedExec(FileSystemOperations fileSystemOperations) { + public LoggedExec(FileSystemOperations fileSystemOperations, Project project) { this.fileSystemOperations = fileSystemOperations; + this.project = project; if (getLogger().isInfoEnabled() == false) { setIgnoreExitValue(true); setSpoolOutput(false); @@ -111,7 +113,7 @@ public void execute(Task task) { public void setSpoolOutput(boolean spoolOutput) { final OutputStream out; if (spoolOutput) { - File spoolFile = new File(getProject().getBuildDir() + "/buffered-output/" + this.getName()); + File spoolFile = new File(project.getBuildDir() + "/buffered-output/" + this.getName()); out = new LazyFileOutputStream(spoolFile); outputLogger = logger -> { try { diff --git a/buildSrc/src/main/java/org/opensearch/gradle/docker/DockerBuildTask.java b/buildSrc/src/main/java/org/opensearch/gradle/docker/DockerBuildTask.java index 08f0e7488a43c..94a8592d9bc2f 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/docker/DockerBuildTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/docker/DockerBuildTask.java @@ -34,6 +34,7 @@ import org.opensearch.gradle.LoggedExec; import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; +import org.gradle.api.Project; import org.gradle.api.file.DirectoryProperty; import org.gradle.api.file.RegularFileProperty; import org.gradle.api.logging.Logger; @@ -60,18 +61,22 @@ public class DockerBuildTask extends DefaultTask { private static final Logger LOGGER = Logging.getLogger(DockerBuildTask.class); private final WorkerExecutor workerExecutor; - private final RegularFileProperty markerFile = getProject().getObjects().fileProperty(); - private final DirectoryProperty dockerContext = getProject().getObjects().directoryProperty(); + private final RegularFileProperty markerFile; + private final DirectoryProperty dockerContext; private String[] tags; private boolean pull = true; private boolean noCache = true; private String[] baseImages; + private final Project project; @Inject - public DockerBuildTask(WorkerExecutor workerExecutor) { + public DockerBuildTask(WorkerExecutor workerExecutor, Project project) { this.workerExecutor = workerExecutor; - this.markerFile.set(getProject().getLayout().getBuildDirectory().file("markers/" + this.getName() + ".marker")); + this.project = project; + this.markerFile = project.getObjects().fileProperty(); + this.dockerContext = project.getObjects().directoryProperty(); + this.markerFile.set(project.getLayout().getBuildDirectory().file("markers/" + this.getName() + ".marker")); } @TaskAction diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesTask.java index 7248e0bc14431..337ac5d62c3fd 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesTask.java @@ -36,6 +36,7 @@ import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; import org.gradle.api.InvalidUserDataException; +import org.gradle.api.Project; import org.gradle.api.file.FileCollection; import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; @@ -48,6 +49,8 @@ import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -127,7 +130,7 @@ public class DependencyLicensesTask extends DefaultTask { /** * The directory to find the license and sha files in. */ - private File licensesDir = new File(getProject().getProjectDir(), "licenses"); + private File licensesDir; /** * A map of patterns to prefix, used to find the LICENSE and NOTICE file. @@ -139,6 +142,14 @@ public class DependencyLicensesTask extends DefaultTask { */ private Set ignoreShas = new HashSet<>(); + private final Project project; + + @Inject + public DependencyLicensesTask(Project project) { + this.project = project; + this.licensesDir = new File(project.getProjectDir(), "licenses"); + } + /** * Add a mapping from a regex pattern for the jar name, to a prefix to find * the LICENSE and NOTICE file for that jar. @@ -161,7 +172,7 @@ public void mapping(Map props) { @InputFiles public Property getDependencies() { if (dependenciesProvider == null) { - dependenciesProvider = getProject().getObjects().property(FileCollection.class); + dependenciesProvider = project.getObjects().property(FileCollection.class); } return dependenciesProvider; } @@ -250,7 +261,7 @@ public void checkDependencies() throws IOException, NoSuchAlgorithmException { // by this output but when successful we can safely mark the task as up-to-date. @OutputDirectory public File getOutputMarker() { - return new File(getProject().getBuildDir(), "dependencyLicense"); + return new File(project.getBuildDir(), "dependencyLicense"); } private void failIfAnyMissing(String item, Boolean exists, String type) { diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/FilePermissionsTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/FilePermissionsTask.java index 2c17666d8ee0c..0e5276bfdf033 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/FilePermissionsTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/FilePermissionsTask.java @@ -35,6 +35,7 @@ import org.opensearch.gradle.util.GradleUtils; import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; +import org.gradle.api.Project; import org.gradle.api.file.FileCollection; import org.gradle.api.file.FileTree; import org.gradle.api.tasks.IgnoreEmptyDirectories; @@ -48,6 +49,8 @@ import org.gradle.api.tasks.util.PatternFilterable; import org.gradle.api.tasks.util.PatternSet; +import javax.inject.Inject; + import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -71,10 +74,14 @@ public class FilePermissionsTask extends DefaultTask { // exclude sh files that might have the executable bit set .exclude("**/*.sh"); - private File outputMarker = new File(getProject().getBuildDir(), "markers/filePermissions"); + private final File outputMarker; + private final Project project; - public FilePermissionsTask() { + @Inject + public FilePermissionsTask(Project project) { setDescription("Checks java source files for correct file permissions"); + this.project = project; + this.outputMarker = new File(project.getBuildDir(), "markers/filePermissions"); } private static boolean isExecutableFile(File file) { @@ -98,11 +105,11 @@ private static boolean isExecutableFile(File file) { @IgnoreEmptyDirectories @PathSensitive(PathSensitivity.RELATIVE) public FileCollection getFiles() { - return GradleUtils.getJavaSourceSets(getProject()) + return GradleUtils.getJavaSourceSets(project) .stream() .map(sourceSet -> sourceSet.getAllSource().matching(filesFilter)) .reduce(FileTree::plus) - .orElse(getProject().files().getAsFileTree()); + .orElse(project.files().getAsFileTree()); } @TaskAction diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ForbiddenPatternsTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ForbiddenPatternsTask.java index 6ef1e77f5138f..1790b32fb2f36 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ForbiddenPatternsTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ForbiddenPatternsTask.java @@ -34,6 +34,7 @@ import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; import org.gradle.api.InvalidUserDataException; +import org.gradle.api.Project; import org.gradle.api.file.FileCollection; import org.gradle.api.file.FileTree; import org.gradle.api.plugins.JavaPluginExtension; @@ -48,6 +49,8 @@ import org.gradle.api.tasks.util.PatternFilterable; import org.gradle.api.tasks.util.PatternSet; +import javax.inject.Inject; + import java.io.File; import java.io.IOException; import java.io.UncheckedIOException; @@ -89,8 +92,10 @@ public class ForbiddenPatternsTask extends DefaultTask { * The rules: a map from the rule name, to a rule regex pattern. */ private final Map patterns = new HashMap<>(); + private final Project project; - public ForbiddenPatternsTask() { + @Inject + public ForbiddenPatternsTask(Project project) { setDescription("Checks source files for invalid patterns like nocommits or tabs"); getInputs().property("excludes", filesFilter.getExcludes()); getInputs().property("rules", patterns); @@ -99,6 +104,8 @@ public ForbiddenPatternsTask() { patterns.put("nocommit", "nocommit|NOCOMMIT"); patterns.put("nocommit should be all lowercase or all uppercase", "((?i)nocommit)(? sourceSet.getAllSource().matching(filesFilter)) .reduce(FileTree::plus) - .orElse(getProject().files().getAsFileTree()); + .orElse(project.files().getAsFileTree()); } @TaskAction @@ -131,7 +138,7 @@ public void checkInvalidPatterns() throws IOException { .boxed() .collect(Collectors.toList()); - String path = getProject().getRootProject().getProjectDir().toURI().relativize(f.toURI()).toString(); + String path = project.getRootProject().getProjectDir().toURI().relativize(f.toURI()).toString(); failures.addAll( invalidLines.stream() .map(l -> new AbstractMap.SimpleEntry<>(l + 1, lines.get(l))) @@ -155,7 +162,7 @@ public void checkInvalidPatterns() throws IOException { @OutputFile public File getOutputMarker() { - return new File(getProject().getBuildDir(), "markers/" + getName()); + return new File(project.getBuildDir(), "markers/" + getName()); } @Input diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/JarHellTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/JarHellTask.java index 7726133562e9f..ebe0b25a3a685 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/JarHellTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/JarHellTask.java @@ -33,11 +33,14 @@ package org.opensearch.gradle.precommit; import org.opensearch.gradle.LoggedExec; +import org.gradle.api.Project; import org.gradle.api.file.FileCollection; import org.gradle.api.tasks.CacheableTask; import org.gradle.api.tasks.CompileClasspath; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.File; /** @@ -47,14 +50,18 @@ public class JarHellTask extends PrecommitTask { private FileCollection classpath; + private final Project project; - public JarHellTask() { + @Inject + public JarHellTask(Project project) { + super(project); setDescription("Runs CheckJarHell on the configured classpath"); + this.project = project; } @TaskAction public void runJarHellCheck() { - LoggedExec.javaexec(getProject(), spec -> { + LoggedExec.javaexec(project, spec -> { spec.environment("CLASSPATH", getClasspath().getAsPath()); spec.getMainClass().set("org.opensearch.bootstrap.JarHell"); }); diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/LoggerUsageTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/LoggerUsageTask.java index db215fb65ef95..70acdcc26c212 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/LoggerUsageTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/LoggerUsageTask.java @@ -33,6 +33,7 @@ package org.opensearch.gradle.precommit; import org.opensearch.gradle.LoggedExec; +import org.gradle.api.Project; import org.gradle.api.file.FileCollection; import org.gradle.api.plugins.JavaPluginExtension; import org.gradle.api.tasks.CacheableTask; @@ -45,6 +46,8 @@ import org.gradle.api.tasks.SourceSet; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.File; /** @@ -54,14 +57,18 @@ public class LoggerUsageTask extends PrecommitTask { private FileCollection classpath; + private final Project project; - public LoggerUsageTask() { + @Inject + public LoggerUsageTask(Project project) { + super(project); setDescription("Runs LoggerUsageCheck on output directories of all source sets"); + this.project = project; } @TaskAction public void runLoggerUsageTask() { - LoggedExec.javaexec(getProject(), spec -> { + LoggedExec.javaexec(project, spec -> { spec.getMainClass().set("org.opensearch.test.loggerusage.OpenSearchLoggerUsageChecker"); spec.classpath(getClasspath()); getClassDirectories().forEach(spec::args); @@ -82,7 +89,7 @@ public void setClasspath(FileCollection classpath) { @SkipWhenEmpty @IgnoreEmptyDirectories public FileCollection getClassDirectories() { - return getProject().getExtensions() + return project.getExtensions() .getByType(JavaPluginExtension.class) .getSourceSets() .stream() @@ -93,7 +100,7 @@ public FileCollection getClassDirectories() { ) .map(sourceSet -> sourceSet.getOutput().getClassesDirs()) .reduce(FileCollection::plus) - .orElse(getProject().files()) + .orElse(project.files()) .filter(File::exists); } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/PomValidationTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/PomValidationTask.java index b76e0d6dd93cf..f7dea88cb2e30 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/PomValidationTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/PomValidationTask.java @@ -35,10 +35,13 @@ import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.gradle.api.GradleException; +import org.gradle.api.Project; import org.gradle.api.file.RegularFileProperty; import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.FileReader; import java.util.Collection; import java.util.function.Consumer; @@ -46,10 +49,16 @@ public class PomValidationTask extends PrecommitTask { - private final RegularFileProperty pomFile = getProject().getObjects().fileProperty(); + private final RegularFileProperty pomFile; private boolean foundError; + @Inject + public PomValidationTask(Project project) { + super(project); + this.pomFile = project.getObjects().fileProperty(); + } + @InputFile public RegularFileProperty getPomFile() { return pomFile; diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/PrecommitTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/PrecommitTask.java index 52646206e4792..670614aa48087 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/PrecommitTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/PrecommitTask.java @@ -32,19 +32,28 @@ package org.opensearch.gradle.precommit; import org.gradle.api.DefaultTask; +import org.gradle.api.Project; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.StandardOpenOption; public class PrecommitTask extends DefaultTask { + private final Project project; + + @Inject + public PrecommitTask(Project project) { + this.project = project; + } @OutputFile public File getSuccessMarker() { - return new File(getProject().getBuildDir(), "markers/" + this.getName()); + return new File(project.getBuildDir(), "markers/" + this.getName()); } @TaskAction diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java index 6842f0e541abe..2ed801b7fb9c6 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java @@ -40,6 +40,7 @@ import org.opensearch.gradle.util.GradleUtils; import org.gradle.api.DefaultTask; import org.gradle.api.JavaVersion; +import org.gradle.api.Project; import org.gradle.api.artifacts.Configuration; import org.gradle.api.artifacts.Dependency; import org.gradle.api.file.FileCollection; @@ -107,7 +108,15 @@ public class ThirdPartyAuditTask extends DefaultTask { private FileCollection jdkJarHellClasspath; - private final Property targetCompatibility = getProject().getObjects().property(JavaVersion.class); + private final Project project; + + private final Property targetCompatibility; + + @Inject + public ThirdPartyAuditTask(Project project) { + this.project = project; + this.targetCompatibility = project.getObjects().property(JavaVersion.class); + } public boolean jarHellEnabled = true; @@ -124,7 +133,7 @@ public Property getTargetCompatibility() { @InputFiles @PathSensitive(PathSensitivity.NAME_ONLY) public Configuration getForbiddenAPIsConfiguration() { - return getProject().getConfigurations().getByName("forbiddenApisCliJar"); + return project.getConfigurations().getByName("forbiddenApisCliJar"); } @InputFile @@ -149,12 +158,12 @@ public void setJavaHome(String javaHome) { @Internal public File getJarExpandDir() { - return new File(new File(getProject().getBuildDir(), "precommit/thirdPartyAudit"), getName()); + return new File(new File(project.getBuildDir(), "precommit/thirdPartyAudit"), getName()); } @OutputFile public File getSuccessMarker() { - return new File(getProject().getBuildDir(), "markers/" + getName()); + return new File(project.getBuildDir(), "markers/" + getName()); } // We use compile classpath normalization here because class implementation changes are irrelevant for the purposes of jdk jar hell. @@ -213,10 +222,10 @@ public Set getJarsToScan() { // err on the side of scanning these to make sure we don't miss anything Spec reallyThirdParty = dep -> dep.getGroup() != null && dep.getGroup().startsWith("org.opensearch") == false; - Set jars = GradleUtils.getFiles(getProject(), getRuntimeConfiguration(), reallyThirdParty).getFiles(); + Set jars = GradleUtils.getFiles(project, getRuntimeConfiguration(), reallyThirdParty).getFiles(); Set compileOnlyConfiguration = GradleUtils.getFiles( - getProject(), - getProject().getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME), + project, + project.getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME), reallyThirdParty ).getFiles(); // don't scan provided dependencies that we already scanned, e.x. don't scan cores dependencies for every plugin @@ -310,14 +319,14 @@ private Set extractJars(Set jars) { Set extractedJars = new TreeSet<>(); File jarExpandDir = getJarExpandDir(); // We need to clean up to make sure old dependencies don't linger - getProject().delete(jarExpandDir); + project.delete(jarExpandDir); jars.forEach(jar -> { String jarPrefix = jar.getName().replace(".jar", ""); File jarSubDir = new File(jarExpandDir, jarPrefix); extractedJars.add(jarSubDir); - FileTree jarFiles = getProject().zipTree(jar); - getProject().copy(spec -> { + FileTree jarFiles = project.zipTree(jar); + project.copy(spec -> { spec.from(jarFiles); spec.into(jarSubDir); // exclude classes from multi release jars @@ -336,8 +345,8 @@ private Set extractJars(Set jars) { IntStream.rangeClosed( Integer.parseInt(JavaVersion.VERSION_1_9.getMajorVersion()), Integer.parseInt(targetCompatibility.get().getMajorVersion()) - ).forEach(majorVersion -> getProject().copy(spec -> { - spec.from(getProject().zipTree(jar)); + ).forEach(majorVersion -> project.copy(spec -> { + spec.from(project.zipTree(jar)); spec.into(jarSubDir); String metaInfPrefix = "META-INF/versions/" + majorVersion; spec.include(metaInfPrefix + "/**"); @@ -376,7 +385,7 @@ private String formatClassList(Set classList) { private String runForbiddenAPIsCli() throws IOException { ByteArrayOutputStream errorOut = new ByteArrayOutputStream(); - InjectedExecOps execOps = getProject().getObjects().newInstance(InjectedExecOps.class); + InjectedExecOps execOps = project.getObjects().newInstance(InjectedExecOps.class); ExecResult result = execOps.getExecOps().javaexec(spec -> { if (javaHome != null) { spec.setExecutable(javaHome + "/bin/java"); @@ -384,7 +393,7 @@ private String runForbiddenAPIsCli() throws IOException { spec.classpath( getForbiddenAPIsConfiguration(), getRuntimeConfiguration(), - getProject().getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME) + project.getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME) ); spec.jvmArgs("-Xmx1g"); spec.jvmArgs(LoggedExec.shortLivedArgs()); @@ -416,12 +425,12 @@ private String runForbiddenAPIsCli() throws IOException { */ private Set runJdkJarHellCheck(Set jars) throws IOException { ByteArrayOutputStream standardOut = new ByteArrayOutputStream(); - InjectedExecOps execOps = getProject().getObjects().newInstance(InjectedExecOps.class); + InjectedExecOps execOps = project.getObjects().newInstance(InjectedExecOps.class); ExecResult execResult = execOps.getExecOps().javaexec(spec -> { spec.classpath( jdkJarHellClasspath, getRuntimeConfiguration(), - getProject().getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME) + project.getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME) ); spec.getMainClass().set(JDK_JAR_HELL_MAIN_CLASS); spec.args(jars); @@ -442,9 +451,9 @@ private Set runJdkJarHellCheck(Set jars) throws IOException { } private Configuration getRuntimeConfiguration() { - Configuration runtime = getProject().getConfigurations().findByName("runtimeClasspath"); + Configuration runtime = project.getConfigurations().findByName("runtimeClasspath"); if (runtime == null) { - return getProject().getConfigurations().getByName("testCompileClasspath"); + return project.getConfigurations().getByName("testCompileClasspath"); } return runtime; } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/ErrorReportingTestListener.java b/buildSrc/src/main/java/org/opensearch/gradle/test/ErrorReportingTestListener.java index aff9198e15772..4bdc75457ba75 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/ErrorReportingTestListener.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/ErrorReportingTestListener.java @@ -192,6 +192,10 @@ public Destination getDestination() { public String getMessage() { return message; } + + public long getLogTime() { + return System.currentTimeMillis(); + } }); } } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/GradleDistroTestTask.java b/buildSrc/src/main/java/org/opensearch/gradle/test/GradleDistroTestTask.java index fa417da1a1007..caac3ede98588 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/GradleDistroTestTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/GradleDistroTestTask.java @@ -34,9 +34,12 @@ import org.opensearch.gradle.vagrant.VagrantMachine; import org.opensearch.gradle.vagrant.VagrantShellTask; +import org.gradle.api.Project; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.options.Option; +import javax.inject.Inject; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -49,6 +52,13 @@ public class GradleDistroTestTask extends VagrantShellTask { private String taskName; private String testClass; private List extraArgs = new ArrayList<>(); + private final Project project; + + @Inject + public GradleDistroTestTask(Project project) { + super(project); + this.project = project; + } public void setTaskName(String taskName) { this.taskName = taskName; @@ -84,17 +94,15 @@ protected List getLinuxScript() { } private List getScript(boolean isWindows) { - String cacheDir = getProject().getBuildDir() + "/gradle-cache"; + String cacheDir = project.getBuildDir() + "/gradle-cache"; StringBuilder line = new StringBuilder(); line.append(isWindows ? "& .\\gradlew " : "./gradlew "); line.append(taskName); line.append(" --project-cache-dir "); - line.append( - isWindows ? VagrantMachine.convertWindowsPath(getProject(), cacheDir) : VagrantMachine.convertLinuxPath(getProject(), cacheDir) - ); + line.append(isWindows ? VagrantMachine.convertWindowsPath(project, cacheDir) : VagrantMachine.convertLinuxPath(project, cacheDir)); line.append(" -S"); line.append(" --parallel"); - line.append(" -D'org.gradle.logging.level'=" + getProject().getGradle().getStartParameter().getLogLevel()); + line.append(" -D'org.gradle.logging.level'=" + project.getGradle().getStartParameter().getLogLevel()); if (testClass != null) { line.append(" --tests="); line.append(testClass); diff --git a/buildSrc/src/main/java/org/opensearch/gradle/vagrant/VagrantShellTask.java b/buildSrc/src/main/java/org/opensearch/gradle/vagrant/VagrantShellTask.java index ca1b95183505f..665f690b8b146 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/vagrant/VagrantShellTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/vagrant/VagrantShellTask.java @@ -33,9 +33,12 @@ package org.opensearch.gradle.vagrant; import org.gradle.api.DefaultTask; +import org.gradle.api.Project; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.TaskAction; +import javax.inject.Inject; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -55,13 +58,16 @@ public abstract class VagrantShellTask extends DefaultTask { private final VagrantExtension extension; private final VagrantMachine service; private UnaryOperator progressHandler = UnaryOperator.identity(); + private final Project project; - public VagrantShellTask() { - extension = getProject().getExtensions().findByType(VagrantExtension.class); - if (extension == null) { + @Inject + public VagrantShellTask(Project project) { + this.project = project; + this.extension = project.getExtensions().findByType(VagrantExtension.class); + if (this.extension == null) { throw new IllegalStateException("opensearch.vagrant-base must be applied to create " + getClass().getName()); } - service = getProject().getExtensions().getByType(VagrantMachine.class); + this.service = project.getExtensions().getByType(VagrantMachine.class); } @Input @@ -81,14 +87,14 @@ public void setProgressHandler(UnaryOperator progressHandler) { @TaskAction public void runScript() { - String rootDir = getProject().getRootDir().toString(); + String rootDir = project.getRootDir().toString(); if (extension.isWindowsVM()) { service.execute(spec -> { spec.setCommand("winrm"); List script = new ArrayList<>(); script.add("try {"); - script.add("cd " + convertWindowsPath(getProject(), rootDir)); + script.add("cd " + convertWindowsPath(project, rootDir)); extension.getVmEnv().forEach((k, v) -> script.add("$Env:" + k + " = \"" + v + "\"")); script.addAll(getWindowsScript().stream().map(s -> " " + s).collect(Collectors.toList())); script.addAll( @@ -111,7 +117,7 @@ public void runScript() { List script = new ArrayList<>(); script.add("sudo bash -c '"); // start inline bash script script.add("pwd"); - script.add("cd " + convertLinuxPath(getProject(), rootDir)); + script.add("cd " + convertLinuxPath(project, rootDir)); extension.getVmEnv().forEach((k, v) -> script.add("export " + k + "=" + v)); script.addAll(getLinuxScript()); script.add("'"); // end inline bash script diff --git a/client/client-benchmark-noop-api-plugin/build.gradle b/client/client-benchmark-noop-api-plugin/build.gradle index 8e4f40c096851..feec78547edb6 100644 --- a/client/client-benchmark-noop-api-plugin/build.gradle +++ b/client/client-benchmark-noop-api-plugin/build.gradle @@ -33,9 +33,9 @@ group = 'org.opensearch.plugin' apply plugin: 'opensearch.opensearchplugin' opensearchplugin { - name 'client-benchmark-noop-api' - description 'Stubbed out OpenSearch actions that can be used for client-side benchmarking' - classname 'org.opensearch.plugin.noop.NoopPlugin' + name = 'client-benchmark-noop-api' + description = 'Stubbed out OpenSearch actions that can be used for client-side benchmarking' + classname = 'org.opensearch.plugin.noop.NoopPlugin' } // Not published so no need to assemble diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index 64471139e025b..1cf4ccab06448 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -273,8 +273,8 @@ subprojects { Project subProject -> } artifacts.add('default', file(tarFile)) { - type 'tar' - name artifactName + type = 'tar' + name = artifactName builtBy exportTaskName } diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index e1fa4de5a0caa..3e36c7513d782 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -320,13 +320,13 @@ apply plugin: 'com.netflix.nebula.ospackage-base' // this is package indepdendent configuration ospackage { - maintainer 'OpenSearch Team ' - summary 'Distributed RESTful search engine built for the cloud' - packageDescription ''' + maintainer ='OpenSearch Team ' + summary = 'Distributed RESTful search engine built for the cloud' + packageDescription = ''' Reference documentation can be found at https://github.com/opensearch-project/OpenSearch '''.stripIndent().trim() - url 'https://github.com/opensearch-project/OpenSearch' + url = 'https://github.com/opensearch-project/OpenSearch' // signing setup if (project.hasProperty('signing.password') && BuildParams.isSnapshotBuild() == false) { @@ -340,10 +340,10 @@ ospackage { // version found on oldest supported distro, centos-6 requires('coreutils', '8.4', GREATER | EQUAL) - fileMode 0644 - dirMode 0755 - user 'root' - permissionGroup 'root' + fileMode = 0644 + dirMode = 0755 + user = 'root' + permissionGroup = 'root' into '/usr/share/opensearch' } diff --git a/doc-tools/build.gradle b/doc-tools/build.gradle index e6ace21420dda..9639c7d7048d6 100644 --- a/doc-tools/build.gradle +++ b/doc-tools/build.gradle @@ -3,8 +3,8 @@ plugins { } base { - group 'org.opensearch' - version '1.0.0-SNAPSHOT' + group = 'org.opensearch' + version = '1.0.0-SNAPSHOT' } repositories { diff --git a/doc-tools/missing-doclet/build.gradle b/doc-tools/missing-doclet/build.gradle index 114ccc948951a..c3c951fbcaf47 100644 --- a/doc-tools/missing-doclet/build.gradle +++ b/doc-tools/missing-doclet/build.gradle @@ -2,8 +2,8 @@ plugins { id 'java-library' } -group 'org.opensearch' -version '1.0.0-SNAPSHOT' +group = 'org.opensearch' +version = '1.0.0-SNAPSHOT' tasks.withType(JavaCompile) { options.compilerArgs += ["--release", targetCompatibility.toString()] diff --git a/gradle/ide.gradle b/gradle/ide.gradle index e266d9add172d..c16205468d63d 100644 --- a/gradle/ide.gradle +++ b/gradle/ide.gradle @@ -16,7 +16,7 @@ import org.jetbrains.gradle.ext.JUnit buildscript { repositories { maven { - url "https://plugins.gradle.org/m2/" + url = "https://plugins.gradle.org/m2/" } } dependencies { diff --git a/gradle/missing-javadoc.gradle b/gradle/missing-javadoc.gradle index 5a98a60e806ea..5508064bf17a1 100644 --- a/gradle/missing-javadoc.gradle +++ b/gradle/missing-javadoc.gradle @@ -64,8 +64,8 @@ allprojects { tasks.register('missingJavadoc', MissingJavadocTask) { - description "This task validates and generates Javadoc API documentation for the main source code." - group "documentation" + description = "This task validates and generates Javadoc API documentation for the main source code." + group = "documentation" taskResources = resources dependsOn sourceSets.main.compileClasspath diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ec480eaeb61ef..8b3d2296213c2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -11,7 +11,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a +distributionSha256Sum=7ebdac923867a3cec0098302416d1e3c6c0c729fc4e2e05c10637a8af33a76c5 diff --git a/libs/common/build.gradle b/libs/common/build.gradle index 60bf488833393..2bf2dbb803d9f 100644 --- a/libs/common/build.gradle +++ b/libs/common/build.gradle @@ -92,7 +92,7 @@ if (BuildParams.runtimeJavaVersion >= JavaVersion.VERSION_20) { } tasks.register('roundableSimdTest', Test) { - group 'verification' + group = 'verification' include '**/RoundableTests.class' systemProperty 'opensearch.experimental.feature.simd.rounding.enabled', 'forced' } diff --git a/modules/aggs-matrix-stats/build.gradle b/modules/aggs-matrix-stats/build.gradle index 705fa17456a79..fc3e009e0660e 100644 --- a/modules/aggs-matrix-stats/build.gradle +++ b/modules/aggs-matrix-stats/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.' - classname 'org.opensearch.search.aggregations.matrix.MatrixAggregationModulePlugin' + description = 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.' + classname = 'org.opensearch.search.aggregations.matrix.MatrixAggregationModulePlugin' hasClientJar = true } diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 58ecf79cda0d7..b0e1aaa2de814 100644 --- a/modules/analysis-common/build.gradle +++ b/modules/analysis-common/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Adds "built in" analyzers to OpenSearch.' - classname 'org.opensearch.analysis.common.CommonAnalysisModulePlugin' + description = 'Adds "built in" analyzers to OpenSearch.' + classname = 'org.opensearch.analysis.common.CommonAnalysisModulePlugin' extendedPlugins = ['lang-painless'] } diff --git a/modules/build.gradle b/modules/build.gradle index 126bf0c8870ac..0c69a43af0509 100644 --- a/modules/build.gradle +++ b/modules/build.gradle @@ -35,7 +35,7 @@ configure(subprojects.findAll { it.parent.path == project.path }) { opensearchplugin { // for local OpenSearch plugins, the name of the plugin is the same as the directory - name project.name + name = project.name } if (project.file('src/main/packaging').exists()) { diff --git a/modules/cache-common/build.gradle b/modules/cache-common/build.gradle index 98cdec83b9ad1..996c47b26b4d9 100644 --- a/modules/cache-common/build.gradle +++ b/modules/cache-common/build.gradle @@ -9,8 +9,8 @@ apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Module for caches which are optional and do not require additional security permission' - classname 'org.opensearch.cache.common.tier.TieredSpilloverCachePlugin' + description = 'Module for caches which are optional and do not require additional security permission' + classname = 'org.opensearch.cache.common.tier.TieredSpilloverCachePlugin' } test { diff --git a/modules/geo/build.gradle b/modules/geo/build.gradle index 7ab6f80b65ca2..dc135ce7a4e35 100644 --- a/modules/geo/build.gradle +++ b/modules/geo/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Plugin for geospatial features in OpenSearch. Registering the geo_shape and aggregations on GeoShape and GeoPoint' - classname 'org.opensearch.geo.GeoModulePlugin' + description = 'Plugin for geospatial features in OpenSearch. Registering the geo_shape and aggregations on GeoShape and GeoPoint' + classname = 'org.opensearch.geo.GeoModulePlugin' } restResources { diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index 7b567eb9110c5..721aef35f5ff3 100644 --- a/modules/ingest-common/build.gradle +++ b/modules/ingest-common/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Module for ingest processors that do not require additional security permissions or have large dependencies and resources' - classname 'org.opensearch.ingest.common.IngestCommonModulePlugin' + description = 'Module for ingest processors that do not require additional security permissions or have large dependencies and resources' + classname = 'org.opensearch.ingest.common.IngestCommonModulePlugin' extendedPlugins = ['lang-painless'] } diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index f74de1dc290dd..3f74690e3ef4f 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -34,8 +34,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database' - classname 'org.opensearch.ingest.geoip.IngestGeoIpModulePlugin' + description = 'Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database' + classname = 'org.opensearch.ingest.geoip.IngestGeoIpModulePlugin' } dependencies { diff --git a/modules/ingest-user-agent/build.gradle b/modules/ingest-user-agent/build.gradle index 187e72d192a3d..85206861ab5f2 100644 --- a/modules/ingest-user-agent/build.gradle +++ b/modules/ingest-user-agent/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'Ingest processor that extracts information from a user agent' - classname 'org.opensearch.ingest.useragent.IngestUserAgentModulePlugin' + description = 'Ingest processor that extracts information from a user agent' + classname = 'org.opensearch.ingest.useragent.IngestUserAgentModulePlugin' } restResources { diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 94811cb608553..6efa3f3e667b5 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Lucene expressions integration for OpenSearch' - classname 'org.opensearch.script.expression.ExpressionModulePlugin' + description = 'Lucene expressions integration for OpenSearch' + classname = 'org.opensearch.script.expression.ExpressionModulePlugin' } dependencies { diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index a836124f94b41..4aaaa9fea1c59 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -32,8 +32,8 @@ apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Mustache scripting integration for OpenSearch' - classname 'org.opensearch.script.mustache.MustacheModulePlugin' + description = 'Mustache scripting integration for OpenSearch' + classname = 'org.opensearch.script.mustache.MustacheModulePlugin' hasClientJar = true // For the template apis and query } diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index ffb1fe6117c06..3895c512c61b4 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -36,8 +36,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'An easy, safe and fast scripting language for OpenSearch' - classname 'org.opensearch.painless.PainlessModulePlugin' + description = 'An easy, safe and fast scripting language for OpenSearch' + classname = 'org.opensearch.painless.PainlessModulePlugin' } ext { diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index b16176ca5aa72..1867abafc79c8 100644 --- a/modules/mapper-extras/build.gradle +++ b/modules/mapper-extras/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.java-rest-test' opensearchplugin { - description 'Adds advanced field mappers' - classname 'org.opensearch.index.mapper.MapperExtrasModulePlugin' + description = 'Adds advanced field mappers' + classname = 'org.opensearch.index.mapper.MapperExtrasModulePlugin' hasClientJar = true } diff --git a/modules/opensearch-dashboards/build.gradle b/modules/opensearch-dashboards/build.gradle index 07453e1f70f1c..8c590a348a9c4 100644 --- a/modules/opensearch-dashboards/build.gradle +++ b/modules/opensearch-dashboards/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.java-rest-test' opensearchplugin { - description 'Plugin exposing APIs for OpenSearch Dashboards system indices' - classname 'org.opensearch.dashboards.OpenSearchDashboardsModulePlugin' + description = 'Plugin exposing APIs for OpenSearch Dashboards system indices' + classname = 'org.opensearch.dashboards.OpenSearchDashboardsModulePlugin' } dependencies { diff --git a/modules/parent-join/build.gradle b/modules/parent-join/build.gradle index d509e65106e7b..08b624ea4f3fa 100644 --- a/modules/parent-join/build.gradle +++ b/modules/parent-join/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'This module adds the support parent-child queries and aggregations' - classname 'org.opensearch.join.ParentJoinModulePlugin' + description = 'This module adds the support parent-child queries and aggregations' + classname = 'org.opensearch.join.ParentJoinModulePlugin' hasClientJar = true } diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index 2312f7bda80b2..9669d1057fb41 100644 --- a/modules/percolator/build.gradle +++ b/modules/percolator/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Percolator module adds capability to index queries and query these queries by specifying documents' - classname 'org.opensearch.percolator.PercolatorModulePlugin' + description = 'Percolator module adds capability to index queries and query these queries by specifying documents' + classname = 'org.opensearch.percolator.PercolatorModulePlugin' hasClientJar = true } diff --git a/modules/rank-eval/build.gradle b/modules/rank-eval/build.gradle index 4232d583dc984..f6946c631221d 100644 --- a/modules/rank-eval/build.gradle +++ b/modules/rank-eval/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Rank Eval module adds APIs to evaluate ranking quality.' - classname 'org.opensearch.index.rankeval.RankEvalModulePlugin' + description = 'The Rank Eval module adds APIs to evaluate ranking quality.' + classname = 'org.opensearch.index.rankeval.RankEvalModulePlugin' hasClientJar = true } diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index cad7d67f3ef84..a44e1004d93ad 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -40,8 +40,8 @@ apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Reindex module adds APIs to reindex from one index to another or update documents in place.' - classname 'org.opensearch.index.reindex.ReindexModulePlugin' + description = 'The Reindex module adds APIs to reindex from one index to another or update documents in place.' + classname = 'org.opensearch.index.reindex.ReindexModulePlugin' hasClientJar = true } diff --git a/modules/repository-url/build.gradle b/modules/repository-url/build.gradle index 7a697623eb8d9..31f07e1520798 100644 --- a/modules/repository-url/build.gradle +++ b/modules/repository-url/build.gradle @@ -37,8 +37,8 @@ apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Module for URL repository' - classname 'org.opensearch.plugin.repository.url.URLRepositoryModulePlugin' + description = 'Module for URL repository' + classname = 'org.opensearch.plugin.repository.url.URLRepositoryModulePlugin' } restResources { diff --git a/modules/search-pipeline-common/build.gradle b/modules/search-pipeline-common/build.gradle index 657392d884e97..4b6d579dc22e8 100644 --- a/modules/search-pipeline-common/build.gradle +++ b/modules/search-pipeline-common/build.gradle @@ -13,8 +13,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Module for search pipeline processors that do not require additional security permissions or have large dependencies and resources' - classname 'org.opensearch.search.pipeline.common.SearchPipelineCommonModulePlugin' + description = 'Module for search pipeline processors that do not require additional security permissions or have large dependencies and resources' + classname = 'org.opensearch.search.pipeline.common.SearchPipelineCommonModulePlugin' extendedPlugins = ['lang-painless'] } diff --git a/modules/systemd/build.gradle b/modules/systemd/build.gradle index 726092ffe4273..25a32616777b7 100644 --- a/modules/systemd/build.gradle +++ b/modules/systemd/build.gradle @@ -29,6 +29,6 @@ */ opensearchplugin { - description 'Integrates OpenSearch with systemd' - classname 'org.opensearch.systemd.SystemdModulePlugin' + description = 'Integrates OpenSearch with systemd' + classname = 'org.opensearch.systemd.SystemdModulePlugin' } diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index cdaf8350055f0..4e68a4ce17f73 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -49,8 +49,8 @@ apply plugin: 'opensearch.publish' * maybe figure out a way to run all tests from core with netty4/network? */ opensearchplugin { - description 'Netty 4 based transport implementation' - classname 'org.opensearch.transport.Netty4ModulePlugin' + description = 'Netty 4 based transport implementation' + classname = 'org.opensearch.transport.Netty4ModulePlugin' hasClientJar = true } diff --git a/plugins/analysis-icu/build.gradle b/plugins/analysis-icu/build.gradle index e5c084559f0a6..25e1587136d78 100644 --- a/plugins/analysis-icu/build.gradle +++ b/plugins/analysis-icu/build.gradle @@ -32,8 +32,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The ICU Analysis plugin integrates the Lucene ICU module into OpenSearch, adding ICU-related analysis components.' - classname 'org.opensearch.plugin.analysis.icu.AnalysisICUPlugin' + description = 'The ICU Analysis plugin integrates the Lucene ICU module into OpenSearch, adding ICU-related analysis components.' + classname = 'org.opensearch.plugin.analysis.icu.AnalysisICUPlugin' hasClientJar = true } diff --git a/plugins/analysis-kuromoji/build.gradle b/plugins/analysis-kuromoji/build.gradle index 426b85f44bf55..5babcb2757f5e 100644 --- a/plugins/analysis-kuromoji/build.gradle +++ b/plugins/analysis-kuromoji/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into opensearch.' - classname 'org.opensearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin' + description = 'The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into opensearch.' + classname = 'org.opensearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin' } dependencies { diff --git a/plugins/analysis-nori/build.gradle b/plugins/analysis-nori/build.gradle index 3def7f9c6c60f..41a73fb3895ef 100644 --- a/plugins/analysis-nori/build.gradle +++ b/plugins/analysis-nori/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Korean (nori) Analysis plugin integrates Lucene nori analysis module into opensearch.' - classname 'org.opensearch.plugin.analysis.nori.AnalysisNoriPlugin' + description = 'The Korean (nori) Analysis plugin integrates Lucene nori analysis module into opensearch.' + classname = 'org.opensearch.plugin.analysis.nori.AnalysisNoriPlugin' } dependencies { diff --git a/plugins/analysis-phonenumber/build.gradle b/plugins/analysis-phonenumber/build.gradle index c9913b36f8508..1e19167582e19 100644 --- a/plugins/analysis-phonenumber/build.gradle +++ b/plugins/analysis-phonenumber/build.gradle @@ -12,8 +12,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'Adds an analyzer for phone numbers to OpenSearch.' - classname 'org.opensearch.analysis.phone.PhoneNumberAnalysisPlugin' + description = 'Adds an analyzer for phone numbers to OpenSearch.' + classname = 'org.opensearch.analysis.phone.PhoneNumberAnalysisPlugin' } dependencies { diff --git a/plugins/analysis-phonetic/build.gradle b/plugins/analysis-phonetic/build.gradle index ffa0466d43170..c0272b78c3db8 100644 --- a/plugins/analysis-phonetic/build.gradle +++ b/plugins/analysis-phonetic/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Phonetic Analysis plugin integrates phonetic token filter analysis with opensearch.' - classname 'org.opensearch.plugin.analysis.AnalysisPhoneticPlugin' + description = 'The Phonetic Analysis plugin integrates phonetic token filter analysis with opensearch.' + classname = 'org.opensearch.plugin.analysis.AnalysisPhoneticPlugin' } dependencies { diff --git a/plugins/analysis-smartcn/build.gradle b/plugins/analysis-smartcn/build.gradle index d74d314ab0673..448a3a5e0a637 100644 --- a/plugins/analysis-smartcn/build.gradle +++ b/plugins/analysis-smartcn/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into opensearch.' - classname 'org.opensearch.plugin.analysis.smartcn.AnalysisSmartChinesePlugin' + description = 'Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into opensearch.' + classname = 'org.opensearch.plugin.analysis.smartcn.AnalysisSmartChinesePlugin' } dependencies { diff --git a/plugins/analysis-stempel/build.gradle b/plugins/analysis-stempel/build.gradle index d713f80172c58..90523ae2d9d95 100644 --- a/plugins/analysis-stempel/build.gradle +++ b/plugins/analysis-stempel/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into opensearch.' - classname 'org.opensearch.plugin.analysis.stempel.AnalysisStempelPlugin' + description = 'The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into opensearch.' + classname = 'org.opensearch.plugin.analysis.stempel.AnalysisStempelPlugin' } dependencies { diff --git a/plugins/analysis-ukrainian/build.gradle b/plugins/analysis-ukrainian/build.gradle index 6122c055c788e..7e760423438c1 100644 --- a/plugins/analysis-ukrainian/build.gradle +++ b/plugins/analysis-ukrainian/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into opensearch.' - classname 'org.opensearch.plugin.analysis.ukrainian.AnalysisUkrainianPlugin' + description = 'The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into opensearch.' + classname = 'org.opensearch.plugin.analysis.ukrainian.AnalysisUkrainianPlugin' } dependencies { diff --git a/plugins/build.gradle b/plugins/build.gradle index 4e6de2c120d35..6c7fb749d08ac 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -39,9 +39,9 @@ configure(subprojects.findAll { it.parent.path == project.path }) { opensearchplugin { // for local ES plugins, the name of the plugin is the same as the directory - name project.name + name = project.name - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } } diff --git a/plugins/cache-ehcache/build.gradle b/plugins/cache-ehcache/build.gradle index 5747624e2fb69..6390b045db8ea 100644 --- a/plugins/cache-ehcache/build.gradle +++ b/plugins/cache-ehcache/build.gradle @@ -14,8 +14,8 @@ import org.opensearch.gradle.info.BuildParams apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Ehcache based cache implementation.' - classname 'org.opensearch.cache.EhcacheCachePlugin' + description = 'Ehcache based cache implementation.' + classname = 'org.opensearch.cache.EhcacheCachePlugin' } versions << [ diff --git a/plugins/crypto-kms/build.gradle b/plugins/crypto-kms/build.gradle index c4a8609b6df48..fa63a4a7153d3 100644 --- a/plugins/crypto-kms/build.gradle +++ b/plugins/crypto-kms/build.gradle @@ -16,8 +16,8 @@ apply plugin: 'opensearch.publish' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'AWS KMS plugin to provide crypto keys' - classname 'org.opensearch.crypto.kms.CryptoKmsPlugin' + description = 'AWS KMS plugin to provide crypto keys' + classname = 'org.opensearch.crypto.kms.CryptoKmsPlugin' } ext { diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 7f34cec94499c..2627b3061bdf2 100644 --- a/plugins/discovery-azure-classic/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -35,8 +35,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism' - classname 'org.opensearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin' + description = 'The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism' + classname = 'org.opensearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin' } versions << [ diff --git a/plugins/discovery-ec2/build.gradle b/plugins/discovery-ec2/build.gradle index 9c9f64f09b915..8d615e0bf8d9d 100644 --- a/plugins/discovery-ec2/build.gradle +++ b/plugins/discovery-ec2/build.gradle @@ -34,8 +34,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.' - classname 'org.opensearch.discovery.ec2.Ec2DiscoveryPlugin' + description = 'The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.' + classname = 'org.opensearch.discovery.ec2.Ec2DiscoveryPlugin' } dependencies { diff --git a/plugins/discovery-gce/build.gradle b/plugins/discovery-gce/build.gradle index 3214db2074198..7f368a7a0f333 100644 --- a/plugins/discovery-gce/build.gradle +++ b/plugins/discovery-gce/build.gradle @@ -13,8 +13,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.' - classname 'org.opensearch.plugin.discovery.gce.GceDiscoveryPlugin' + description = 'The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.' + classname = 'org.opensearch.plugin.discovery.gce.GceDiscoveryPlugin' } dependencies { diff --git a/plugins/examples/custom-settings/build.gradle b/plugins/examples/custom-settings/build.gradle index 5b35d887b3db1..c83e710283322 100644 --- a/plugins/examples/custom-settings/build.gradle +++ b/plugins/examples/custom-settings/build.gradle @@ -31,11 +31,11 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'custom-settings' - description 'An example plugin showing how to register custom settings' - classname 'org.opensearch.example.customsettings.ExampleCustomSettingsPlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'custom-settings' + description = 'An example plugin showing how to register custom settings' + classname = 'org.opensearch.example.customsettings.ExampleCustomSettingsPlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } testClusters.all { diff --git a/plugins/examples/custom-significance-heuristic/build.gradle b/plugins/examples/custom-significance-heuristic/build.gradle index ab013657fed23..72efbaafad8e3 100644 --- a/plugins/examples/custom-significance-heuristic/build.gradle +++ b/plugins/examples/custom-significance-heuristic/build.gradle @@ -31,9 +31,9 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'custom-significance-heuristic' - description 'An example plugin showing how to write and register a custom significance heuristic' - classname 'org.opensearch.example.customsigheuristic.CustomSignificanceHeuristicPlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'custom-significance-heuristic' + description = 'An example plugin showing how to write and register a custom significance heuristic' + classname = 'org.opensearch.example.customsigheuristic.CustomSignificanceHeuristicPlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } diff --git a/plugins/examples/custom-suggester/build.gradle b/plugins/examples/custom-suggester/build.gradle index d60523306b3c1..977cad7d1452e 100644 --- a/plugins/examples/custom-suggester/build.gradle +++ b/plugins/examples/custom-suggester/build.gradle @@ -31,11 +31,11 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'custom-suggester' - description 'An example plugin showing how to write and register a custom suggester' - classname 'org.opensearch.example.customsuggester.CustomSuggesterPlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'custom-suggester' + description = 'An example plugin showing how to write and register a custom suggester' + classname = 'org.opensearch.example.customsuggester.CustomSuggesterPlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } testClusters.all { diff --git a/plugins/examples/painless-allowlist/build.gradle b/plugins/examples/painless-allowlist/build.gradle index 99722126dd171..d8b4c15536a75 100644 --- a/plugins/examples/painless-allowlist/build.gradle +++ b/plugins/examples/painless-allowlist/build.gradle @@ -31,12 +31,12 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'painless-allowlist' - description 'An example allowlisting additional classes and methods in painless' - classname 'org.opensearch.example.painlessallowlist.MyAllowlistPlugin' + name = 'painless-allowlist' + description = 'An example allowlisting additional classes and methods in painless' + classname = 'org.opensearch.example.painlessallowlist.MyAllowlistPlugin' extendedPlugins = ['lang-painless'] - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } dependencies { diff --git a/plugins/examples/rescore/build.gradle b/plugins/examples/rescore/build.gradle index b33d79395d92b..ad450798514ea 100644 --- a/plugins/examples/rescore/build.gradle +++ b/plugins/examples/rescore/build.gradle @@ -31,9 +31,9 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'example-rescore' - description 'An example plugin implementing rescore and verifying that plugins *can* implement rescore' - classname 'org.opensearch.example.rescore.ExampleRescorePlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'example-rescore' + description = 'An example plugin implementing rescore and verifying that plugins *can* implement rescore' + classname = 'org.opensearch.example.rescore.ExampleRescorePlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } diff --git a/plugins/examples/rest-handler/build.gradle b/plugins/examples/rest-handler/build.gradle index b97d091af9d08..d44cc09ff0294 100644 --- a/plugins/examples/rest-handler/build.gradle +++ b/plugins/examples/rest-handler/build.gradle @@ -35,11 +35,11 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.java-rest-test' opensearchplugin { - name 'rest-handler' - description 'An example plugin showing how to register a REST handler' - classname 'org.opensearch.example.resthandler.ExampleRestHandlerPlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'rest-handler' + description = 'An example plugin showing how to register a REST handler' + classname = 'org.opensearch.example.resthandler.ExampleRestHandlerPlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } // No unit tests in this example diff --git a/plugins/examples/script-expert-scoring/build.gradle b/plugins/examples/script-expert-scoring/build.gradle index e4ddd97abbe4c..1a880e80d2e49 100644 --- a/plugins/examples/script-expert-scoring/build.gradle +++ b/plugins/examples/script-expert-scoring/build.gradle @@ -31,11 +31,11 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name 'script-expert-scoring' - description 'An example script engine to use low level Lucene internals for expert scoring' - classname 'org.opensearch.example.expertscript.ExpertScriptPlugin' - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = 'script-expert-scoring' + description = 'An example script engine to use low level Lucene internals for expert scoring' + classname = 'org.opensearch.example.expertscript.ExpertScriptPlugin' + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } test.enabled = false diff --git a/plugins/identity-shiro/build.gradle b/plugins/identity-shiro/build.gradle index 222443efcb214..2ea3e8e6b1e50 100644 --- a/plugins/identity-shiro/build.gradle +++ b/plugins/identity-shiro/build.gradle @@ -9,11 +9,11 @@ apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Plugin for identity features in OpenSearch.' - classname 'org.opensearch.identity.shiro.ShiroIdentityPlugin' - name project.name - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + description = 'Plugin for identity features in OpenSearch.' + classname = 'org.opensearch.identity.shiro.ShiroIdentityPlugin' + name = project.name + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } dependencies { diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 2948ca12904f5..e0ad602266602 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -33,8 +33,8 @@ import org.opensearch.gradle.info.BuildParams apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'Ingest processor that uses Apache Tika to extract contents' - classname 'org.opensearch.ingest.attachment.IngestAttachmentPlugin' + description = 'Ingest processor that uses Apache Tika to extract contents' + classname = 'org.opensearch.ingest.attachment.IngestAttachmentPlugin' } versions << [ diff --git a/plugins/mapper-annotated-text/build.gradle b/plugins/mapper-annotated-text/build.gradle index 5ff3bbe37810b..c7bc5b795ed71 100644 --- a/plugins/mapper-annotated-text/build.gradle +++ b/plugins/mapper-annotated-text/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.' - classname 'org.opensearch.plugin.mapper.AnnotatedTextPlugin' + description = 'The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.' + classname = 'org.opensearch.plugin.mapper.AnnotatedTextPlugin' } restResources { diff --git a/plugins/mapper-murmur3/build.gradle b/plugins/mapper-murmur3/build.gradle index 67006f29b7565..42e27d7b3908a 100644 --- a/plugins/mapper-murmur3/build.gradle +++ b/plugins/mapper-murmur3/build.gradle @@ -30,8 +30,8 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Mapper Murmur3 plugin allows to compute hashes of a field\'s values at index-time and to store them in the index.' - classname 'org.opensearch.plugin.mapper.MapperMurmur3Plugin' + description = 'The Mapper Murmur3 plugin allows to compute hashes of a field\'s values at index-time and to store them in the index.' + classname = 'org.opensearch.plugin.mapper.MapperMurmur3Plugin' } restResources { diff --git a/plugins/mapper-size/build.gradle b/plugins/mapper-size/build.gradle index fb4f7c4e00c4f..8c6caaf09e01a 100644 --- a/plugins/mapper-size/build.gradle +++ b/plugins/mapper-size/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Mapper Size plugin allows document to record their uncompressed size at index time.' - classname 'org.opensearch.plugin.mapper.MapperSizePlugin' + description = 'The Mapper Size plugin allows document to record their uncompressed size at index time.' + classname = 'org.opensearch.plugin.mapper.MapperSizePlugin' } restResources { diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 03ea07623dbaf..4d570ea2e28f7 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -39,8 +39,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Azure Repository plugin adds support for Azure storage repositories.' - classname 'org.opensearch.repositories.azure.AzureRepositoryPlugin' + description = 'The Azure Repository plugin adds support for Azure storage repositories.' + classname = 'org.opensearch.repositories.azure.AzureRepositoryPlugin' } dependencies { diff --git a/plugins/repository-gcs/build.gradle b/plugins/repository-gcs/build.gradle index 97ae88aac5485..d4c870e1ca2b2 100644 --- a/plugins/repository-gcs/build.gradle +++ b/plugins/repository-gcs/build.gradle @@ -43,8 +43,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The GCS repository plugin adds Google Cloud Storage support for repositories.' - classname 'org.opensearch.repositories.gcs.GoogleCloudStoragePlugin' + description = 'The GCS repository plugin adds Google Cloud Storage support for repositories.' + classname = 'org.opensearch.repositories.gcs.GoogleCloudStoragePlugin' } dependencies { diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index faa9b2bfff84d..6140c2e0a3360 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -43,8 +43,8 @@ apply plugin: 'opensearch.rest-resources' apply plugin: 'opensearch.rest-test' opensearchplugin { - description 'The HDFS repository plugin adds support for Hadoop Distributed File-System (HDFS) repositories.' - classname 'org.opensearch.repositories.hdfs.HdfsPlugin' + description = 'The HDFS repository plugin adds support for Hadoop Distributed File-System (HDFS) repositories.' + classname = 'org.opensearch.repositories.hdfs.HdfsPlugin' } versions << [ @@ -137,7 +137,7 @@ for (String fixtureName : ['hdfsFixture', 'haHdfsFixture', 'secureHdfsFixture', dependsOn project.configurations.hdfsFixture, project(':test:fixtures:krb5kdc-fixture').tasks.postProcessFixture executable = "${BuildParams.runtimeJavaHome}/bin/java" env 'CLASSPATH', "${-> project.configurations.hdfsFixture.asPath}" - maxWaitInSeconds 60 + maxWaitInSeconds = 60 onlyIf { BuildParams.inFipsJvm == false } waitCondition = { fixture, ant -> // the hdfs.MiniHDFS fixture writes the ports file when diff --git a/plugins/repository-s3/build.gradle b/plugins/repository-s3/build.gradle index 398611a016ed2..6e84edddcc252 100644 --- a/plugins/repository-s3/build.gradle +++ b/plugins/repository-s3/build.gradle @@ -41,8 +41,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The S3 repository plugin adds S3 repositories' - classname 'org.opensearch.repositories.s3.S3RepositoryPlugin' + description = 'The S3 repository plugin adds S3 repositories' + classname = 'org.opensearch.repositories.s3.S3RepositoryPlugin' } dependencies { diff --git a/plugins/store-smb/build.gradle b/plugins/store-smb/build.gradle index add4abb22329f..d702978730f45 100644 --- a/plugins/store-smb/build.gradle +++ b/plugins/store-smb/build.gradle @@ -31,8 +31,8 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The Store SMB plugin adds support for SMB stores.' - classname 'org.opensearch.plugin.store.smb.SMBStorePlugin' + description = 'The Store SMB plugin adds support for SMB stores.' + classname = 'org.opensearch.plugin.store.smb.SMBStorePlugin' } restResources { restApi { diff --git a/plugins/telemetry-otel/build.gradle b/plugins/telemetry-otel/build.gradle index 872d928aa093f..3aba7d64cd96d 100644 --- a/plugins/telemetry-otel/build.gradle +++ b/plugins/telemetry-otel/build.gradle @@ -14,8 +14,8 @@ import org.opensearch.gradle.info.BuildParams apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'Opentelemetry based telemetry implementation.' - classname 'org.opensearch.telemetry.OTelTelemetryPlugin' + description = 'Opentelemetry based telemetry implementation.' + classname = 'org.opensearch.telemetry.OTelTelemetryPlugin' hasClientJar = false } diff --git a/plugins/transport-grpc/build.gradle b/plugins/transport-grpc/build.gradle index 47f62b2b8c3f3..5c6bc8efe1098 100644 --- a/plugins/transport-grpc/build.gradle +++ b/plugins/transport-grpc/build.gradle @@ -9,8 +9,8 @@ import org.gradle.api.attributes.java.TargetJvmEnvironment */ opensearchplugin { - description 'gRPC based transport implementation' - classname 'org.opensearch.transport.grpc.GrpcPlugin' + description = 'gRPC based transport implementation' + classname = 'org.opensearch.transport.grpc.GrpcPlugin' } dependencies { diff --git a/plugins/transport-nio/build.gradle b/plugins/transport-nio/build.gradle index 7132c97864238..6ac27b51f8902 100644 --- a/plugins/transport-nio/build.gradle +++ b/plugins/transport-nio/build.gradle @@ -34,8 +34,8 @@ apply plugin: "opensearch.publish" apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'The nio transport.' - classname 'org.opensearch.transport.nio.NioTransportPlugin' + description = 'The nio transport.' + classname = 'org.opensearch.transport.nio.NioTransportPlugin' hasClientJar = true } diff --git a/plugins/transport-reactor-netty4/build.gradle b/plugins/transport-reactor-netty4/build.gradle index 1e76d1a29efc1..12ae5ce99632e 100644 --- a/plugins/transport-reactor-netty4/build.gradle +++ b/plugins/transport-reactor-netty4/build.gradle @@ -23,8 +23,8 @@ apply plugin: 'opensearch.internal-cluster-test' apply plugin: 'opensearch.publish' opensearchplugin { - description 'Reactor Netty 4 based transport implementation' - classname 'org.opensearch.transport.reactor.ReactorNetty4Plugin' + description = 'Reactor Netty 4 based transport implementation' + classname = 'org.opensearch.transport.reactor.ReactorNetty4Plugin' hasClientJar = true } diff --git a/plugins/workload-management/build.gradle b/plugins/workload-management/build.gradle index ad6737bbd24b0..2e8b0df468092 100644 --- a/plugins/workload-management/build.gradle +++ b/plugins/workload-management/build.gradle @@ -14,8 +14,8 @@ apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.internal-cluster-test' opensearchplugin { - description 'OpenSearch Workload Management Plugin.' - classname 'org.opensearch.plugin.wlm.WorkloadManagementPlugin' + description = 'OpenSearch Workload Management Plugin.' + classname = 'org.opensearch.plugin.wlm.WorkloadManagementPlugin' } dependencies { diff --git a/qa/die-with-dignity/build.gradle b/qa/die-with-dignity/build.gradle index db8762fe921bf..a3e5f295001bc 100644 --- a/qa/die-with-dignity/build.gradle +++ b/qa/die-with-dignity/build.gradle @@ -16,8 +16,8 @@ apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.opensearchplugin' opensearchplugin { - description 'Die with dignity plugin' - classname 'org.opensearch.DieWithDignityPlugin' + description = 'Die with dignity plugin' + classname = 'org.opensearch.DieWithDignityPlugin' } // let the javaRestTest see the classpath of main diff --git a/sandbox/plugins/build.gradle b/sandbox/plugins/build.gradle index 61afb2c568e1b..1b7b6889972fd 100644 --- a/sandbox/plugins/build.gradle +++ b/sandbox/plugins/build.gradle @@ -12,8 +12,8 @@ configure(subprojects.findAll { it.parent.path == project.path }) { apply plugin: 'opensearch.opensearchplugin' opensearchplugin { - name project.name - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = project.name + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } } diff --git a/server/build.gradle b/server/build.gradle index 8dd23491ccd69..6559c7247200a 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -42,7 +42,7 @@ plugins { publishing { publications { nebula(MavenPublication) { - artifactId 'opensearch' + artifactId = 'opensearch' } } } diff --git a/test/external-modules/build.gradle b/test/external-modules/build.gradle index 8e59c309826e7..e575323b6248c 100644 --- a/test/external-modules/build.gradle +++ b/test/external-modules/build.gradle @@ -17,9 +17,9 @@ subprojects { apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - name it.name - licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') - noticeFile rootProject.file('NOTICE.txt') + name = it.name + licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') + noticeFile = rootProject.file('NOTICE.txt') } tasks.named('yamlRestTest').configure { diff --git a/test/external-modules/delayed-aggs/build.gradle b/test/external-modules/delayed-aggs/build.gradle index d470269c8a6e2..a7662f72e64e6 100644 --- a/test/external-modules/delayed-aggs/build.gradle +++ b/test/external-modules/delayed-aggs/build.gradle @@ -29,8 +29,8 @@ */ opensearchplugin { - description 'A test module that allows to delay aggregations on shards with a configurable time' - classname 'org.opensearch.search.aggregations.DelayedShardAggregationPlugin' + description = 'A test module that allows to delay aggregations on shards with a configurable time' + classname = 'org.opensearch.search.aggregations.DelayedShardAggregationPlugin' } restResources {