Skip to content

Commit 855d120

Browse files
committed
Merge branch 'develop'
2 parents b1db70b + 45e6cea commit 855d120

File tree

15 files changed

+179
-66
lines changed

15 files changed

+179
-66
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build
22
bin
3-
.idea
3+
.idea/*
44
*.iml
55
.gradle
66
*.swp

.idea/codeStyles/Project.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ to Gradle (in Preferences -> Build, Execution, Deployment -> Build Tools -> Grad
4848
### Updating the public API dump
4949

5050
* Use the [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator/blob/master/README.md) for updates to public API:
51-
* Run `./gradlew apiDump` to update API index files.
51+
* Run `./gradlew updateLegacyAbi` to update API index files.
5252
* Commit the updated API indexes together with other changes.

build-logic/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 JetBrains s.r.o. and respective authors and developers.
2+
* Copyright 2017-2025 JetBrains s.r.o. and respective authors and developers.
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
44
*/
55

@@ -13,6 +13,7 @@ repositories {
1313

1414
dependencies {
1515
implementation(libs.kotlin.gradle.plugin)
16+
implementation(libs.power.assert.plugin)
1617
implementation(libs.dokka.gradle.plugin)
1718
implementation(libs.animalsniffer.gradle.plugin)
1819
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2010-2025 JetBrains s.r.o. and respective authors and developers.
3+
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
4+
*/
5+
6+
import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
7+
8+
plugins {
9+
kotlin("multiplatform")
10+
}
11+
12+
kotlin {
13+
@OptIn(ExperimentalAbiValidation::class)
14+
abiValidation {
15+
enabled = true
16+
}
17+
}
18+
19+
tasks.check {
20+
dependsOn(tasks.checkLegacyAbi)
21+
}

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-multiplatform.gradle.kts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 JetBrains s.r.o. and respective authors and developers.
2+
* Copyright 2017-2025 JetBrains s.r.o. and respective authors and developers.
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
44
*/
55

@@ -13,6 +13,7 @@ import kotlin.jvm.optionals.getOrNull
1313

1414
plugins {
1515
kotlin("multiplatform")
16+
kotlin("plugin.power-assert")
1617
id("kotlinx-io-clean")
1718
}
1819

@@ -125,6 +126,24 @@ kotlin {
125126
}
126127
}
127128

129+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
130+
powerAssert {
131+
// assertFails* are not included as p-a does not help with them yet
132+
val kotlinTestFunctions = listOf(
133+
"assertTrue", "assertFalse",
134+
"assertNull", "assertNotNull",
135+
"assertSame", "assertNotSame",
136+
"assertEquals", "assertNotEquals",
137+
"assertIs", "assertIsNot",
138+
"assertIsOfType", "assertIsNotOfType",
139+
"assertContains",
140+
"assertContentEquals",
141+
"expect"
142+
).map { "kotlin.test.$it"}
143+
144+
functions.addAll(kotlinTestFunctions)
145+
}
146+
128147
fun KotlinSourceSet.configureSourceSet() {
129148
val srcDir = if (name.endsWith("Main")) "src" else "test"
130149
val platform = name.dropLast(4)

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-publish.gradle.kts

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,16 @@ fun MavenPom.configureMavenCentralMetadata(project: Project) {
5555
}
5656
}
5757

58-
fun MavenPublication.mavenCentralArtifacts(project: Project, sources: SourceDirectorySet) {
59-
val sourcesJar by project.tasks.creating(Jar::class) {
60-
archiveClassifier = "sources"
61-
from(sources)
62-
}
63-
val javadocJar by project.tasks.creating(Jar::class) {
64-
archiveClassifier = "javadoc"
65-
// contents are deliberately left empty
66-
}
67-
artifact(sourcesJar)
68-
artifact(javadocJar)
69-
}
7058

71-
72-
fun mavenRepositoryUri(): URI {
73-
val repositoryId: String? = System.getenv("libs.repository.id")
74-
return if (repositoryId == null) {
75-
URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
76-
} else {
77-
URI("https://oss.sonatype.org/service/local/staging/deployByRepositoryId/$repositoryId")
78-
}
79-
}
80-
81-
fun RepositoryHandler.configureMavenPublication( project: Project) {
82-
maven {
83-
url = mavenRepositoryUri()
84-
credentials {
85-
username = project.getSensitiveProperty("libs.sonatype.user")
86-
password = project.getSensitiveProperty("libs.sonatype.password")
59+
fun RepositoryHandler.configureMavenPublication(project: Project) {
60+
val repositoryUrl = project.getSensitiveProperty("libs.repo.url")
61+
if (!repositoryUrl.isNullOrBlank()) {
62+
maven {
63+
url = uri(repositoryUrl)
64+
credentials {
65+
username = project.getSensitiveProperty("libs.repo.user")
66+
password = project.getSensitiveProperty("libs.repo.password")
67+
}
8768
}
8869
}
8970

build.gradle.kts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
*/
55

66
import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
7-
import kotlinx.validation.ExperimentalBCVApi
87

98
plugins {
109
id("kotlinx-io-publish") apply false
1110
id("kotlinx-io-dokka")
12-
1311
alias(libs.plugins.kover)
14-
alias(libs.plugins.bcv)
1512
}
1613

1714
allprojects {
@@ -21,15 +18,6 @@ allprojects {
2118
}
2219
}
2320

24-
@OptIn(ExperimentalBCVApi::class)
25-
apiValidation {
26-
ignoredProjects.addAll(listOf(
27-
"kotlinx-io-benchmarks",
28-
"kotlinx-io-smoke-tests"
29-
))
30-
klib.enabled = true
31-
}
32-
3321
dependencies {
3422
kover(project(":kotlinx-io-core"))
3523
kover(project(":kotlinx-io-bytestring"))

bytestring/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id("kotlinx-io-publish")
44
id("kotlinx-io-dokka")
55
id("kotlinx-io-android-compat")
6+
id("kotlinx-io-compatibility")
67
alias(libs.plugins.kover)
78
}
89

0 commit comments

Comments
 (0)