|
| 1 | +import com.vanniktech.maven.publish.JavadocJar |
| 2 | +import com.vanniktech.maven.publish.KotlinMultiplatform |
| 3 | + |
| 4 | +plugins { |
| 5 | + id("org.jetbrains.kotlin.multiplatform") |
| 6 | + id("org.jetbrains.kotlinx.binary-compatibility-validator") |
| 7 | + id("org.jlleitschuh.gradle.ktlint") |
| 8 | + id("com.vanniktech.maven.publish") |
| 9 | + id("org.jetbrains.dokka") |
| 10 | +} |
| 11 | + |
| 12 | +// Configure Dokka for documentation |
| 13 | +dokka { |
| 14 | + dokkaPublications.html { |
| 15 | + suppressInheritedMembers.set(true) |
| 16 | + failOnWarning.set(true) |
| 17 | + } |
| 18 | + dokkaSourceSets.commonMain { |
| 19 | + sourceLink { |
| 20 | + localDirectory.set(file("src/")) |
| 21 | + remoteUrl("https://github.com/open-feature/kotlin-sdk/tree/main/kotlin-sdk/src") |
| 22 | + remoteLineSuffix.set("#L") |
| 23 | + } |
| 24 | + } |
| 25 | +} |
| 26 | + |
| 27 | +mavenPublishing { |
| 28 | + configure( |
| 29 | + KotlinMultiplatform( |
| 30 | + javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationHtml"), |
| 31 | + sourcesJar = true, |
| 32 | + androidVariantsToPublish = listOf("release") |
| 33 | + ) |
| 34 | + ) |
| 35 | + signAllPublications() |
| 36 | + coordinates( |
| 37 | + groupId = "dev.openfeature.kotlin.contrib.providers", |
| 38 | + version = findProperty("version").toString() |
| 39 | + ) |
| 40 | + pom { |
| 41 | + url.set("https://openfeature.dev") |
| 42 | + licenses { |
| 43 | + license { |
| 44 | + name.set("The Apache License, Version 2.0") |
| 45 | + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") |
| 46 | + } |
| 47 | + } |
| 48 | + developers { |
| 49 | + developer { |
| 50 | + id.set("vahidlazio") |
| 51 | + name.set("Vahid Torkaman") |
| 52 | + |
| 53 | + } |
| 54 | + developer { |
| 55 | + id.set("fabriziodemaria") |
| 56 | + name.set("Fabrizio Demaria") |
| 57 | + |
| 58 | + } |
| 59 | + developer { |
| 60 | + id.set("nicklasl") |
| 61 | + name.set("Nicklas Lundin") |
| 62 | + |
| 63 | + } |
| 64 | + developer { |
| 65 | + id.set("nickybondarenko") |
| 66 | + name.set("Nicky Bondarenko") |
| 67 | + |
| 68 | + } |
| 69 | + developer { |
| 70 | + id.set("bencehornak") |
| 71 | + name.set("Bence Hornák") |
| 72 | + |
| 73 | + } |
| 74 | + } |
| 75 | + scm { |
| 76 | + connection.set( |
| 77 | + "scm:git:https://github.com/open-feature/kotlin-sdk-contrib.git" |
| 78 | + ) |
| 79 | + developerConnection.set( |
| 80 | + "scm:git:ssh://open-feature/kotlin-sdk-contrib.git" |
| 81 | + ) |
| 82 | + url.set("https://github.com/open-feature/kotlin-sdk-contrib") |
| 83 | + } |
| 84 | + } |
| 85 | +} |
| 86 | + |
0 commit comments