From edf6605aadf94c69cd8b0d5b1ec679972e5bcde5 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 15 Dec 2023 10:30:52 +0800 Subject: [PATCH] Fix compilation issue and change names Signed-off-by: zane-neo --- .github/workflows/auto-release.yml | 2 +- .github/workflows/maven-publish.yml | 2 +- build.gradle | 25 +++++++++++++++++-------- release-notes/create_release_notes.py | 4 ++-- settings.gradle | 2 +- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 7e000b0d..c6fda9c2 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -26,4 +26,4 @@ jobs: - uses: ncipollo/release-action@v1 with: github_token: ${{ steps.github_app_token.outputs.token }} - bodyFile: release-notes/opensearch-agent-tools.release-notes-${{steps.tag.outputs.tag}}.md + bodyFile: release-notes/opensearch-skills.release-notes-${{steps.tag.outputs.tag}}.md diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 9786fa52..88dd148a 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -11,7 +11,7 @@ jobs: build-and-publish-snapshots: strategy: fail-fast: false - if: github.repository == 'opensearch-project/agent-tools' + if: github.repository == 'opensearch-project/skills' runs-on: ubuntu-latest permissions: diff --git a/build.gradle b/build.gradle index 55aa878a..bd5de420 100644 --- a/build.gradle +++ b/build.gradle @@ -61,6 +61,7 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.testclusters' apply plugin: 'opensearch.pluginzip' +def sqlJarDirectory = "$buildDir/dependencies/opensearch-sql-plugin" configurations { zipArchive @@ -69,7 +70,14 @@ configurations { } } -def sqlJarDirectory = "$buildDir/dependencies/opensearch-sql-plugin" +task addJarsToClasspath(type: Copy) { + from(fileTree(dir: sqlJarDirectory)) { + include "opensearch-sql-${version}.jar" + include "ppl-${version}.jar" + include "protocol-${version}.jar" + } + into("$buildDir/classes") +} dependencies { compileOnly group: 'org.opensearch', name:'opensearch-ml-client', version: "${version}" @@ -94,7 +102,8 @@ task extractSqlJar(type: Copy) { into sqlJarDirectory } -project.tasks.delombok.dependsOn(extractSqlJar) +tasks.addJarsToClasspath.dependsOn(extractSqlJar) +project.tasks.delombok.dependsOn(addJarsToClasspath) tasks.publishNebulaPublicationToMavenLocal.dependsOn ':generatePomFileForPluginZipPublication' tasks.validateNebulaPom.dependsOn ':generatePomFileForPluginZipPublication' @@ -133,9 +142,9 @@ compileTestJava { opensearchplugin { - name 'agent-tools' - description 'OpenSearch Agent Tools' - classname 'org.opensearch.agent_tool.ToolPlugin' + name 'skills' + description 'OpenSearch Skills' + classname 'org.opensearch.agent.ToolPlugin' extendedPlugins = ['opensearch-ml'] licenseFile rootProject.file("LICENSE.txt") noticeFile rootProject.file("NOTICE") @@ -159,8 +168,8 @@ publishing { publications { pluginZip(MavenPublication) { publication -> pom { - name = "OpenSearch Agent Tools" - description = "OpenSearch Agent Tools" + name = "OpenSearch Skills" + description = "OpenSearch Skills" groupId = "org.opensearch.plugin" licenses { license { @@ -171,7 +180,7 @@ publishing { developers { developer { name = "OpenSearch" - url = "https://github.com/opensearch-project/agent-tools" + url = "https://github.com/opensearch-project/skills" } } } diff --git a/release-notes/create_release_notes.py b/release-notes/create_release_notes.py index 425ddcc6..4ace36d7 100644 --- a/release-notes/create_release_notes.py +++ b/release-notes/create_release_notes.py @@ -6,12 +6,12 @@ import fileinput import re -link_prefix = "https://github.com/opensearch-project/agent-tools/pull/" +link_prefix = "https://github.com/opensearch-project/skills/pull/" searchExp = re.compile("([\(\[]).*?([\)\]])") current_date = raw_input("what day is today (e.g. 2020-06-29): ") file_path = raw_input("Path to raw note file (e.g., note.md): ") -plugin_name = "agent-tools" +plugin_name = "skills" plugin_version = raw_input('Plugin version (x.x.x.x): ') app = 'OpenSearch' diff --git a/settings.gradle b/settings.gradle index 26eac06a..723a0032 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,4 +3,4 @@ * SPDX-License-Identifier: Apache-2.0 */ -rootProject.name = 'agent-tools' +rootProject.name = 'skills'