Skip to content

Commit

Permalink
Merge branch 'master' into jdk-13-ci
Browse files Browse the repository at this point in the history
* master: (224 commits)
  Use an anonymous inner class instead of lambda for UP-TO-DATE support
  Remove MonitoringClient from x-pack (elastic#42770)
  Remove XPackClient from x-pack (elastic#42729)
  address SmokeTestWatcherWithSecurityIT#testSearchInputWithInsufficientPrivileges (elastic#42764)
  [DOCS] Remove unneeded options from `[source,sql]` code blocks (elastic#42759)
  Remove locale-dependent string checking
  Clarify that inner_hits must be used to access nested fields. (elastic#42724)
  Remove CommonTermsQuery and cutoff_frequency param  (elastic#42654)
  [DOCS] Remove unneeded `ifdef::asciidoctor[]` conditionals (elastic#42758)
  [ML] Add Kibana application privilege to data frame admin/user roles (elastic#42757)
  Re-enable token bwc tests (elastic#42726)
  [ML Data Frame] Refactor stop logic (elastic#42644)
  [ML] [Data Frame] nesting group_by fields like other aggs (elastic#42718)
  Return NO_INTERVALS rather than null from empty TokenStream (elastic#42750)
  Add option to ObjectParser to consume unknown fields (elastic#42491)
  Remove leftover transport module docs (elastic#42734)
  Log the status of security on license change (elastic#42488)
  remove v6.5.x and v6.6.x version constants (elastic#42130)
  Remove transport client docs (elastic#42483)
  Fix docs typo in the certutil CSR mode (elastic#42593)
  ...
  • Loading branch information
jasontedor committed Jun 4, 2019
2 parents c33cad7 + a3cf302 commit 7b1c1bd
Show file tree
Hide file tree
Showing 1,237 changed files with 17,465 additions and 23,204 deletions.
18 changes: 18 additions & 0 deletions .ci/build-cache.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
if (System.getenv('GRADLE_BUILD_CACHE_URL')) {
gradle.settingsEvaluated { settings ->
settings.buildCache {
remote(HttpBuildCache) {
url = System.getenv('GRADLE_BUILD_CACHE_URL')
push = Boolean.valueOf(System.getenv('GRADLE_BUILD_CACHE_PUSH') ?: 'false')
if (System.getenv('GRADLE_BUILD_CACHE_USERNAME') && System.getenv('GRADLE_BUILD_CACHE_PASSWORD')) {
credentials {
username = System.getenv('GRADLE_BUILD_CACHE_USERNAME')
password = System.getenv('GRADLE_BUILD_CACHE_PASSWORD')
}
}
}
}
}
} else {
throw new GradleException("You must supply a value for GRADLE_BUILD_CACHE_URL environment variable when applying build-cache.gradle init script")
}
1 change: 1 addition & 0 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export JAVA8_HOME="${HOME}"/.java/java8
export JAVA11_HOME="${HOME}"/.java/java11
export JAVA12_HOME="${HOME}"/.java/openjdk12
./gradlew --parallel clean --scan -Porg.elasticsearch.acceptScanTOS=true -s resolveAllDependencies

37 changes: 4 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.gradle.plugins.ide.eclipse.model.SourceFolder
plugins {
id 'com.gradle.build-scan' version '2.2.1'
id 'base'
id 'elasticsearch.global-build-info'
}
if (Boolean.valueOf(project.findProperty('org.elasticsearch.acceptScanTOS') ?: "false")) {
buildScan {
Expand Down Expand Up @@ -241,8 +242,7 @@ allprojects {
"org.elasticsearch.plugin:percolator-client:${version}": ':modules:percolator',
"org.elasticsearch.plugin:rank-eval-client:${version}": ':modules:rank-eval',
// for security example plugins
"org.elasticsearch.plugin:x-pack-core:${version}": ':x-pack:plugin:core',
"org.elasticsearch.client:x-pack-transport:${version}": ':x-pack:transport-client'
"org.elasticsearch.plugin:x-pack-core:${version}": ':x-pack:plugin:core'
]

/*
Expand All @@ -263,7 +263,7 @@ allprojects {
}

project.afterEvaluate {
configurations.all {
configurations.matching { it.canBeResolved }.all {
resolutionStrategy.dependencySubstitution { DependencySubstitutions subs ->
projectSubstitutions.each { k,v ->
subs.substitute(subs.module(k)).with(subs.project(v))
Expand Down Expand Up @@ -337,7 +337,7 @@ gradle.projectsEvaluated {
if (tasks.findByPath('test') != null && tasks.findByPath('integTest') != null) {
integTest.mustRunAfter test
}
configurations.all { Configuration configuration ->
configurations.matching { it.canBeResolved }.all { Configuration configuration ->
dependencies.all { Dependency dep ->
Project upstreamProject = dependencyToProject(dep)
if (upstreamProject != null) {
Expand Down Expand Up @@ -552,31 +552,6 @@ gradle.projectsEvaluated {
}
}

if (System.properties.get("build.compare") != null) {
apply plugin: 'compare-gradle-builds'
compareGradleBuilds {
ext.referenceProject = System.properties.get("build.compare")
doFirst {
if (file(referenceProject).exists() == false) {
throw new GradleException(
"Use git worktree to check out a version to compare against to ../elasticsearch_build_reference"
)
}
}
sourceBuild {
gradleVersion = gradle.getGradleVersion()
projectDir = referenceProject
tasks = ["clean", "assemble"]
arguments = ["-Dbuild.compare_friendly=true"]
}
targetBuild {
tasks = ["clean", "assemble"]
// use -Dorg.gradle.java.home= to alter jdk versions
arguments = ["-Dbuild.compare_friendly=true"]
}
}
}

allprojects {
task resolveAllDependencies {
dependsOn tasks.matching { it.name == "pullFixture"}
Expand Down Expand Up @@ -618,7 +593,3 @@ allprojects {
}
}
}




58 changes: 13 additions & 45 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,17 @@ if (project == rootProject) {
// we update the version property to reflect if we are building a snapshot or a release build
// we write this back out below to load it in the Build.java which will be shown in rest main action
// to indicate this being a snapshot build or a release build.
File propsFile = project.file('version.properties')
Properties props = VersionPropertiesLoader.loadBuildSrcVersion(propsFile)
Properties props = VersionPropertiesLoader.loadBuildSrcVersion(project.file('version.properties'))
version = props.getProperty("elasticsearch")

task generateVersionProperties(type: WriteProperties) {
outputFile = "${buildDir}/version.properties"
comment = 'Generated version properties'
properties(props)
}

processResources {
inputs.file(propsFile)
// We need to be explicit with the version because we add snapshot and qualifier to it based on properties
inputs.property("dynamic_elasticsearch_version", props.getProperty("elasticsearch"))
doLast {
Writer writer = file("$destinationDir/version.properties").newWriter()
try {
props.store(writer, "Generated version properties")
} finally {
writer.close()
}
}
from(generateVersionProperties)
}

/*****************************************************************************
Expand All @@ -69,37 +65,10 @@ processResources {
if (JavaVersion.current() < JavaVersion.VERSION_11) {
throw new GradleException('At least Java 11 is required to build elasticsearch gradle tools')
}
// Gradle 4.10 does not support setting this to 11 yet
targetCompatibility = "10"
sourceCompatibility = "10"

// We have a few classes that need to be compiled for older java versions because these are used to run checks against
// those
sourceSets {
minimumRuntime {
// We only want Java here, but the Groovy doesn't configure javadoc correctly if we don't define this as groovy
groovy {
srcDirs = ['src/main/minimumRuntime']
}
}
}
compileMinimumRuntimeGroovy {
targetCompatibility = 8
sourceCompatibility = 8
}
dependencies {
if (project.ext.has("isEclipse") == false || project.ext.isEclipse == false) {
// eclipse is confused if this is set explicitly
compile sourceSets.minimumRuntime.output
}
minimumRuntimeCompile "junit:junit:${props.getProperty('junit')}"
minimumRuntimeCompile localGroovy()
minimumRuntimeCompile gradleApi()
}
jar {
from sourceSets.minimumRuntime.output
}

// Keep compatibility with Java 8 for external users of build-tools that haven't migrated to Java 11
targetCompatibility = '8'
sourceCompatibility = '8'

/*****************************************************************************
* Dependencies used by the entire build *
Expand Down Expand Up @@ -164,7 +133,6 @@ if (project != rootProject) {
dependenciesInfo.enabled = false
forbiddenApisMain.enabled = false
forbiddenApisTest.enabled = false
forbiddenApisMinimumRuntime.enabled = false
jarHell.enabled = false
thirdPartyAudit.enabled = false

Expand Down Expand Up @@ -209,7 +177,7 @@ if (project != rootProject) {
if (isLuceneSnapshot) {
systemProperty 'test.lucene-snapshot-revision', isLuceneSnapshot[0][1]
}
maxParallelForks System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel.toString()) as Integer
maxParallelForks System.getProperty('tI', project.rootProject.ext.defaultParallel.toString()) as Integer
}
check.dependsOn(integTest)

Expand Down
Loading

0 comments on commit 7b1c1bd

Please sign in to comment.