Skip to content

Commit a74ad9b

Browse files
committed
[change] bump Kotlin to 1.5.31, ktor to 1.6.4, coroutines to 1.5.2
* replace inline with value classes * update gradle to 7.2 * update serialization to 1.3.0 * update datetime to 0.3.0 * update detekt to 1.18.1 * update nexus publishing to 1.1.0 * update ktlint to 10.2.0 * update spotless to 5.15.0
1 parent 3911e23 commit a74ad9b

File tree

11 files changed

+179
-168
lines changed

11 files changed

+179
-168
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
local.properties
55
.run
66
CHANGELOG-TEMPLATE.md
7+
scripts/
8+
Makefile

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Changed
1414
- Fix git url in POM
1515
- Revert Kotlin from 1.5.0-M2 to 1.4.32 for compatibility's sake
16-
- Revert value classes to inline classes
16+
- Revert value classes to inline classes
1717
- Fix markdown formatting in README

build.gradle.kts

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
id("org.jetbrains.kotlin.jvm") version "1.4.32"
5-
kotlin("plugin.serialization") version "1.4.32"
6-
id("io.gitlab.arturbosch.detekt") version "1.16.0"
7-
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
8-
id("org.jlleitschuh.gradle.ktlint-idea").version("9.4.1")
4+
val kotlinVersion = "1.5.31"
5+
id("org.jetbrains.kotlin.jvm") version kotlinVersion
6+
kotlin("plugin.serialization") version kotlinVersion
7+
id("io.gitlab.arturbosch.detekt") version "1.18.1"
8+
id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
9+
id("org.jlleitschuh.gradle.ktlint-idea").version("10.2.0")
910
id("org.jetbrains.dokka") version "1.4.30"
10-
id("com.novoda.static-analysis") version "1.2"
11-
id("com.diffplug.spotless") version "5.7.0"
11+
id("com.diffplug.spotless") version "5.15.0"
1212
// id("com.vanniktech.maven.publish") version "0.13.0"
13-
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
13+
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
1414
signing
1515
`maven-publish`
1616
`java-library`
1717
}
1818

1919
group = "tech.alexib"
20-
version = "0.0.21"
2120

2221
repositories {
2322
mavenCentral()
24-
jcenter {
25-
content {
26-
// Only download the 'kotlinx-html-jvm' module from JCenter, but nothing else.
27-
// detekt needs 'kotlinx-html-jvm' for the HTML report.
28-
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
29-
}
30-
}
23+
// jcenter {
24+
// content {
25+
// // Only download the 'kotlinx-html-jvm' module from JCenter, but nothing else.
26+
// // detekt needs 'kotlinx-html-jvm' for the HTML report.
27+
// includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
28+
// }
29+
// }
3130
}
3231

3332
dependencies {
@@ -37,20 +36,22 @@ dependencies {
3736
implementation(Dependencies.Ktor.clientCore)
3837
implementation(Dependencies.Ktor.serialization)
3938
implementation(Dependencies.Ktor.clientApache)
40-
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.15.0")
39+
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.18.1")
4140
// Use JUnit Jupiter API for testing.
42-
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
41+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
4342

4443
// Use JUnit Jupiter Engine for testing.
45-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
44+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
45+
testImplementation("app.cash.turbine:turbine:0.6.1")
4646
}
4747

4848
ktlint {
4949
debug.set(true)
50-
version.set("0.40.0")
50+
version.set("0.42.1")
5151
verbose.set(true)
5252
android.set(false)
5353
outputToConsole.set(true)
54+
outputColorName.set("BLUE")
5455
ignoreFailures.set(true)
5556
enableExperimentalRules.set(true)
5657
filter {
@@ -89,12 +90,17 @@ tasks {
8990
useJUnitPlatform()
9091
}
9192

92-
withType<KotlinCompile>() {
93+
withType<KotlinCompile>().configureEach {
9394
kotlinOptions {
9495
jvmTarget = "1.8"
95-
freeCompilerArgs = compilerArgs
96-
apiVersion = "1.4"
97-
languageVersion = "1.4"
96+
freeCompilerArgs = freeCompilerArgs + listOf(
97+
"-Xjsr305=strict",
98+
"-Xopt-in=kotlin.Experimental",
99+
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
100+
"-Xjvm-default=enable",
101+
"-Xopt-in=kotlin.time.ExperimentalTime",
102+
"-Xopt-in=io.ktor.utils.io.core.ExperimentalIoApi"
103+
)
98104
}
99105
}
100106
}
@@ -135,11 +141,14 @@ spotless {
135141
target("src/**/*.kt")
136142
targetExclude("$buildDir/**/*.kt")
137143
targetExclude("spotless/copyright.kt")
144+
targetExclude("**/generated/**")
138145
targetExclude("buildSrc/buildSrc/**/*.kt")
139146

140147
licenseHeaderFile {
141148
rootProject.file("spotless/copyright.kt")
142149
}
150+
trimTrailingWhitespace()
151+
endWithNewline()
143152
}
144153
}
145154

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
object Dependencies {
33
object Kotlin {
4-
private const val version = "1.4.32"
4+
private const val version = "1.5.31"
55
private fun item(library: String) = "org.jetbrains.kotlin:kotlin-$library:$version"
66

77
val stdlib = item("stdlib")
@@ -17,14 +17,14 @@ object Dependencies {
1717
object KotlinX {
1818
private fun item(module: String, version: String) = "org.jetbrains.kotlinx:kotlinx-${module}:${version}"
1919

20-
val coroutinesCore = item("coroutines-core", "1.4.3")
21-
val serializationJson = item("serialization-json", "1.1.0-RC")
22-
val datetime = item("datetime", "0.1.1")
20+
val coroutinesCore = item("coroutines-core", "1.5.2")
21+
val serializationJson = item("serialization-json", "1.3.0")
22+
val datetime = item("datetime", "0.3.0")
2323
}
2424

2525

2626
object Ktor {
27-
private const val version = "1.5.2"
27+
private const val version = "1.6.4"
2828
private fun item(library: String) = "io.ktor:ktor-$library:$version"
2929
val clientCore = item("client-core")
3030
val clientApache = item("client-apache")
@@ -36,17 +36,11 @@ object Dependencies {
3636

3737

3838

39-
const val detektVersion = "1.14.2"
40-
const val nexusPublishPluginVersion = "1.0.0"
39+
const val detektVersion = "1.18.1"
40+
const val nexusPublishPluginVersion = "1.1.0"
4141
const val dokkaVersion = "1.4.30"
4242
}
4343

4444

4545

46-
val compilerArgs = listOf(
47-
"-Xjsr305=strict", "-Xuse-experimental=kotlin.Experimental",
48-
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
49-
"-Xinline-classes",
50-
"-Xjvm-default=enable",
51-
"-Xuse-experimental=kotlin.time.ExperimentalTime"
52-
)
46+

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
kotlin.code.style=official
22
GROUP=tech.alexib
3-
VERSION_NAME=0.0.21
3+
VERSION_NAME=0.0.22
4+
version=0.0.22
45
POM_ARTIFACT_ID=plaid-kotlin
56
POM_NAME=plaid-kotlin
67
POM_PACKAGING=jar
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)