-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into SplitRfsPhasesIntoSeparateGradleProjects
- Loading branch information
Showing
14 changed files
with
267 additions
and
158 deletions.
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
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 |
---|---|---|
|
@@ -27,78 +27,6 @@ subprojects { | |
} | ||
} | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier.set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
from sourceSets.main.allSource | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
def excludedProjects = [ | ||
'buildSrc', | ||
'dockerSolution', | ||
] | ||
if (!(project.name in excludedProjects)) { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact javadocJar | ||
artifact sourcesJar | ||
|
||
|
||
group = 'org.opensearch.migrations.trafficcapture' | ||
|
||
// support -Dbuild.version, but include default | ||
version = System.getProperty("build.version", "0.1.0") | ||
|
||
// support -Dbuild.snapshot=false, but default to true | ||
if (System.getProperty("build.snapshot", "true") == "true") { | ||
version += "-SNAPSHOT" | ||
} | ||
|
||
|
||
pom { | ||
name = project.name | ||
description = 'Everything opensearch migrations' | ||
url = 'http://github.com/opensearch-project/opensearch-migrations' | ||
|
||
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/opensearch-migrations" | ||
} | ||
} | ||
scm { | ||
connection = "scm:[email protected]:opensearch-project/opensearch-migrations.git" | ||
developerConnection = "scm:[email protected]:opensearch-project/opensearch-migrations.git" | ||
url = "[email protected]:opensearch-project/opensearch-migrations.git" | ||
} | ||
} | ||
|
||
// Suppress POM metadata warnings for test fixtures | ||
suppressPomMetadataWarningsFor('testFixturesApiElements') | ||
suppressPomMetadataWarningsFor('testFixturesRuntimeElements') | ||
} | ||
} | ||
repositories { | ||
maven { url = "${rootProject.buildDir}/repository"} | ||
maven { | ||
url "https://aws.oss.sonatype.org/content/repositories/snapshots" | ||
name = 'staging' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
allprojects { | ||
|
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
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 |
---|---|---|
|
@@ -5,4 +5,101 @@ plugins { | |
task buildDockerImages() { | ||
dependsOn(':TrafficCapture:dockerSolution:buildDockerImages') | ||
dependsOn(':RFS:buildDockerImages') | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
apply plugin: 'maven-publish' | ||
|
||
tasks.withType(Test) { | ||
// Getting javadoc to compile is part of the test suite to ensure we are able to publish our artifacts | ||
dependsOn project.javadoc | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier.set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
from sourceSets.main.allSource | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
def excludedProjectPaths = [ | ||
':RFS', | ||
':TrafficCapture', | ||
':TrafficCapture:dockerSolution', | ||
] | ||
if (!(project.path in excludedProjectPaths)) { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact javadocJar | ||
artifact sourcesJar | ||
|
||
group = 'org.opensearch.migrations.trafficcapture' | ||
|
||
// support -Dbuild.version, but include default | ||
version = System.getProperty("build.version", "0.1.0") | ||
|
||
// support -Dbuild.snapshot=false, but default to true | ||
if (System.getProperty("build.snapshot", "true") == "true") { | ||
version += "-SNAPSHOT" | ||
} | ||
|
||
pom { | ||
name = project.name | ||
description = 'Everything opensearch migrations' | ||
url = 'http://github.com/opensearch-project/opensearch-migrations' | ||
|
||
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/opensearch-migrations" | ||
} | ||
} | ||
scm { | ||
connection = "scm:[email protected]:opensearch-project/opensearch-migrations.git" | ||
developerConnection = "scm:[email protected]:opensearch-project/opensearch-migrations.git" | ||
url = "[email protected]:opensearch-project/opensearch-migrations.git" | ||
} | ||
} | ||
|
||
// Suppress POM metadata warnings for test fixtures | ||
suppressPomMetadataWarningsFor('testFixturesApiElements') | ||
suppressPomMetadataWarningsFor('testFixturesRuntimeElements') | ||
} | ||
} | ||
repositories { | ||
maven { url = "${rootProject.buildDir}/repository"} | ||
maven { | ||
url "https://aws.oss.sonatype.org/content/repositories/snapshots" | ||
name = 'staging' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task listPublishedArtifacts { | ||
doLast { | ||
subprojects.each { proj -> | ||
def publishingExtension = proj.extensions.findByType(PublishingExtension) | ||
if (publishingExtension) { | ||
publishingExtension.publications.each { publication -> | ||
if (publication instanceof MavenPublication) { | ||
println "${publication.groupId}.${publication.artifactId}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.