{"repo":"cortinico/ktfmt-gradle","free":true,"listed":false,"github":"https://github.com/cortinico/ktfmt-gradle","clone":"git clone https://github.com/cortinico/ktfmt-gradle.git","description":"A Gradle plugin to apply ktfmt to your builds, and reformat you Kotlin source code like a glimpse 🧹🐘","language":"Kotlin","stars":221,"topics":["kotlin","linter","formatter","kotlin-android","kotlin-gradle","gradle","gradle-plugin","gradle-plugin-kotlin","ktfmt","ktfmt-gradle"],"license":"MIT","category":"dev-tools","readme_excerpt":"ktfmt-gradle 🧹🐘 A wrapper to apply ktfmt to your Gradle builds, and reformat you Kotlin source code like a glimpse. How to use 👣 ktfmt-gradle is distributed through Gradle Plugin Portal. To use it you need to add the following dependency to your gradle files. Please note that those code needs to be added the gradle file of the module where you want to reformat the code ( not the top level build.gradle[.kts] file). If you're using the plugin{} blocks in your Gradle file: If you're instead using the Groovy Gradle files and the old buildscript block: Requirements Please note that ktfmt-gradle relies on ktfmt hence the minimum supported JDK version is 11 . Please also note the following requirements: Android . ktfmt-gradle relies on features from Android Gradle Plugin 4.1+ . So make sure you bump AGP before applying this plugin. Task By default, ktfmt-gradle will add two Gradle tasks to your build: - ktfmtCheck that will check if the code in your module is ktfmt-compliant - ktfmtFormat that will reformat your code with ktfmt Those two tasks will invoke ktfmt on the whole module . More specific tasks are avialable based on the module type. Additionally, the plugin will create check/format tasks for top-level Kotlin script files: - ktfmtCheckScripts that will check if the top-level script files in your module is ktfmt-compliant - ktfmtFormatScripts that will reformat top-level script files with ktfmt Jvm/Js Modules For Jvm/Js modules, the plugin will create a check/format task f","default_branch":null,"files":null,"tree":[],"storefront":"/r/cortinico","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cortinico/ktfmt-gradle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}