Skip to content

Commit f5cfce3

Browse files
authored
Bump Kotlin to 1.6.20 (#1441)
* Bump Kotlin to 1.6.20 * Replace deprecated freeCompilerArg * Simplify CI
1 parent 7487b47 commit f5cfce3

5 files changed

Lines changed: 16 additions & 26 deletions

File tree

.github/workflows/gradle-pr-build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up Java 8
16-
uses: actions/setup-java@v3
15+
- uses: actions/setup-java@v3
1716
with:
1817
distribution: 'zulu'
1918
java-version: 8
19+
- uses: gradle/gradle-build-action@v2
2020
- name: Build with release Kotlin version
21-
uses: gradle/gradle-build-action@v2
22-
with:
23-
arguments: clean build ktlint
21+
run: ./gradlew clean build ktlint
2422
- name: Upload dependency verification report
2523
uses: actions/upload-artifact@v3
2624
if: failure()
@@ -36,6 +34,4 @@ jobs:
3634
path: '**/tests/**/*.html'
3735
if-no-files-found: warn
3836
- name: Build with dev Kotlin version
39-
uses: gradle/gradle-build-action@v2
40-
with:
41-
arguments: -PkotlinDev clean build ktlint
37+
run: ./gradlew -PkotlinDev clean build ktlint

.github/workflows/gradle-snapshot-build.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,22 @@ on:
44
push:
55
branches: [ master ]
66

7+
env:
8+
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
9+
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
1014
if: github.repository == 'pinterest/ktlint'
1115
steps:
1216
- uses: actions/checkout@v3
13-
- name: Set up Java 8
14-
uses: actions/setup-java@v3
17+
- uses: actions/setup-java@v3
1518
with:
1619
distribution: 'zulu'
1720
java-version: 8
21+
- uses: gradle/gradle-build-action@v2
1822
- name: Publish snapshot to Maven
19-
uses: gradle/gradle-build-action@v2
20-
with:
21-
arguments: clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel
22-
env:
23-
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
24-
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
23+
run: ./gradlew clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel
2524
- name: Publish Kotlin-dev snapshot to Maven
26-
uses: gradle/gradle-build-action@v2
27-
with:
28-
arguments: -PkotlinDev clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel
29-
env:
30-
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
31-
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
25+
run: ./gradlew -PkotlinDev clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
99
### Fixed
1010

1111
### Changed
12-
* Set Kotlin development version to `1.6.20-RC2` and Kotlin version to `1.6.10`.
12+
* Set Kotlin development version to `1.6.20` and Kotlin version to `1.6.20`.
1313

1414
### Removed
1515

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ repositories {
1515
// Pass '-PkotlinDev' to command line to enable kotlin-in-development version
1616
val kotlinVersion = if (project.hasProperty("kotlinDev")) {
1717
logger.warn("Enabling kotlin dev version!")
18-
"1.6.20-RC2"
18+
"1.6.20"
1919
} else {
20-
"1.6.10"
20+
"1.6.20"
2121
}
2222

2323
dependencies {

buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tasks
2525
kotlinOptions {
2626
apiVersion = "1.4"
2727
@Suppress("SuspiciousCollectionReassignment")
28-
freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn")
28+
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn")
2929
}
3030
}
3131

0 commit comments

Comments
 (0)