diff --git a/build.gradle b/build.gradle index 7c2b1f164f..b72014b4c0 100644 --- a/build.gradle +++ b/build.gradle @@ -48,39 +48,41 @@ allprojects { withSourcesJar() } - project.publishing { - repositories { - maven { - url "file://${mavenPublicationRootFile.absolutePath}" + afterEvaluate { + project.publishing { + repositories { + maven { + url "file://${mavenPublicationRootFile.absolutePath}" + } } - } - publications { - mavenJava(MavenPublication) { - from project.components.findByName("java") ?: project.components.findByName("javaLibrary") + publications { + mavenJava(MavenPublication) { + from project.components.findByName("java") ?: project.components.findByName("javaLibrary") - groupId = project.group - artifactId = project.name - version = project.version + groupId = project.group + artifactId = project.name + version = project.version - pom { - name = project.name - description = "Data Prepper project: ${project.name}" - url = 'https://github.com/opensearch-project/data-prepper' - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' + pom { + name = project.name + description = "Data Prepper project: ${project.name}" + url = 'https://github.com/opensearch-project/data-prepper' + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } } - } - developers { - developer { - name = 'OpenSearch' - url = 'https://github.com/opensearch-project' + developers { + developer { + name = 'OpenSearch' + url = 'https://github.com/opensearch-project' + } + } + scm { + url = 'https://github.com/opensearch-project/data-prepper' } - } - scm { - url = 'https://github.com/opensearch-project/data-prepper' } } } diff --git a/data-prepper-core/build.gradle b/data-prepper-core/build.gradle index f13bce3db9..10e7732936 100644 --- a/data-prepper-core/build.gradle +++ b/data-prepper-core/build.gradle @@ -11,6 +11,8 @@ sourceSets { } } +group = 'org.opensearch.dataprepper.core' + dependencies { implementation project(':data-prepper-api') implementation project(':data-prepper-expression') diff --git a/data-prepper-event/build.gradle b/data-prepper-event/build.gradle index 3ec8fe936f..28e662b5c9 100644 --- a/data-prepper-event/build.gradle +++ b/data-prepper-event/build.gradle @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +group = 'org.opensearch.dataprepper.core' + dependencies { implementation project(':data-prepper-api') implementation 'javax.inject:javax.inject:1' diff --git a/data-prepper-expression/build.gradle b/data-prepper-expression/build.gradle index f07922371a..7d1e1625e9 100644 --- a/data-prepper-expression/build.gradle +++ b/data-prepper-expression/build.gradle @@ -8,6 +8,8 @@ plugins { id 'idea' } +group = 'org.opensearch.dataprepper.core' + ext { antlrGeneratedPackageDirectory = "org/opensearch/dataprepper/expression/antlr/" } diff --git a/data-prepper-logstash-configuration/build.gradle b/data-prepper-logstash-configuration/build.gradle index 841adca8f7..0d4014143e 100644 --- a/data-prepper-logstash-configuration/build.gradle +++ b/data-prepper-logstash-configuration/build.gradle @@ -8,6 +8,8 @@ plugins { id 'idea' } +group = 'org.opensearch.dataprepper.core' + ext { antlrGeneratedPackageDirectory = "org/opensearch/dataprepper/logstash/" } diff --git a/data-prepper-main/build.gradle b/data-prepper-main/build.gradle index 9384185346..ac4497bc98 100644 --- a/data-prepper-main/build.gradle +++ b/data-prepper-main/build.gradle @@ -11,6 +11,8 @@ sourceSets { } } +group = 'org.opensearch.dataprepper.core' + dependencies { implementation project(':data-prepper-core') implementation project(':data-prepper-plugins') diff --git a/data-prepper-pipeline-parser/build.gradle b/data-prepper-pipeline-parser/build.gradle index 8b6c53354e..58d8982e4e 100644 --- a/data-prepper-pipeline-parser/build.gradle +++ b/data-prepper-pipeline-parser/build.gradle @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +group = 'org.opensearch.dataprepper.core' + dependencies { implementation project(':data-prepper-api') implementation project(':data-prepper-plugins:blocking-buffer') diff --git a/data-prepper-plugin-framework/build.gradle b/data-prepper-plugin-framework/build.gradle index 2a87b5ef9b..b26d9565a9 100644 --- a/data-prepper-plugin-framework/build.gradle +++ b/data-prepper-plugin-framework/build.gradle @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +group = 'org.opensearch.dataprepper.core' + dependencies { implementation project(':data-prepper-api') implementation project(':data-prepper-pipeline-parser') diff --git a/data-prepper-plugins/build.gradle b/data-prepper-plugins/build.gradle index 8ca5d70e8c..4e2beb7670 100644 --- a/data-prepper-plugins/build.gradle +++ b/data-prepper-plugins/build.gradle @@ -7,6 +7,10 @@ plugins { id 'java-library' } +allprojects { + group = 'org.opensearch.dataprepper.plugins' +} + dependencies { subprojects.forEach { api project(':data-prepper-plugins:' + it.name) } } \ No newline at end of file diff --git a/data-prepper-test-common/build.gradle b/data-prepper-test-common/build.gradle index be7559311d..4ed664b393 100644 --- a/data-prepper-test-common/build.gradle +++ b/data-prepper-test-common/build.gradle @@ -7,6 +7,8 @@ plugins { id 'java' } +group = 'org.opensearch.dataprepper.test' + dependencies { implementation testLibs.hamcrest testRuntimeOnly testLibs.junit.engine diff --git a/data-prepper-test-event/build.gradle b/data-prepper-test-event/build.gradle index 2b98299574..488ba706b3 100644 --- a/data-prepper-test-event/build.gradle +++ b/data-prepper-test-event/build.gradle @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +group = 'org.opensearch.dataprepper.test' + dependencies { implementation project(':data-prepper-api') implementation project(':data-prepper-event')