diff --git a/build.gradle b/build.gradle index b72014b4c0..c8d0fe1cfa 100644 --- a/build.gradle +++ b/build.gradle @@ -42,46 +42,48 @@ allprojects { } } - project.plugins.withType(JavaPlugin).configureEach { - java { - withJavadocJar() - withSourcesJar() - } + if(project.name.startsWith('data-prepper') || project.parent != null && project.parent.name.equals('data-prepper-plugins')) { + project.plugins.withType(JavaPlugin).configureEach { + java { + withJavadocJar() + withSourcesJar() + } - afterEvaluate { - 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' } } }