diff --git a/ppl/build.gradle b/ppl/build.gradle index 6d0a67c443..b9d47b592a 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'antlr' + id 'maven-publish' } generateGrammarSource { @@ -97,3 +98,40 @@ jacocoTestCoverageVerification { } } check.dependsOn jacocoTestCoverageVerification + +publishing { + publications { + mavenJava(MavenPublication) { + group = 'opensearch-sql' + artifactId = 'ppl' + from components.java + pom { + name = 'ppl' + description = 'OpenSearch PPL' + groupId = "org.opensearch.plugin" + licenses { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + name = 'OpenSearch' + url = 'https://github.com/opensearch-project/sql' + } + } + } + } + } + repositories { + maven { + name = "Snapshots" // optional target repository name + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } +} diff --git a/protocol/build.gradle b/protocol/build.gradle index 92a1aa0917..0839b10d04 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java' id "io.freefair.lombok" id 'jacoco' + id 'maven-publish' } dependencies { @@ -89,3 +90,40 @@ jacocoTestCoverageVerification { } check.dependsOn jacocoTestCoverageVerification jacocoTestCoverageVerification.dependsOn jacocoTestReport + +publishing { + publications { + mavenJava(MavenPublication) { + group = 'opensearch-sql' + artifactId = 'protocol' + from components.java + pom { + name = 'protocol' + description = 'OpenSearch PPL' + groupId = "org.opensearch.plugin" + licenses { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + name = 'OpenSearch' + url = 'https://github.com/opensearch-project/sql' + } + } + } + } + } + repositories { + maven { + name = "Snapshots" // optional target repository name + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } +}