Skip to content

Commit 4b2ba6f

Browse files
committed
Merge remote-tracking branch 'origin/main' into ofrep-provider
Signed-off-by: Bence Hornák <[email protected]>
2 parents b1db377 + fbe9b7d commit 4b2ba6f

File tree

16 files changed

+512
-270
lines changed

16 files changed

+512
-270
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
- name: Run checks
1818
run: ./gradlew check --no-daemon --stacktrace

.github/workflows/lint-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Validate PR title
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: amannn/action-semantic-pull-request@v5
15+
- uses: amannn/action-semantic-pull-request@v6
1616
id: lint_pr_title
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
plugins {
2-
alias(libs.plugins.kotlin.multiplatform) apply false
3-
alias(libs.plugins.android.library) apply false
42
alias(libs.plugins.nexus.publish)
5-
alias(libs.plugins.ktlint) apply false
6-
alias(libs.plugins.binary.compatibility.validator) apply false
73
}
84

95
allprojects {
@@ -13,13 +9,6 @@ allprojects {
139
group = project.extra["groupId"].toString()
1410
version = project.extra["version"].toString()
1511

16-
subprojects {
17-
plugins.withId("org.jetbrains.kotlin.multiplatform") {
18-
apply(plugin = "org.jlleitschuh.gradle.ktlint")
19-
apply(plugin = "org.jetbrains.kotlinx.binary-compatibility-validator")
20-
}
21-
}
22-
2312
nexusPublishing {
2413
this.repositories {
2514
sonatype {

buildSrc/build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
dependencies {
6+
implementation(plugin(libs.plugins.binary.compatibility.validator))
7+
implementation(plugin(libs.plugins.ktlint))
8+
implementation(plugin(libs.plugins.kotlin.multiplatform))
9+
implementation(plugin(libs.plugins.dokka))
10+
implementation(plugin(libs.plugins.vanniktech.maven.publish))
11+
implementation(plugin(libs.plugins.android.library))
12+
}
13+
14+
/**
15+
* Helper function that transforms a Gradle Plugin alias from a Version Catalog into a valid
16+
* dependency notation for buildSrc. Taken from
17+
* https://docs.gradle.org/current/userguide/version_catalogs.html#sec:buildsrc-version-catalog
18+
*/
19+
private fun DependencyHandlerScope.plugin(plugin: Provider<PluginDependency>) =
20+
plugin.map { "${it.pluginId}:${it.pluginId}.gradle.plugin:${it.version}" }

buildSrc/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Enable the v2 syntax of the Dokka Gradle Plugin
2+
# https://kotlinlang.org/docs/dokka-migration.html
3+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
4+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

buildSrc/settings.gradle.kts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
9+
dependencyResolutionManagement {
10+
repositories {
11+
google()
12+
mavenLocal()
13+
mavenCentral()
14+
gradlePluginPortal()
15+
}
16+
17+
versionCatalogs {
18+
create("libs") {
19+
from(files("../gradle/libs.versions.toml"))
20+
}
21+
}
22+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
email.set("[email protected]")
53+
}
54+
developer {
55+
id.set("fabriziodemaria")
56+
name.set("Fabrizio Demaria")
57+
email.set("[email protected]")
58+
}
59+
developer {
60+
id.set("nicklasl")
61+
name.set("Nicklas Lundin")
62+
email.set("[email protected]")
63+
}
64+
developer {
65+
id.set("nickybondarenko")
66+
name.set("Nicky Bondarenko")
67+
email.set("[email protected]")
68+
}
69+
developer {
70+
id.set("bencehornak")
71+
name.set("Bence Hornák")
72+
email.set("[email protected]")
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+

gradle.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
version=0.1.0
12
org.gradle.configuration-cache=true
23
org.gradle.jvmargs=-Xmx1g "-XX:MaxMetaspaceSize=768m
34

45
# This seems to be necessary for Coroutines to work on JS. Otherwise getting the following error:
56
# > Task :providers:env-var:compileTestDevelopmentExecutableKotlinJs FAILED
67
# e: java.lang.IllegalStateException: IC internal error: can not find library org.jetbrains.kotlin:kotlinx-atomicfu-runtime
7-
kotlinx.atomicfu.enableJsIrTransformation=true
8+
kotlinx.atomicfu.enableJsIrTransformation=true
9+
10+
# Enable the v2 syntax of the Dokka Gradle Plugin
11+
# https://kotlinlang.org/docs/dokka-migration.html
12+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
13+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

gradle/libs.versions.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
2-
kotlin = "2.1.21"
2+
kotlin = "2.2.10"
33
kotlinx-coroutines = "1.10.2"
4-
open-feature-kotlin-sdk = "0.5.0"
4+
open-feature-kotlin-sdk = "0.6.2"
55
android = "8.10.1"
66
ktor = "3.1.3"
77

@@ -17,10 +17,12 @@ kotlinx-coroutines-core = { group="org.jetbrains.kotlinx", name="kotlinx-corouti
1717
kotlinx-coroutines-test = { group="org.jetbrains.kotlinx", name="kotlinx-coroutines-test", version.ref="kotlinx-coroutines" }
1818

1919
[plugins]
20+
dokka = { id="org.jetbrains.dokka", version="2.0.0" }
2021
kotlin-multiplatform = { id="org.jetbrains.kotlin.multiplatform", version.ref="kotlin" }
2122
kotlinx-atomicfu = { id="org.jetbrains.kotlinx.atomicfu", version="0.27.0" }
2223
kotlinx-serialization = { id="org.jetbrains.kotlin.plugin.serialization", version="2.1.21" }
23-
ktlint = { id="org.jlleitschuh.gradle.ktlint", version="12.3.0" }
24+
ktlint = { id="org.jlleitschuh.gradle.ktlint", version="13.1.0" }
2425
nexus-publish = { id="io.github.gradle-nexus.publish-plugin", version="2.0.0" }
25-
binary-compatibility-validator = { id="org.jetbrains.kotlinx.binary-compatibility-validator", version="0.17.0" }
26+
binary-compatibility-validator = { id="org.jetbrains.kotlinx.binary-compatibility-validator", version="0.18.1" }
27+
vanniktech-maven-publish = { id="com.vanniktech.maven.publish", version="0.34.0" }
2628
android-library = { id="com.android.library", version.ref="android" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)