Verified Commit 5d9f7cf7 authored by AtjonTV's avatar AtjonTV

Build: Use ktlint gradle plugin for simplification

* New make task: format (Formats all Kotlin Code)
parent a5eb9049
......@@ -12,7 +12,10 @@ package:
$(GRADLE) sourcesJar
lint:
$(KTLINT) "src/main/**/*.kt" -F
$(GRADLE) $(GRAARG) lintKotlin
format:
$(GRADLE) $(GRAARG) formatKotlin
test:
$(GRADLE) test
......
......@@ -2,6 +2,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version "$shadow_version"
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
id 'org.jetbrains.dokka' version "$dokka_version"
id "org.jmailen.kotlinter" version "$kotlinter_version"
id 'maven-publish'
id 'signing'
}
......
......@@ -8,6 +8,7 @@ kotlin_version=1.3.70
shadow_version=5.2.0
dokka_version=0.10.0
jsonkraken_version=2.0.0
kotlinter_version=2.3.2
# Speedup Compilation
kapt.incremental.apt=true
......
#!/bin/bash
VERSION="0.36.0"
echo $(pwd)
function get_ktlint()
{
curl -SLO https://github.com/pinterest/ktlint/releases/download/$VERSION/ktlint
chmod a+x ktlint
}
if [ ! -e ktlint ]
then
get_ktlint
else
VER=$(./ktlint --version)
if [[ "$VER" != "$VERSION" ]]
then
rm ktlint
get_ktlint
fi
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment