-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: bowenlan-amzn <[email protected]>
- Loading branch information
1 parent
dbd2bc2
commit 3ef1f9c
Showing
2 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ apply plugin: 'kotlin' | |
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
apply plugin: 'org.jetbrains.kotlin.plugin.allopen' | ||
apply plugin: 'idea' | ||
apply plugin: 'maven-publish' | ||
|
||
ext { | ||
projectSubstitutions = [:] | ||
|
@@ -83,6 +84,11 @@ tasks.register("sourcesJar", Jar) { | |
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
archiveClassifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
test { | ||
doFirst { | ||
test.classpath -= project.files(project.tasks.named('shadowJar')) | ||
|
@@ -103,3 +109,57 @@ check.dependsOn integTest | |
testClusters.javaRestTest { | ||
testDistribution = 'INTEG_TEST' | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = 'staging' | ||
url = "${rootProject.layout.buildDirectory}/local-staging-repo" | ||
} | ||
maven { | ||
name = "Snapshots" | ||
url = "https://aws.oss.sonatype.org/content/repositories/snapshots" | ||
credentials { | ||
username "$System.env.SONATYPE_USERNAME" | ||
password "$System.env.SONATYPE_PASSWORD" | ||
} | ||
} | ||
} | ||
publications { | ||
shadow(MavenPublication) { | ||
project.shadow.component(it) | ||
groupId = 'org.opensearch.opensearch-index-management' | ||
artifactId = 'opensearch-index-management-spi' | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom { | ||
name = "OpenSearch Index Management SPI" | ||
packaging = "jar" | ||
url = "https://github.com/opensearch-project/index-management" | ||
description = "OpenSearch Index Management SPI" | ||
scm { | ||
connection = "scm:[email protected]:opensearch-project/index-management.git" | ||
developerConnection = "scm:[email protected]:opensearch-project/index-management.git" | ||
url = "[email protected]:opensearch-project/index-management.git" | ||
} | ||
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/index-management" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
gradle.startParameter.setShowStacktrace(ShowStacktrace.ALWAYS) | ||
gradle.startParameter.setLogLevel(LogLevel.DEBUG) | ||
} |