Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] refactor gradle directory. #276

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/build-scan.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.elasticsearch.gradle.OS
import org.elasticsearch.gradle.info.BuildParams
import org.opensearch.gradle.OS
import org.opensearch.gradle.info.BuildParams
import org.gradle.initialization.BuildRequestMetaData

import java.util.concurrent.TimeUnit
Expand Down
4 changes: 2 additions & 2 deletions gradle/bwc-test.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.info.BuildParams
import org.opensearch.gradle.Version
import org.opensearch.gradle.info.BuildParams

ext.bwcTaskName = { Version version ->
return "v${version}#bwcTest"
Expand Down
16 changes: 8 additions & 8 deletions gradle/fips.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.elasticsearch.gradle.ExportElasticsearchBuildResourcesTask
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.testclusters.ElasticsearchCluster
import org.opensearch.gradle.ExportOpenSearchBuildResourcesTask
import org.opensearch.gradle.info.BuildParams
import org.opensearch.gradle.testclusters.OpenSearchCluster

// Common config when running with a FIPS-140 runtime JVM
if (BuildParams.inFipsJvm) {
Expand Down Expand Up @@ -29,7 +29,7 @@ if (BuildParams.inFipsJvm) {
def bcTlsFips = dependencies.create('org.bouncycastle:bctls-fips:1.0.9')

pluginManager.withPlugin('java') {
TaskProvider<ExportElasticsearchBuildResourcesTask> fipsResourcesTask = project.tasks.register('fipsResources', ExportElasticsearchBuildResourcesTask)
TaskProvider<ExportOpenSearchBuildResourcesTask> fipsResourcesTask = project.tasks.register('fipsResources', ExportOpenSearchBuildResourcesTask)
fipsResourcesTask.configure {
outputDir = fipsResourcesDir
copy fipsSecurity.name
Expand All @@ -46,7 +46,7 @@ if (BuildParams.inFipsJvm) {
}
}

pluginManager.withPlugin("elasticsearch.testclusters") {
pluginManager.withPlugin("opensearch.testclusters") {
afterEvaluate {
// This afterEvaluate hooks is required to avoid deprecated configuration resolution
// This configuration can be removed once system modules are available
Expand All @@ -61,9 +61,9 @@ if (BuildParams.inFipsJvm) {
extraConfigFile "fips_java.security", fipsSecurity
extraConfigFile "fips_java.policy", fipsPolicy
extraConfigFile "cacerts.bcfks", fipsTrustStore
systemProperty 'java.security.properties', '=${ES_PATH_CONF}/fips_java.security'
systemProperty 'java.security.policy', '=${ES_PATH_CONF}/fips_java.policy'
systemProperty 'javax.net.ssl.trustStore', '${ES_PATH_CONF}/cacerts.bcfks'
systemProperty 'java.security.properties', '=${OPENSEARCH_PATH_CONF}/fips_java.security'
systemProperty 'java.security.policy', '=${OPENSEARCH_PATH_CONF}/fips_java.policy'
systemProperty 'javax.net.ssl.trustStore', '${OPENSEARCH_PATH_CONF}/cacerts.bcfks'
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStoreType', 'BCFKS'
Expand Down
2 changes: 1 addition & 1 deletion gradle/forbidden-dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// we do not want any of these dependencies on the compilation classpath
// because they could then be used within Elasticsearch
// because they could then be used within OpenSearch
List<String> FORBIDDEN_DEPENDENCIES = [
'guava'
]
Expand Down
22 changes: 11 additions & 11 deletions gradle/formatting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import org.elasticsearch.gradle.BuildPlugin
import org.opensearch.gradle.BuildPlugin

/*
* This script plugin configures formatting for Java source using Spotless
Expand Down Expand Up @@ -60,16 +60,16 @@ def projectPathsToExclude = [
':example-plugins:rescore',
':example-plugins:rest-handler',
':example-plugins:script-expert-scoring',
':libs:elasticsearch-cli',
':libs:elasticsearch-core',
':libs:elasticsearch-dissect',
':libs:elasticsearch-geo',
':libs:elasticsearch-grok',
':libs:elasticsearch-nio',
':libs:elasticsearch-plugin-classloader',
':libs:elasticsearch-secure-sm',
':libs:elasticsearch-ssl-config',
':libs:elasticsearch-x-content',
':libs:opensearch-cli',
':libs:opensearch-core',
':libs:opensearch-dissect',
':libs:opensearch-geo',
':libs:opensearch-grok',
':libs:opensearch-nio',
':libs:opensearch-plugin-classloader',
':libs:opensearch-secure-sm',
':libs:opensearch-ssl-config',
':libs:opensearch-x-content',
':modules:aggs-matrix-stats',
':modules:analysis-common',
':modules:ingest-common',
Expand Down
8 changes: 4 additions & 4 deletions gradle/ide.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.elasticsearch.gradle.info.BuildParams
import org.opensearch.gradle.info.BuildParams
import org.jetbrains.gradle.ext.Remote
import org.jetbrains.gradle.ext.JUnit

Expand Down Expand Up @@ -78,12 +78,12 @@ if (System.getProperty('idea.active') == 'true') {
scopes = ['x-pack': 'Elastic']
profiles {
Apache {
keyword = 'Licensed to Elasticsearch under one or more contributor'
keyword = 'Licensed to OpenSearch under one or more contributor'
notice = '''\
Licensed to Elasticsearch under one or more contributor
Licensed to OpenSearch under one or more contributor
license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright
ownership. Elasticsearch licenses this file to you under
ownership. OpenSearch licenses this file to you under
the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
10 changes: 5 additions & 5 deletions gradle/local-distribution.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
* The local distribution will be installed to
* build/distributions/local
* */
import org.elasticsearch.gradle.Architecture
import org.opensearch.gradle.Architecture

apply plugin:'elasticsearch.internal-distribution-download'
apply plugin:'opensearch.internal-distribution-download'

elasticsearch_distributions {
opensearch_distributions {
local {
type = 'archive'
architecture = Architecture.current()
}
}

tasks.register('localDistro', Sync) {
from(elasticsearch_distributions.local.extracted)
from(opensearch_distributions.local.extracted)
into("build/distribution/local")
doLast {
logger.lifecycle("Elasticsearch distribution installed to ${destinationDir}.")
logger.lifecycle("OpenSearch distribution installed to ${destinationDir}.")
}
}
6 changes: 3 additions & 3 deletions gradle/run.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import org.elasticsearch.gradle.testclusters.RunTask
import org.opensearch.gradle.testclusters.RunTask

apply plugin: 'elasticsearch.testclusters'
apply plugin: 'opensearch.testclusters'

testClusters {
runTask {
Expand All @@ -28,7 +28,7 @@ testClusters {

tasks.register("run", RunTask) {
useCluster testClusters.runTask;
description = 'Runs elasticsearch in the foreground'
description = 'Runs opensearch in the foreground'
group = 'Verification'

impliesSubProjects = true
Expand Down
10 changes: 5 additions & 5 deletions gradle/runtime-jdk-provision.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import org.elasticsearch.gradle.Architecture
import org.elasticsearch.gradle.OS
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.info.BuildParams
import org.opensearch.gradle.Architecture
import org.opensearch.gradle.OS
import org.opensearch.gradle.VersionProperties
import org.opensearch.gradle.info.BuildParams

apply plugin: 'elasticsearch.jdk-download'
apply plugin: 'opensearch.jdk-download'

if (BuildParams.getIsRuntimeJavaHomeSet()) {
configure(allprojects - project(':build-tools')) {
Expand Down