diff --git a/.github/workflows/gradle-pr-build.yml b/.github/workflows/gradle-pr-build.yml index f904ff7a43..0a4d015ae7 100644 --- a/.github/workflows/gradle-pr-build.yml +++ b/.github/workflows/gradle-pr-build.yml @@ -12,15 +12,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up Java 8 - uses: actions/setup-java@v3 + - uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: 8 + - uses: gradle/gradle-build-action@v2 - name: Build with release Kotlin version - uses: gradle/gradle-build-action@v2 - with: - arguments: clean build ktlint + run: ./gradlew clean build ktlint - name: Upload dependency verification report uses: actions/upload-artifact@v3 if: failure() @@ -36,6 +34,4 @@ jobs: path: '**/tests/**/*.html' if-no-files-found: warn - name: Build with dev Kotlin version - uses: gradle/gradle-build-action@v2 - with: - arguments: -PkotlinDev clean build ktlint + run: ./gradlew -PkotlinDev clean build ktlint diff --git a/.github/workflows/gradle-snapshot-build.yml b/.github/workflows/gradle-snapshot-build.yml index c3a16ec92e..48c52f7326 100644 --- a/.github/workflows/gradle-snapshot-build.yml +++ b/.github/workflows/gradle-snapshot-build.yml @@ -4,28 +4,22 @@ on: push: branches: [ master ] +env: + SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + jobs: publish: runs-on: ubuntu-latest if: github.repository == 'pinterest/ktlint' steps: - uses: actions/checkout@v3 - - name: Set up Java 8 - uses: actions/setup-java@v3 + - uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: 8 + - uses: gradle/gradle-build-action@v2 - name: Publish snapshot to Maven - uses: gradle/gradle-build-action@v2 - with: - arguments: clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel - env: - SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + run: ./gradlew clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel - name: Publish Kotlin-dev snapshot to Maven - uses: gradle/gradle-build-action@v2 - with: - arguments: -PkotlinDev clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel - env: - SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + run: ./gradlew -PkotlinDev clean publishMavenPublicationToMavenCentralRepository --no-daemon --no-parallel diff --git a/CHANGELOG.md b/CHANGELOG.md index 9050755a06..6036491af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed ### Changed -* Set Kotlin development version to `1.6.20-RC2` and Kotlin version to `1.6.10`. +* Set Kotlin development version to `1.6.20` and Kotlin version to `1.6.20`. ### Removed diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index c025d78024..2f3faa551c 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -15,9 +15,9 @@ repositories { // Pass '-PkotlinDev' to command line to enable kotlin-in-development version val kotlinVersion = if (project.hasProperty("kotlinDev")) { logger.warn("Enabling kotlin dev version!") - "1.6.20-RC2" + "1.6.20" } else { - "1.6.10" + "1.6.20" } dependencies { diff --git a/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts b/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts index 5e32163ec1..29897dc690 100644 --- a/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts +++ b/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts @@ -25,7 +25,7 @@ tasks kotlinOptions { apiVersion = "1.4" @Suppress("SuspiciousCollectionReassignment") - freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn") + freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn") } }