-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Remove Language annotation usage. Fix deprecations (#268)
- Loading branch information
1 parent
0a5d9b1
commit 20961e8
Showing
21 changed files
with
133 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Advanced usage | ||
|
||
### Global configuration | ||
Additional default configuration can be applied by adding to the **root project**'s `build.gradle`. | ||
All submodules will use this config as default | ||
|
||
``` groovy | ||
plugins { | ||
id("com.starter.config") version("x.y.z) | ||
} | ||
commonConfig { | ||
javaVersion JavaVersion.VERSION_1_8 | ||
javaFilesAllowed = true | ||
androidPlugin { | ||
compileSdkVersion 29 | ||
minSdkVersion 23 | ||
targetSdkVersion 29 | ||
} | ||
qualityPlugin { | ||
formatOnCompile = false | ||
} | ||
versioningPlugin { | ||
enabled = true | ||
} | ||
} | ||
``` | ||
|
||
- `javaVersion` - defines which java version source code is compatible with | ||
- `javaFilesAllowed` - 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](..#versioning-plugin) | ||
|
||
### Generating baselines | ||
It is possible to generate baseline for every quality tool available in the project. | ||
- `Android Lint` | ||
Type `rm **/lint-*.xml ; ./gradlew projectLint -PrefreshBaseline --continue` into console | ||
- `Detekt` | ||
Create baseline using [provided configuration](https://github.com/arturbosch/detekt/blob/master/docs/pages/baseline.md) | ||
- `Checkstyle` | ||
Execute `./gradlew generateCheckstyleBaseline` task. | ||
- `ktlint` | ||
Unfortunately it is not possible to generate `ktlint` baseline. | ||
Proper code style may be achieved by using `./gradlew formatKotlin` task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.