Skip to content

Commit

Permalink
Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distribution…
Browse files Browse the repository at this point in the history
…s. (#1668)

* Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distributions.

Signed-off-by: Cédric Pelvet <[email protected]>

* Fix dangling HTML tags in javadoc to solve build issues with JDK 17.

Signed-off-by: Cédric Pelvet <[email protected]>
  • Loading branch information
sharp-pixel authored Jan 6, 2022
1 parent db23f72 commit 1bb8864
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 7 deletions.
14 changes: 14 additions & 0 deletions distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,27 @@ distribution_archives {
}
}

darwinArm64Tar {
archiveClassifier = 'darwin-arm64'
content {
archiveFiles(modulesFiles('darwin-arm64'), 'tar', 'darwin', 'arm64', true)
}
}

noJdkDarwinTar {
archiveClassifier = 'no-jdk-darwin-x64'
content {
archiveFiles(modulesFiles('darwin-x64'), 'tar', 'darwin', 'x64', false)
}
}

noJdkDarwinArm64Tar {
archiveClassifier = 'no-jdk-darwin-arm64'
content {
archiveFiles(modulesFiles('darwin-arm64'), 'tar', 'darwin', 'arm64', false)
}
}

freebsdTar {
archiveClassifier = 'freebsd-x64'
content {
Expand Down
13 changes: 13 additions & 0 deletions distribution/archives/darwin-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.
13 changes: 13 additions & 0 deletions distribution/archives/no-jdk-darwin-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.
4 changes: 2 additions & 2 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
// Setup all required JDKs
project.jdks {
['darwin', 'linux', 'windows'].each { platform ->
(platform == 'linux' ? ['x64', 'aarch64'] : ['x64']).each { architecture ->
(platform == 'linux' || platform == 'darwin' ? ['x64', 'aarch64'] : ['x64']).each { architecture ->
"bundled_${platform}_${architecture}" {
it.platform = platform
it.version = VersionProperties.getBundledJdk(platform)
Expand Down Expand Up @@ -353,7 +353,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
}
}
def buildModules = buildModulesTaskProvider
List excludePlatforms = ['darwin-x64', 'freebsd-x64', 'linux-x64', 'linux-arm64', 'windows-x64']
List excludePlatforms = ['darwin-x64', 'freebsd-x64', 'linux-x64', 'linux-arm64', 'windows-x64', 'darwin-arm64']
if (platform != null) {
excludePlatforms.remove(excludePlatforms.indexOf(platform))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,12 @@ static MethodHandle arrayLengthGetter(Class<?> arrayType) {
* <p>
* A dynamic method call for variable {@code x} of type {@code def} looks like:
* {@code x.method(args...)}
* </p>
* <p>
* This method traverses {@code recieverClass}'s class hierarchy (including interfaces)
* until it finds a matching whitelisted method. If one is not found, it throws an exception.
* Otherwise it returns a handle to the matching method.
* <p>
* </p>
* @param painlessLookup the whitelist
* @param functions user defined functions and lambdas
* @param constants available constants to be used if the method has the {@code InjectConstantAnnotation}
Expand Down Expand Up @@ -468,6 +469,7 @@ private static MethodHandle lookupReferenceInternal(
* <p>
* A dynamic field load for variable {@code x} of type {@code def} looks like:
* {@code y = x.field}
* </p>
* <p>
* The following field loads are allowed:
* <ul>
Expand All @@ -482,7 +484,7 @@ private static MethodHandle lookupReferenceInternal(
* This method traverses {@code recieverClass}'s class hierarchy (including interfaces)
* until it finds a matching whitelisted getter. If one is not found, it throws an exception.
* Otherwise it returns a handle to the matching getter.
* <p>
* </p>
* @param painlessLookup the whitelist
* @param receiverClass Class of the object to retrieve the field from.
* @param name Name of the field.
Expand Down Expand Up @@ -537,7 +539,7 @@ static MethodHandle lookupGetter(PainlessLookup painlessLookup, Class<?> receive
* This method traverses {@code recieverClass}'s class hierarchy (including interfaces)
* until it finds a matching whitelisted setter. If one is not found, it throws an exception.
* Otherwise it returns a handle to the matching setter.
* <p>
* </p>
* @param painlessLookup the whitelist
* @param receiverClass Class of the object to retrieve the field from.
* @param name Name of the field.
Expand Down
3 changes: 2 additions & 1 deletion server/src/main/java/org/opensearch/plugins/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,11 @@ public List<SettingUpgrader<?>> getSettingUpgraders() {
* Provides a function to modify index template meta data on startup.
* <p>
* Plugins should return the input template map via {@link UnaryOperator#identity()} if no upgrade is required.
* </p>
* <p>
* The order of the template upgrader calls is undefined and can change between runs so, it is expected that
* plugins will modify only templates owned by them to avoid conflicts.
* <p>
* </p>
* @return Never {@code null}. The same or upgraded {@code IndexTemplateMetadata} map.
* @throws IllegalStateException if the node should not start because at least one {@code IndexTemplateMetadata}
* cannot be upgraded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void setScorer(Scorable scorer) {
* <p>
* The default implementation just calls {@code setNextVar("_value", value)} but
* some engines might want to handle this differently for better performance.
* <p>
* </p>
* @param value per-document value, typically a String, Long, or Double
*/
public void setNextAggregationValue(Object value) {
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ List projects = [
'distribution:archives:windows-zip',
'distribution:archives:no-jdk-windows-zip',
'distribution:archives:darwin-tar',
'distribution:archives:darwin-arm64-tar',
'distribution:archives:no-jdk-darwin-arm64-tar',
'distribution:archives:no-jdk-darwin-tar',
'distribution:archives:freebsd-tar',
'distribution:archives:no-jdk-freebsd-tar',
Expand Down

0 comments on commit 1bb8864

Please sign in to comment.