Skip to content

Commit 347feed

Browse files
authored
Remove dev repositories and Bintray usages where applicable (#2587)
* Remove dev repositories and Bintray usages where applicable * Update our frontend example * Update lincheck * Temporary ignore MutexLincheckTest.modelCheckingTest
1 parent 44ebdef commit 347feed

File tree

9 files changed

+24
-56
lines changed

9 files changed

+24
-56
lines changed

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ suspend fun main() = coroutineScope {
7575

7676
## Using in your projects
7777

78-
The libraries are published to [kotlinx](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines) bintray repository,
79-
linked to [JCenter](https://bintray.com/bintray/jcenter?filterByPkgName=kotlinx.coroutines) and
80-
pushed to [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.jetbrains.kotlinx%20a%3Akotlinx-coroutines*).
81-
8278
### Maven
8379

8480
Add dependencies (you can also add other modules that you need):

build.gradle

+3-14
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,8 @@ buildscript {
5353
}
5454

5555
repositories {
56-
maven {url "https://kotlin.bintray.com/kotlinx"}
57-
// Future replacement for kotlin-dev, with cache redirector
58-
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
59-
maven {
60-
url "https://kotlin.bintray.com/kotlin-dev"
61-
credentials {
62-
username = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') ?: ""
63-
password = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') ?: ""
64-
}
65-
}
56+
// Leftover until we migrated to Dokka 1.4.30
57+
maven { url "https://kotlin.bintray.com/kotlin-dev" }
6658
maven { url "https://jetbrains.bintray.com/kotlin-native-dependencies" }
6759
maven { url "https://plugins.gradle.org/m2/" }
6860
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
@@ -151,9 +143,6 @@ allprojects {
151143
*/
152144
google()
153145
mavenCentral()
154-
// Future replacement for kotlin-dev, with cache redirector
155-
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
156-
maven { url "https://kotlin.bintray.com/kotlinx" }
157146
}
158147
}
159148

@@ -244,7 +233,7 @@ configure(subprojects.findAll { !unpublished.contains(it.name) }) {
244233
if (it.name != 'kotlinx-coroutines-bom') {
245234
apply from: rootProject.file('gradle/dokka.gradle')
246235
}
247-
apply from: rootProject.file('gradle/publish-bintray.gradle')
236+
apply from: rootProject.file('gradle/publish.gradle')
248237
}
249238

250239
configure(subprojects.findAll { !unpublished.contains(it.name) }) {

buildSrc/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ repositories {
1717
maven("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-dev")
1818
} else {
1919
maven("https://plugins.gradle.org/m2")
20+
// Leftover until we migrated to Dokka 1.4.30
2021
maven("https://dl.bintray.com/kotlin/kotlin-dev")
2122
}
2223
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev")

buildSrc/src/main/kotlin/Publishing.kt

-14
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,6 @@ fun configureMavenPublication(rh: RepositoryHandler, project: Project) {
6262
}
6363
}
6464

65-
fun configureBintrayPublication(rh: RepositoryHandler, project: Project) {
66-
rh.maven {
67-
val user = "kotlin"
68-
val repo = "kotlinx"
69-
val name = "kotlinx.coroutines"
70-
url = URI("https://api.bintray.com/maven/$user/$repo/$name/;publish=0;override=0")
71-
72-
credentials {
73-
username = project.findProperty("bintrayUser") as? String ?: System.getenv("BINTRAY_USER")
74-
password = project.findProperty("bintrayApiKey") as? String ?: System.getenv("BINTRAY_API_KEY")
75-
}
76-
}
77-
}
78-
7965
fun signPublicationIfKeyPresent(project: Project, publication: MavenPublication) {
8066
val keyId = project.getSensitiveProperty("libs.sign.key.id")
8167
val signingKey = project.getSensitiveProperty("libs.sign.key.private")

gradle.properties

+2-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ kotlin_version=1.5.0-RC
1111
junit_version=4.12
1212
atomicfu_version=0.15.2
1313
knit_version=0.2.3
14-
html_version=0.6.8
15-
lincheck_version=2.10
14+
html_version=0.7.2
15+
lincheck_version=2.12
1616
dokka_version=0.9.16-rdev-2-mpp-hacks
1717
byte_buddy_version=1.10.9
1818
reactor_version=3.4.1
@@ -54,10 +54,4 @@ jekyll_version=4.0
5454
# TODO: Remove once KT-37187 is fixed
5555
org.gradle.jvmargs=-Xmx2g
5656

57-
# Workaround for Bintray treating .sha512 files as artifacts
58-
# https://github.com/gradle/gradle/issues/1.4.3
59-
systemProp.org.gradle.internal.publish.checksums.insecure=true
60-
61-
# todo:KLUDGE: This is commented out, and the property is set conditionally in build.gradle, because IDEA doesn't work with it.
62-
#kotlin.mpp.enableGranularSourceSetsMetadata=true
6357
kotlin.mpp.enableCompatibilityMetadataVariant=true

gradle/publish-bintray.gradle renamed to gradle/publish.gradle

+3-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import org.gradle.util.VersionNumber
66

7-
// Configures publishing of Maven artifacts to Bintray
7+
// Configures publishing of Maven artifacts to Maven Central
88

99
apply plugin: 'maven'
1010
apply plugin: 'maven-publish'
@@ -37,12 +37,7 @@ if (!isMultiplatform && !isBom) {
3737

3838
publishing {
3939
repositories {
40-
def bintrayUpload = System.getenv("libs.bintray.upload") != null
41-
if (bintrayUpload) {
42-
PublishingKt.configureBintrayPublication(delegate, project)
43-
} else {
44-
PublishingKt.configureMavenPublication(delegate, project)
45-
}
40+
PublishingKt.configureMavenPublication(delegate, project)
4641
}
4742

4843
if (!isMultiplatform && !isBom) {
@@ -61,10 +56,7 @@ publishing {
6156

6257
publications.all {
6358
PublishingKt.configureMavenCentralMetadata(pom, project)
64-
def bintrayUpload = System.getenv("libs.bintray.upload") != null
65-
if (!bintrayUpload) {
66-
PublishingKt.signPublicationIfKeyPresent(project, it)
67-
}
59+
PublishingKt.signPublicationIfKeyPresent(project, it)
6860
// add empty javadocs
6961
if (!isBom && it.name != "kotlinMultiplatform") {
7062
it.artifact(javadocJar)

js/example-frontend-js/build.gradle.kts

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ kotlin {
2121
}
2222
}
2323

24+
// For kotlinx-html
25+
repositories {
26+
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
27+
}
28+
2429
dependencies {
2530
implementation("org.jetbrains.kotlinx:kotlinx-html-js:${version("html")}")
2631
implementation(devNpm("html-webpack-plugin", "5.3.1"))

kotlinx-coroutines-core/jvm/test/AbstractLincheckTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44
package kotlinx.coroutines
55

@@ -15,7 +15,7 @@ abstract class AbstractLincheckTest : VerifierState() {
1515
open fun StressOptions.customize(isStressTest: Boolean): StressOptions = this
1616

1717
@Test
18-
fun modelCheckingTest() = ModelCheckingOptions()
18+
open fun modelCheckingTest() = ModelCheckingOptions()
1919
.iterations(if (isStressTest) 100 else 20)
2020
.invocationsPerIteration(if (isStressTest) 10_000 else 1_000)
2121
.commonConfiguration()
@@ -38,4 +38,4 @@ abstract class AbstractLincheckTest : VerifierState() {
3838
.customize(isStressTest)
3939

4040
override fun extractState(): Any = error("Not implemented")
41-
}
41+
}

kotlinx-coroutines-core/jvm/test/lincheck/MutexLincheckTest.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44
@file:Suppress("unused")
55
package kotlinx.coroutines.lincheck
@@ -9,10 +9,15 @@ import kotlinx.coroutines.sync.*
99
import org.jetbrains.kotlinx.lincheck.*
1010
import org.jetbrains.kotlinx.lincheck.annotations.Operation
1111
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.*
12+
import org.junit.*
1213

1314
class MutexLincheckTest : AbstractLincheckTest() {
1415
private val mutex = Mutex()
1516

17+
override fun modelCheckingTest() {
18+
// Ignored via empty body as the only way
19+
}
20+
1621
@Operation
1722
fun tryLock() = mutex.tryLock()
1823

@@ -29,4 +34,4 @@ class MutexLincheckTest : AbstractLincheckTest() {
2934
checkObstructionFreedom()
3035

3136
override fun extractState() = mutex.isLocked
32-
}
37+
}

0 commit comments

Comments
 (0)