Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shadow jar publication to lang-painless module. #2681

Merged
merged 4 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
*/

import org.opensearch.gradle.testclusters.DefaultTestClustersTask;
import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin

apply plugin: 'opensearch.validate-rest-spec'
apply plugin: 'opensearch.yaml-rest-test'
apply plugin: 'com.github.johnrengelman.shadow'

opensearchplugin {
description 'An easy, safe and fast scripting language for OpenSearch'
Expand All @@ -49,11 +52,36 @@ dependencies {
api 'org.ow2.asm:asm-util:9.2'
api 'org.ow2.asm:asm-tree:9.2'
api 'org.ow2.asm:asm-commons:9.2'
api 'org.ow2.asm:asm-analysis:7.2'
api 'org.ow2.asm:asm-analysis:9.2'
api 'org.ow2.asm:asm:9.2'
api project('spi')
}

test {
doFirst {
test.classpath -= project.files(project.tasks.named('shadowJar'))
test.classpath -= project.configurations.getByName(ShadowBasePlugin.CONFIGURATION_NAME)
test.classpath += project.extensions.getByType(SourceSetContainer).getByName(SourceSet.MAIN_SOURCE_SET_NAME).runtimeClasspath
}
}

shadowJar {
classifier = null
relocate 'org.objectweb', 'org.opensearch.repackage.org.objectweb'
dependencies {
include(dependency('org.ow2.asm:asm:9.2'))
include(dependency('org.ow2.asm:asm-util:9.2'))
include(dependency('org.ow2.asm:asm-tree:9.2'))
include(dependency('org.ow2.asm:asm-commons:9.2'))
include(dependency('org.ow2.asm:asm-analysis:9.2'))
}
}

tasks.validateNebulaPom.dependsOn tasks.generatePomFileForShadowPublication
tasks.validateShadowPom.dependsOn tasks.generatePomFileForNebulaPublication
tasks.publishNebulaPublicationToMavenLocal.dependsOn tasks.generatePomFileForShadowPublication
tasks.publishShadowPublicationToMavenLocal.dependsOn tasks.generatePomFileForNebulaPublication

tasks.named("dependencyLicenses").configure {
mapping from: /asm-.*/, to: 'asm'
}
Expand Down
1 change: 0 additions & 1 deletion modules/lang-painless/licenses/asm-analysis-7.2.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions modules/lang-painless/licenses/asm-analysis-9.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7487dd756daf96cab9986e44b9d7bcb796a61c10