@@ -3,6 +3,7 @@ plugins {
33 id(" com.android.library" )
44 id(" org.jetbrains.kotlin.android" )
55 id(" maven-publish" )
6+ id(" signing" )
67 id(" org.jlleitschuh.gradle.ktlint" )
78 kotlin(" plugin.serialization" ) version " 1.9.10"
89}
@@ -38,41 +39,82 @@ android {
3839 kotlinOptions {
3940 jvmTarget = JavaVersion .VERSION_11 .toString()
4041 }
41- }
42-
43- dependencies {
44- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3" )
45- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0" )
46- testImplementation(" junit:junit:4.13.2" )
47- testImplementation(" org.mockito.kotlin:mockito-kotlin:5.1.0" )
48- testImplementation(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3" )
49- }
5042
51- afterEvaluate {
5243 publishing {
53- publications {
54- register<MavenPublication >(" release" ) {
55- groupId = " dev.openfeature"
56- artifactId = " kotlin-sdk"
57- version = releaseVersion
44+ singleVariant(" release" ) {
45+ withJavadocJar()
46+ withSourcesJar()
47+ }
48+ }
49+ }
5850
59- from(components[" release" ])
60- artifact(androidSourcesJar.get())
51+ publishing {
52+ publications {
53+ register<MavenPublication >(" release" ) {
54+ groupId = " dev.openfeature"
55+ artifactId = " kotlin-sdk"
56+ version = releaseVersion
6157
62- pom {
63- name.set(" OpenfeatureSDK" )
58+ pom {
59+ name.set(" OpenFeature Android SDK" )
60+ description.set(
61+ " This is the Android implementation of OpenFeature, a vendor-agnostic abstraction library for evaluating feature flags."
62+ )
63+ url.set(" https://openfeature.dev" )
64+ licenses {
65+ license {
66+ name.set(" The Apache License, Version 2.0" )
67+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
68+ }
69+ }
70+ developers {
71+ developer {
72+ id.set(" vahidlazio" )
73+ name.set(" Vahid Torkaman" )
74+ 75+ }
76+ developer {
77+ id.set(" fabriziodemaria" )
78+ name.set(" Fabrizio Demaria" )
79+ 80+ }
81+ developer {
82+ id.set(" nicklasl" )
83+ name.set(" Nicklas Lundin" )
84+ 85+ }
86+ developer {
87+ id.set(" nickybondarenko" )
88+ name.set(" Nicky Bondarenko" )
89+ 90+ }
91+ }
92+ scm {
93+ connection.set(
94+ " scm:git:https://github.com/open-feature/kotlin-sdk.git"
95+ )
96+ developerConnection.set(
97+ " scm:git:ssh://open-feature/kotlin-sdk.git"
98+ )
99+ url.set(" https://github.com/open-feature/kotlin-sdk" )
64100 }
65101 }
102+
103+ afterEvaluate {
104+ from(components[" release" ])
105+ }
66106 }
67107 }
68108}
69109
70- val androidSourcesJar by tasks.registering(Jar ::class ) {
71- archiveClassifier.set(" sources" )
72- from(android.sourceSets.getByName(" main" ).java.srcDirs)
110+ dependencies {
111+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3" )
112+ implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0" )
113+ testImplementation(" junit:junit:4.13.2" )
114+ testImplementation(" org.mockito.kotlin:mockito-kotlin:5.1.0" )
115+ testImplementation(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3" )
73116}
74117
75- // Assembling should be performed before publishing package
76- tasks.named(" publish" ) {
77- dependsOn(" assemble" )
118+ signing {
119+ sign(publishing.publications[" release" ])
78120}
0 commit comments