Skip to content

Commit 675f08c

Browse files
Configure maven publishing for the SDK
1 parent 0f57d15 commit 675f08c

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

products/feature-flagging/api/build.gradle.kts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ import groovy.lang.Closure
44
plugins {
55
`java-library`
66
idea
7+
`maven-publish`
78
}
89

910
apply(from = "$rootDir/gradle/java.gradle")
1011
apply(from = "$rootDir/gradle/publish.gradle")
1112

1213
val minJavaVersionForTests by extra(JavaVersion.VERSION_11)
1314

14-
description = "OpenFeature Provider interface implementation"
15+
description = "Implementation of the OpenFeature Provider interface."
16+
17+
// Set both JAR and Maven artifact name
18+
val openFeatureArtifactId = "dd-openfeature"
19+
base {
20+
archivesName.set(openFeatureArtifactId)
21+
}
22+
23+
publishing {
24+
publications.withType<MavenPublication>().configureEach {
25+
artifactId = openFeatureArtifactId
26+
}
27+
}
1528

1629
idea {
1730
module {
@@ -26,10 +39,12 @@ java {
2639
}
2740

2841
dependencies {
29-
api(libs.slf4j)
30-
api("dev.openfeature:sdk:1.18.2")
31-
api(project(":products:feature-flagging:bootstrap"))
42+
implementation(libs.slf4j)
43+
implementation("dev.openfeature:sdk:1.18.2")
44+
45+
compileOnly(project(":products:feature-flagging:bootstrap"))
3246

47+
testImplementation(project(":products:feature-flagging:bootstrap"))
3348
testImplementation(libs.bundles.junit5)
3449
testImplementation(libs.bundles.mockito)
3550
testImplementation(libs.moshi)

0 commit comments

Comments
 (0)