Skip to content

Commit

Permalink
Remove JCenter() from repositories where possible (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandwwraith authored Feb 4, 2021
1 parent 94b09eb commit 6a8dc86
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 19 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
[![TeamCity build](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/KotlinTools_KotlinxSerialization_Ko.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=KotlinTools_KotlinxSerialization_Ko&guest=1)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.serialization.runtime/images/download.svg?version=1.0.1) ](https://bintray.com/kotlin/kotlinx/kotlinx.serialization.runtime/1.0.1)
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.1.0-RC)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.1.0-RC/pom)

Kotlin serialization consists of a compiler plugin, that generates visitor code for serializable classes,
runtime library with core serialization API and support libraries with various serialization formats.
Expand Down Expand Up @@ -105,7 +105,7 @@ Kotlin DSL:

```kotlin
buildscript {
repositories { jcenter() }
repositories { mavenCentral() }

dependencies {
val kotlinVersion = "1.4.10"
Expand All @@ -120,7 +120,7 @@ Groovy DSL:
```gradle
buildscript {
ext.kotlin_version = '1.4.10'
repositories { jcenter() }
repositories { mavenCentral() }
dependencies {
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
Expand All @@ -137,14 +137,14 @@ apply plugin: 'kotlinx-serialization'

#### Dependency on the JSON library

After setting up the plugin one way or another, you have to add a dependency on the serialization library. Note that while the plugin has version the same as the compiler one, runtime library has different coordinates, repository and versioning.
After setting up the plugin one way or another, you have to add a dependency on the serialization library.
Note that while the plugin has version the same as the compiler one, runtime library has different coordinates, repository and versioning.

Kotlin DSL:

```kotlin
repositories {
// Artifacts are also available on Maven Central
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -156,8 +156,7 @@ Groovy DSL:

```gradle
repositories {
// Artifacts are also available on Maven Central
jcenter()
mavenCentral()
}
dependencies {
Expand Down Expand Up @@ -221,8 +220,6 @@ Ensure the proper version of Kotlin and serialization version:
</properties>
```

You can also use JCenter or `https://kotlin.bintray.com/kotlinx` Bintray repository.

Add serialization plugin to Kotlin compiler plugin:

```xml
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To release new `<version>` of `kotlinx.serialization`:
* On 'Changes' tab, select `dev` branch and corresponding commit.
* On 'Parameters' tab, find 'Deploy version' and fill in with `<version>`.

4. In [Sonatype](oss.sonatype.org/#stagingRepositories) admin interface:
4. In [Sonatype](https://oss.sonatype.org/#stagingRepositories) admin interface:
* Close the repository and wait for it to verify.
* Release it.

Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ buildscript {
maven { url 'https://kotlin.bintray.com/kotlinx' }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev' }
jcenter()
mavenCentral()
gradlePluginPortal()
}

Expand Down Expand Up @@ -140,7 +140,7 @@ allprojects {

repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url "https://dl.bintray.com/kotlin/kotlinx" }
// Future replacement for kotlin-dev, with cache redirector
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
Expand All @@ -153,6 +153,7 @@ allprojects {
}
maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev' }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
jcenter() // blocker: https://github.com/valich/intellij-markdown/issues/64
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

repositories {
jcenter()
mavenCentral()
}

kotlinDslPluginOptions {
Expand Down
5 changes: 2 additions & 3 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ After that, you can include this library in arbitrary projects like usual gradle

```gradle
repositories {
jcenter()
mavenLocal()
}
dependencies {
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime"
compile "org.jetbrains.kotlinx:kotlinx-serialization-core:$serialization_version"
}
```

Expand All @@ -32,4 +31,4 @@ To use snapshot version of compiler (if you have built it from sources), use fla

Compiler plugin for Gradle/Maven and IntelliJ plugin, starting from Kotlin 1.3, are embedded into the Kotlin compiler.

Sources and steps to build it are located [here](https://github.com/JetBrains/kotlin/blob/master/plugins/kotlin-serialization/kotlin-serialization-compiler/). In general, you'll just need to run `./gradlew dist install` to get `1.3-SNAPSHOT` versions of Kotlin compiler, stdlib and serialization plugins in the Maven local repository.
Sources and steps to build it are located [here](https://github.com/JetBrains/kotlin/blob/master/plugins/kotlin-serialization/kotlin-serialization-compiler/). In general, you'll just need to run `./gradlew dist install` to get `1.x.255` versions of Kotlin compiler, stdlib and serialization plugins in the Maven local repository.
1 change: 0 additions & 1 deletion integration-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ buildscript {

repositories {
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
}
Expand Down
1 change: 0 additions & 1 deletion integration-test/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pluginManagement {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
Expand Down

0 comments on commit 6a8dc86

Please sign in to comment.