Skip to content
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
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ plugins {
id("com.android.application").version("8.10.0").apply(false)
id("org.jetbrains.kotlin.multiplatform").version("2.1.21").apply(false)
id("org.jetbrains.kotlin.plugin.compose").version("2.1.0").apply(false)
id("org.jetbrains.dokka").version("2.0.0").apply(false)
id("org.jlleitschuh.gradle.ktlint").version("11.6.1").apply(true)
id("io.github.gradle-nexus.publish-plugin").version("2.0.0").apply(true)
id("org.jetbrains.kotlinx.binary-compatibility-validator").version("0.17.0").apply(false)
id("com.vanniktech.maven.publish").version("0.34.0").apply(false)
}
allprojects {
extra["groupId"] = "dev.openfeature"
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
# Enable the v2 syntax of the Dokka Gradle Plugin
# https://kotlinlang.org/docs/dokka-migration.html
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
125 changes: 68 additions & 57 deletions kotlin-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinMultiplatform
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.multiplatform")
id("org.jetbrains.dokka")
id("maven-publish")
id("signing")
id("org.jlleitschuh.gradle.ktlint")
id("org.jetbrains.kotlinx.binary-compatibility-validator")
id("com.vanniktech.maven.publish")
}

val releaseVersion = project.extra["version"].toString()
Expand All @@ -15,6 +20,8 @@ version = releaseVersion

kotlin {
androidTarget {
publishLibraryVariants("release")

compilations.all {
compileTaskProvider.configure {
compilerOptions {
Expand Down Expand Up @@ -70,71 +77,75 @@ android {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

publishing {
singleVariant("release") {
withJavadocJar()
withSourcesJar()
// Configure Dokka for documentation
dokka {
dokkaPublications.html {
suppressInheritedMembers.set(true)
failOnWarning.set(true)
}
dokkaSourceSets.commonMain {
sourceLink {
localDirectory.set(file("src/"))
remoteUrl("https://github.com/open-feature/kotlin-sdk/tree/main/kotlin-sdk/src")
remoteLineSuffix.set("#L")
}
}
}

publishing {
publications {
register<MavenPublication>("release") {
mavenPublishing {
configure(
KotlinMultiplatform(
javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationHtml"),
sourcesJar = true,
androidVariantsToPublish = listOf("release")
)
)
signAllPublications()

pom {
name.set("OpenFeature Android SDK")
description.set(
"This is the Android implementation of OpenFeature, a vendor-agnostic abstraction library for evaluating feature flags."
)
url.set("https://openfeature.dev")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("vahidlazio")
name.set("Vahid Torkaman")
email.set("vahidt@spotify.com")
}
developer {
id.set("fabriziodemaria")
name.set("Fabrizio Demaria")
email.set("fdema@spotify.com")
}
developer {
id.set("nicklasl")
name.set("Nicklas Lundin")
email.set("nicklasl@spotify.com")
}
developer {
id.set("nickybondarenko")
name.set("Nicky Bondarenko")
email.set("nickyb@spotify.com")
}
}
scm {
connection.set(
"scm:git:https://github.com/open-feature/kotlin-sdk.git"
)
developerConnection.set(
"scm:git:ssh://open-feature/kotlin-sdk.git"
)
url.set("https://github.com/open-feature/kotlin-sdk")
}
pom {
name.set("OpenFeature Kotlin SDK")
description.set(
"This is the Kotlin implementation of OpenFeature, a vendor-agnostic abstraction library for evaluating feature flags."
)
url.set("https://openfeature.dev")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}

afterEvaluate {
from(components["release"])
}
developers {
developer {
id.set("vahidlazio")
name.set("Vahid Torkaman")
email.set("vahidt@spotify.com")
}
developer {
id.set("fabriziodemaria")
name.set("Fabrizio Demaria")
email.set("fdema@spotify.com")
}
developer {
id.set("nicklasl")
name.set("Nicklas Lundin")
email.set("nicklasl@spotify.com")
}
developer {
id.set("nickybondarenko")
name.set("Nicky Bondarenko")
email.set("nickyb@spotify.com")
}
}
scm {
connection.set(
"scm:git:https://github.com/open-feature/kotlin-sdk.git"
)
developerConnection.set(
"scm:git:ssh://open-feature/kotlin-sdk.git"
)
url.set("https://github.com/open-feature/kotlin-sdk")
}
}
}

signing {
sign(publishing.publications["release"])
}
Loading