Additional default configuration can be applied by adding to the root project's build.gradle
.
All submodules will use this config as default
plugins {
id("com.starter.config") version("x.y.z")
}
commonConfig {
javaVersion JavaVersion.VERSION_11
javaFilesAllowed = true
androidPlugin {
compileSdkVersion 31
minSdkVersion 26
targetSdkVersion 31
}
qualityPlugin {
formatOnCompile = false
}
}
javaVersion
- defines which java version source code is compatible withjavaFilesAllowed
- defines if the project can contain java files, fails the build otherwise.androidPlugin
:- contains values passed to Android Gradle Plugin
qualityPlugin
:formatOnCompile
- defines if ktlint should format source code on every compilation
versioningPlugin
:enabled
- enables/disables Versioning Plugin
It is possible to generate baseline for every quality tool available in the project.
Android Lint
Typerm **/lint-*.xml ; ./gradlew projectLint -PrefreshBaseline --continue
into consoleDetekt
Create baseline using provided configurationktlint
Unfortunately it is not possible to generatektlint
baseline. Proper code style may be achieved by using./gradlew formatKotlin
task.