Skip to content

Commit

Permalink
Merge branch 'master' into filename-pascalcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapchicoma authored Jun 23, 2021
2 parents 3f81397 + 27ea0a1 commit 92598a8
Show file tree
Hide file tree
Showing 29 changed files with 1,358 additions and 52 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/gradle-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Restore Gradle caches
uses: actions/cache@v1
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/caches/files-2.1
~/.gradle/caches/metadata-2.96
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- name: Restore Gradle wrapper
uses: actions/cache@v1
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with release Kotlin version
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/gradle-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Restore Gradle caches
uses: actions/cache@v1
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/caches/files-2.1
~/.gradle/caches/metadata-2.96
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- name: Restore Gradle wrapper
uses: actions/cache@v1
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish snapshot to Maven
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
### Added
- SARIF output support ([#1102](https://github.com/pinterest/ktlint/issues/1102))
### Fixed
- Remove needless blank lines in dot qualified expression ([#1077](https://github.com/pinterest/ktlint/issues/1077))
- Fix false positives for SpacingBetweenDeclarationsWithAnnotationsRule ([#1125](https://github.com/pinterest/ktlint/issues/1125))
- Fix false positive with eol comment (`annotation-spacing`) ([#1124](https://github.com/pinterest/ktlint/issues/1124))
- Fix KtLint dependency variant selection ([#1114](https://github.com/pinterest/ktlint/issues/1114))
### Changed
- Detect FilenameRule is not compliant with PascalCase convention ([#1004](https://github.com/pinterest/ktlint/pull/1117))
- Updated to dokka 1.4.32 ([#1148](https://github.com/pinterest/ktlint/pull/1148))
### Removed

## [0.41.0] - 2021-03-16
Expand Down Expand Up @@ -40,7 +46,7 @@ Thank you to [t-kameyama](https://github.com/t-kameyama) and [paul-dingemans](ht
- Fix experimental:annotation-spacing-rule autocorrection with comments
- Migrate from klob dependency and fix negated globs passed to CLI are no longer worked ([#999](https://github.com/pinterest/ktlint/issues/999))
**Breaking**: absolute paths globs will no longer work, check updated README

### Changed
- Update Gradle shadow plugin to `6.1.0` version
- Align with Kotlin plugin on how alias pattern is represented for imports layout rule ([#753](https://github.com/pinterest/ktlint/issues/753))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ New core rules will be added first to the experimental ruleset before being roll
Project has enabled [Gradle dependencies verification](https://docs.gradle.org/6.2/userguide/dependency_verification.html).
On adding/updating any dependency, ensure that you've added dependency provided checksum/signature to `gradle/verification-metadata.xml` file.

## Using koltin development versions
## Using kotlin development versions

Add following flag - `-PkotlinDev` to enable kotlin development version.

Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.41.0/ktlint &
* (Releases from 0.32.0 on) `curl -sS https://keybase.io/ktlint/pgp_keys.asc | gpg --import && gpg --verify ktlint.asc`

On macOS ([or Linux](http://linuxbrew.sh/)) you can also use [brew](https://brew.sh/) - `brew install ktlint` - or [MacPorts](https://www.macports.org/) - `port install ktlint`.
On Arch Linux, you can install [ktlint](https://aur.archlinux.org/packages/ktlint/) <sup>AUR</sup>.

> If you don't have curl installed - replace `curl -sL` with `wget -qO-`.
Expand Down Expand Up @@ -297,7 +298,11 @@ configurations {
}
dependencies {
ktlint "com.pinterest:ktlint:0.41.0"
ktlint("com.pinterest:ktlint:0.41.0") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
}
}
// additional 3rd party ruleset(s) can be specified here
// just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and
// ktlint will pick them up
Expand Down Expand Up @@ -338,7 +343,11 @@ See [Making your Gradle tasks incremental](https://proandroiddev.com/making-your
val ktlint by configurations.creating

dependencies {
ktlint("com.pinterest:ktlint:0.41.0")
ktlint("com.pinterest:ktlint:0.41.0") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
}
}
// ktlint(project(":custom-ktlint-ruleset")) // in case of custom ruleset
}

Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ext.deps = [
// Testing libraries
'junit' : 'junit:junit:4.13.1',
'assertj' : 'org.assertj:assertj-core:3.12.2',
'sarif4k' : 'io.github.detekt.sarif4k:sarif4k:0.0.1',
'jimfs' : 'com.google.jimfs:jimfs:1.1'
]

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

dependencies {
implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.32")
}
26 changes: 10 additions & 16 deletions buildSrc/src/main/kotlin/ktlint-publication.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gradle.kotlin.dsl.accessors._f23ede02d58ac0a86f9389458f16ca8c.dokkaJavadoc
import java.net.URI
import org.jetbrains.dokka.gradle.DokkaTask

Expand All @@ -8,26 +9,19 @@ plugins {
id("org.jetbrains.dokka")
}

// Disabling dokka on Java 10+ versions
// See https://github.com/Kotlin/dokka/issues/294
val shouldEnableJavadoc = JavaVersion.current() <= JavaVersion.VERSION_1_9

java {
withSourcesJar()
if (shouldEnableJavadoc) withJavadocJar()
withJavadocJar()
}

if (shouldEnableJavadoc) {
val dokkaJavadocTask = tasks.register<DokkaTask>("dokkaJavadoc") {
outputFormat = "javadoc"
outputDirectory = "$buildDir/javadoc"
}
tasks.dokkaJavadoc.configure {
outputDirectory.set(buildDir.resolve("javadoc"))
}

tasks.named<Jar>("javadocJar") {
dependsOn(dokkaJavadocTask)
archiveClassifier.set("javadoc")
from(dokkaJavadocTask)
}
tasks.named<Jar>("javadocJar") {
dependsOn(tasks.dokkaJavadoc)
archiveClassifier.set("javadoc")
from(tasks.dokkaJavadoc)
}

project.version = project.property("VERSION_NAME")
Expand Down Expand Up @@ -98,7 +92,7 @@ publishing {
signing {
// Uncomment following line to use gpg-agent for signing
// See https://docs.gradle.org/current/userguide/signing_plugin.html#sec:using_gpg_agent how to configure it
//useGpgCmd()
// useGpgCmd()

sign(publishing.publications["maven"])
setRequired({
Expand Down
Binary file modified gradle/verification-keyring.gpg
Binary file not shown.
Loading

0 comments on commit 92598a8

Please sign in to comment.