Skip to content

Commit 450fcc6

Browse files
Updates build.gradle files and jarhell references
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent cdd7252 commit 450fcc6

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

RESOURCE_ACCESS_CONTROL_FOR_PLUGINS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ This feature introduces **two primary components** for plugin developers:
3131

3232
### **Plugin Implementation Requirements**
3333
Each plugin must:
34-
- **Declare a dependency** on `opensearch-security-client` package:
34+
- **Declare an `implementation` dependency** on `opensearch-security-client` package:
3535
```build.gradle
3636
implementation group: 'org.opensearch', name:'opensearch-security-client', version: "${opensearch_build}"
3737
```
38+
- **Declare a `compileOnly` dependency** on `opensearch-resource-sharing-spi` package:
39+
```build.gradle
40+
compileOnly "org.opensearch:opensearch-resource-sharing-spi:${opensearch_build}"
41+
```
3842
- **Extend** `opensearch-security` plugin with optional flag:
3943
```build.gradle
4044
opensearchplugin {

client/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
Here's a **refined and corrected** version of your `README.md` file with improved clarity, grammar, and formatting:
2-
3-
---
4-
51
# **Resource Sharing Client**
62

73
This package provides a **ResourceSharing client** that resource plugins can use to **implement access control** by communicating with the **OpenSearch Security Plugin**.

client/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ repositories {
3535
dependencies {
3636
compileOnly "org.opensearch:opensearch:${opensearch_version}"
3737
// SPI dependency comes through common
38-
implementation project(path: ":${rootProject.name}-common", configuration: 'shadow')
38+
compileOnly project(path: ":${rootProject.name}-common", configuration: 'shadow')
39+
compileOnly project(path: ":opensearch-resource-sharing-spi")
40+
}
41+
42+
shadowJar {
43+
archiveClassifier.set(null)
3944
}
4045

4146
java {
@@ -99,3 +104,5 @@ publishing {
99104
}
100105
}
101106
}
107+
108+
compileJava.dependsOn(':opensearch-security-common:shadowJar')

common/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ repositories {
2222
dependencies {
2323
compileOnly "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}"
2424
compileOnly "org.opensearch.plugin:lang-painless:${opensearch_version}"
25-
implementation project(path: ":opensearch-resource-sharing-spi", configuration: 'shadow')
25+
compileOnly project(path: ":opensearch-resource-sharing-spi")
2626
compileOnly "org.apache.commons:commons-lang3:${versions.commonslang}"
2727
compileOnly 'com.password4j:password4j:1.8.2'
2828
compileOnly "com.google.guava:guava:${guava_version}"
2929
}
3030

31+
shadowJar {
32+
archiveClassifier.set(null)
33+
}
34+
3135
java {
3236
sourceCompatibility = JavaVersion.VERSION_21
3337
targetCompatibility = JavaVersion.VERSION_21
@@ -89,3 +93,5 @@ publishing {
8993
}
9094
}
9195
}
96+
97+
publishShadowPublicationToMavenLocal.mustRunAfter shadowJar

0 commit comments

Comments
 (0)