Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class PluginBuildPlugin implements Plugin<Project> {
'name' : extension1.name,
'description' : extension1.description,
'version' : extension1.version,
'dependencies' : extension1.versionRange ? "{ opensearch: \"${extension1.versionRange}\" }" : "{}",
'opensearchVersion' : Version.fromString(VersionProperties.getOpenSearch()).toString(),
'javaVersion' : java.targetCompatibility as String,
'classname' : extension1.classname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public class PluginPropertiesExtension {

private String version;

/**
* Optional semver-like range string (e.g., "~2.12.0", "^2.13.0", "&gt;=2.12.0 &lt;2.14.0", etc.)
* This will be expanded into plugin-descriptor.properties as 'dependencies'.
*/
private String versionRange;

private String description;

private String classname;
Expand Down Expand Up @@ -102,6 +108,14 @@ public void setVersion(String version) {
this.version = version;
}

public String getVersionRange() {
return versionRange;
}

public void setVersionRange(String versionRange) {
this.versionRange = versionRange;
}

public String getDescription() {
return description;
}
Expand Down Expand Up @@ -171,4 +185,36 @@ public boolean isHasClientJar() {
public void setHasClientJar(boolean hasClientJar) {
this.hasClientJar = hasClientJar;
}

@Override
public String toString() {
return "PluginPropertiesExtension{"
+ "name='"
+ getName()
+ "'"
+ ", version='"
+ getVersion()
+ "'"
+ ", versionRange='"
+ versionRange
+ "'"
+ ", description='"
+ description
+ "'"
+ ", classname='"
+ classname
+ "'"
+ ", customFolderName='"
+ customFolderName
+ "'"
+ ", extendedPlugins="
+ extendedPlugins
+ ", hasNativeController="
+ hasNativeController
+ ", requiresKeystore="
+ requiresKeystore
+ ", hasClientJar="
+ hasClientJar
+ "}";
}
}
2 changes: 2 additions & 0 deletions buildSrc/src/main/resources/plugin-descriptor.properties
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ extended.plugins=${extendedPlugins}
#
# 'has.native.controller': whether or not the plugin has a native controller
has.native.controller=${hasNativeController}

dependencies=${dependencies}
Loading