Skip to content

Commit

Permalink
fix main class name for this project, from 'com.github.shyiko.ktlint.…
Browse files Browse the repository at this point in the history
…Main' to 'com.pinterest.ktlint.Main' (pinterest#465)
  • Loading branch information
jaredsburrows authored and shashachu committed Jun 10, 2019
1 parent 62cda3e commit b5f8a08
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- `no-multi-spaces` rule (horizontal alignment of comments is no longer allowed) ([#269](https://github.com/shyiko/ktlint/issues/269)).
- `colon-spacing` rule (`:` must not appear at the beginning of the line).
- `package-name` rule (disabled until [#208](https://github.com/shyiko/ktlint/issues/208) is resolved).
- `--print-ast` to output [com.github.shyiko.ktlint.core.ast.ElementType.*](https://github.com/shyiko/ktlint/blob/master/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/ast/ElementType.kt) as `node.elementType`, e.g.
- `--print-ast` to output [com.pinterest.ktlint.core.ast.ElementType.*](https://github.com/shyiko/ktlint/blob/master/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/ast/ElementType.kt) as `node.elementType`, e.g.
```
$ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin
1: ~.psi.KtFile (FILE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.io.PrintStream
/**
* `ktlint` uses [ServiceLoader](http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) to
* discover all available [ReporterProvider]s on the classpath and so each [ReporterProvider] must be registered using
* `META-INF/services/com.github.shyiko.ktlint.core.ReporterProvider`
* `META-INF/services/com.pinterest.ktlint.core.ReporterProvider`
* (see `ktlint-reporter-plain/src/main/resources` for an example).
*/
interface ReporterProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.pinterest.ktlint.core
/**
* `ktlint` uses [ServiceLoader](http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) to
* discover all available `RuleSetProvider`s on the classpath and so each `RuleSetProvider` must be registered using
* `META-INF/services/com.github.shyiko.ktlint.core.RuleSetProvider`
* `META-INF/services/com.pinterest.ktlint.core.RuleSetProvider`
* (see `ktlint-ruleset-standard/src/main/resources` for an example).
*/
interface RuleSetProvider {
Expand Down
2 changes: 1 addition & 1 deletion ktlint-ruleset-template/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
}

task ktlint(type: JavaExec, dependsOn: classes) {
main = 'com.github.shyiko.ktlint.Main'
main = 'com.pinterest.ktlint.Main'
// adding compiled classes to the classpath so that ktlint would validate project's sources
// using its own ruleset (in other words to dogfood)
classpath = configurations.ktlint + sourceSets.main.output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class NoVarRuleTest : Spek({
describe("no-var rule") {

// whenever KTLINT_DEBUG env variable is set to "ast" or -DktlintDebug=ast is used
// com.github.shyiko.ktlint.test.(lint|format) will print AST (along with other debug info) to the stderr.
// com.pinterest.ktlint.test.(lint|format) will print AST (along with other debug info) to the stderr.
// this can be extremely helpful while writing and testing rules.
// uncomment the line below to take a quick look at it
// System.setProperty("ktlintDebug", "ast")
Expand Down
11 changes: 2 additions & 9 deletions ktlint/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
plugins {
id 'org.jetbrains.kotlin.jvm'
id 'application'
// applied after mainClassName per https://github.com/johnrengelman/shadow/issues/336
id 'com.github.johnrengelman.shadow' version '4.0.2' apply false
}

apply plugin: 'com.github.johnrengelman.shadow'

shadowJar {
mainClassName = 'com.github.shyiko.ktlint.Main'
mergeServiceFiles {
include 'META-INF/services/com.github.shyiko.ktlint.core.*'
}
application {
mainClassName = 'com.pinterest.ktlint.Main'
}

dependencies {
Expand Down

0 comments on commit b5f8a08

Please sign in to comment.