Skip to content

Commit

Permalink
[Backport feature/agent_framework] Added build script to generate art…
Browse files Browse the repository at this point in the history
…ifacts (#202)

Added build script to generate artifacts (#166)

* Added build script to generate artifacts



* Handled code coverage issue



* Added missing jar and source jars



* Matched maven artifacts name and removed build script



---------


(cherry picked from commit f70f435)

Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 8ef53f1 commit 9661ddb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
37 changes: 19 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ buildscript {
publishing {
publications {
pluginZip(MavenPublication) { publication ->

artifact sourcesJar
artifact javadocJar

pom {
name = pluginName
description = pluginDescription
Expand Down Expand Up @@ -223,26 +227,23 @@ task updateVersion {
}
}

// Get uncommitted files via git diff
// https://github.com/form-com/diff-coverage-gradle/issues/73
ext.createDiffFile = { ->
def file = Files.createTempFile(URLEncoder.encode(project.name, 'UTF-8'), '.diff').toFile()
def diffBase = 'refs/remotes/origin/main'
// Only run locally
if (!System.getenv('CI')) {
file.withOutputStream { out ->
exec {
commandLine 'git', 'diff', '--no-color', '--minimal', diffBase
standardOutput = out
}
}
}
return file
}

diffCoverageReport {
afterEvaluate {
diffSource.file = createDiffFile()
// Get uncommitted files via git diff
// https://github.com/form-com/diff-coverage-gradle/issues/73
def file = Files.createTempFile(URLEncoder.encode(project.name, 'UTF-8'), '.diff').toFile()
def diffBase = 'refs/remotes/origin/main'
// Only run locally
if (!System.getenv('CI')) {
file.withOutputStream { out ->
exec {
ignoreExitValue true
commandLine 'git', 'diff', '--no-color', '--minimal', diffBase, '|| true'
standardOutput = out
}
}
}
diffSource.file = file
}

// View report at build/reports/jacoco/diffCoverage/html/index.html
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'opensearch-ai-flow-framework'
rootProject.name = 'opensearch-flow-framework'

0 comments on commit 9661ddb

Please sign in to comment.