diff --git a/readme.md b/readme.md index ca0ff3c..1e8dc26 100644 --- a/readme.md +++ b/readme.md @@ -6,7 +6,9 @@ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) [![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/) -Current ktlint version: `0.43.2` +Current ktlint version: ~~0.43.2~~ `0.40.0` + +Because `0.43.2` fails on Java 16+: https://github.com/pinterest/ktlint/issues/1195 # Features diff --git a/resources/ktlint b/resources/ktlint index 274adc1..7b05e2b 100755 Binary files a/resources/ktlint and b/resources/ktlint differ diff --git a/src/__exclude/install.ts b/scripts/install.ts similarity index 84% rename from src/__exclude/install.ts rename to scripts/install.ts index 0961a04..08f2d61 100644 --- a/src/__exclude/install.ts +++ b/scripts/install.ts @@ -1,6 +1,6 @@ /* -yarn tsn src/install +yarn tsn ./scripts/install */ @@ -8,7 +8,7 @@ import * as fs from 'fs' import { pipeline } from 'stream' import { promisify } from 'util' import got from 'got' -import { ktlintPath } from './paths' +import { ktlintPath } from '../src/paths' const _pipeline = promisify(pipeline) as any @@ -20,7 +20,11 @@ void (async () => { return } - const ktlintVersion = '0.43.2' + // 0.43.2 sometimes fails with error on Java 16+: + // https://github.com/pinterest/ktlint/issues/1195 + // Hence, reverting to 0.40.0 + // const ktlintVersion = '0.43.2' + const ktlintVersion = '0.40.0' console.log(`downloading ktlint ${ktlintVersion} from github, may take some time...`) const url = `https://github.com/pinterest/ktlint/releases/download/${ktlintVersion}/ktlint`