mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Apply 2-space indent to all gradle scripts (#48849)
Closes #48724. Update `.editorconfig` to make the Java settings the default for all files, and then apply a 2-space indent to all `*.gradle` files. Then reformat all the files.
This commit is contained in:
parent
fbaf8c428d
commit
3a3e5f6176
184 changed files with 4122 additions and 4120 deletions
|
@ -1,5 +1,5 @@
|
|||
import com.bettercloud.vault.VaultConfig;
|
||||
import com.bettercloud.vault.Vault;
|
||||
import com.bettercloud.vault.VaultConfig
|
||||
import com.bettercloud.vault.Vault
|
||||
|
||||
initscript {
|
||||
repositories {
|
||||
|
@ -30,7 +30,7 @@ final String vaultToken = System.getenv('VAULT_TOKEN') ?: new Vault(
|
|||
.withRetries(5, 1000)
|
||||
.auth()
|
||||
.loginByAppRole("approle", System.env.VAULT_ROLE_ID, System.env.VAULT_SECRET_ID)
|
||||
.getAuthClientToken();
|
||||
.getAuthClientToken()
|
||||
|
||||
final Vault vault = new Vault(
|
||||
new VaultConfig()
|
||||
|
@ -45,7 +45,7 @@ final Vault vault = new Vault(
|
|||
if (USE_ARTIFACTORY) {
|
||||
final Map<String, String> artifactoryCredentials = vault.logical()
|
||||
.read("secret/elasticsearch-ci/artifactory.elstc.co")
|
||||
.getData();
|
||||
.getData()
|
||||
logger.info("Using elastic artifactory repos")
|
||||
Closure configCache = {
|
||||
return {
|
||||
|
@ -93,7 +93,7 @@ final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticse
|
|||
if (buildCacheUrl) {
|
||||
final Map<String, String> buildCacheCredentials = vault.logical()
|
||||
.read("secret/elasticsearch-ci/gradle-build-cache")
|
||||
.getData();
|
||||
.getData()
|
||||
gradle.settingsEvaluated { settings ->
|
||||
settings.buildCache {
|
||||
local {
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
|
||||
root = true
|
||||
|
||||
[*.java]
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.bat]
|
||||
indent_size = 2
|
||||
|
||||
[*.gradle]
|
||||
indent_size = 2
|
||||
|
|
|
@ -435,6 +435,7 @@ class Run extends DefaultTask {
|
|||
project.project(':distribution').run.debug = enabled
|
||||
}
|
||||
}
|
||||
|
||||
task run(type: Run) {
|
||||
dependsOn ':distribution:run'
|
||||
description = 'Runs elasticsearch in the foreground'
|
||||
|
|
|
@ -256,7 +256,7 @@ class VersionPropertiesLoader {
|
|||
elasticsearch
|
||||
)
|
||||
}
|
||||
String qualifier = systemProperties.getProperty("build.version_qualifier", "");
|
||||
String qualifier = systemProperties.getProperty("build.version_qualifier", "")
|
||||
if (qualifier.isEmpty() == false) {
|
||||
if (qualifier.matches("(alpha|beta|rc)\\d+") == false) {
|
||||
throw new IllegalStateException("Invalid qualifier: " + qualifier)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
String distroConfig = System.getProperty('tests.local_distro.config')
|
||||
if (distroConfig != null) {
|
||||
// setup the test distribution as an artifact of this project
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
project.gradle.projectsEvaluated {
|
||||
// wire the jdk repo to wiremock
|
||||
String fakeJdkRepo = Objects.requireNonNull(System.getProperty('tests.jdk_repo'))
|
||||
|
|
|
@ -80,7 +80,6 @@ testingConventions {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
dependencyLicenses {
|
||||
dependencies = project.configurations.runtime.fileCollection {
|
||||
it.group.startsWith('org.elasticsearch') == false
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.elasticsearch.gradle.tar.SymbolicLinkPreservingTar
|
|||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
|
||||
// need this so Zip/Tar tasks get basic defaults...
|
||||
apply plugin: 'base'
|
||||
|
||||
|
|
|
@ -559,7 +559,6 @@ subprojects {
|
|||
'def': oss ? 'oss' : 'default'
|
||||
],
|
||||
|
||||
|
||||
'es.distribution.type': [
|
||||
'deb': 'deb',
|
||||
'rpm': 'rpm',
|
||||
|
|
|
@ -35,7 +35,8 @@ import static org.elasticsearch.gradle.BuildPlugin.getJavaHome
|
|||
* unreleased versions are when Gradle projects are set up, so we use "build-unreleased-version-*" as placeholders
|
||||
* and configure them to build various versions here.
|
||||
*/
|
||||
bwcVersions.forPreviousUnreleased { BwcVersions.UnreleasedVersionInfo unreleasedVersion -> project("${unreleasedVersion.gradleProjectPath}") {
|
||||
bwcVersions.forPreviousUnreleased { BwcVersions.UnreleasedVersionInfo unreleasedVersion ->
|
||||
project("${unreleasedVersion.gradleProjectPath}") {
|
||||
Version bwcVersion = unreleasedVersion.version
|
||||
String bwcBranch = unreleasedVersion.branch
|
||||
apply plugin: 'distribution'
|
||||
|
@ -312,7 +313,8 @@ bwcVersions.forPreviousUnreleased { BwcVersions.UnreleasedVersionInfo unreleased
|
|||
}
|
||||
// make sure no dependencies were added to assemble; we want it to be a no-op
|
||||
assemble.dependsOn = []
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
class IndentingOutputStream extends OutputStream {
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ void addProcessFilesTask(String type, boolean oss, boolean jdk) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
addProcessFilesTask('deb', true, true)
|
||||
addProcessFilesTask('deb', true, false)
|
||||
addProcessFilesTask('deb', false, true)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
import org.elasticsearch.gradle.testclusters.DefaultTestClustersTask;
|
||||
|
||||
esplugin {
|
||||
description 'An easy, safe and fast scripting language for Elasticsearch'
|
||||
classname 'org.elasticsearch.painless.PainlessPlugin'
|
||||
|
|
|
@ -47,5 +47,7 @@ testClusters.integTest {
|
|||
// repositoryDir is used by a FS repository to create snapshots
|
||||
setting 'path.repo', "${repositoryDir.absolutePath}", PropertyNormalization.IGNORE_VALUE
|
||||
// repositoryDir is used by two URL repositories to restore snapshots
|
||||
setting 'repositories.url.allowed_urls', { "http://snapshot.test*,http://${urlFixture.addressAndPort}" }, PropertyNormalization.IGNORE_VALUE
|
||||
setting 'repositories.url.allowed_urls', {
|
||||
"http://snapshot.test*,http://${urlFixture.addressAndPort}"
|
||||
}, PropertyNormalization.IGNORE_VALUE
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import org.elasticsearch.gradle.test.RestIntegTestTask
|
||||
import org.elasticsearch.gradle.testclusters.TestClustersPlugin
|
||||
|
||||
|
|
1
test/fixtures/build.gradle
vendored
1
test/fixtures/build.gradle
vendored
|
@ -1,4 +1,3 @@
|
|||
|
||||
subprojects {
|
||||
// fixtures are mostly external and by default we don't want to check forbidden apis
|
||||
forbiddenApisMain.enabled = false
|
||||
|
|
|
@ -5,7 +5,8 @@ apply plugin: 'elasticsearch.rest-test'
|
|||
dependencies {
|
||||
testCompile project(path: xpackModule('enrich'), configuration: 'runtime')
|
||||
testCompile project(path: xpackModule('core'), configuration: 'runtime')
|
||||
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')}
|
||||
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')
|
||||
}
|
||||
|
||||
testClusters.integTest {
|
||||
testDistribution = 'DEFAULT'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
dependencies {
|
||||
testCompile project(':x-pack:plugin:core')
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* This project contains transport-level requests and responses that are shared between x-pack plugin and qa tests
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* The minimal dependencies REST-based SQL client that is used by CLI and JDBC
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* This project contains XContent protocol classes shared between server and http client
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue