diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d0c020eb..07ab24a9 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,5 +1,11 @@ # Developing Unlauncher +## Kotlin Linting/Formatting + +This project uses [ktlint](https://pinterest.github.io/ktlint/latest/) to format/lint the Kotlin code to ensure consistency of style across the codebase. + +Developers using Android Studio are encouraged to install the [Ktlint plugin](https://plugins.jetbrains.com/plugin/15057-ktlint) for a tighter feedback look and more automation. + ## Adding a new configuration preference Currently user preferences in the Unlauncher code base are stored in one of three different ways: diff --git a/README.md b/README.md index 56a18871..a3984b27 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,10 @@ Linux Lounge - [A Quick Look At Unlauncher - Can This Launcher Help With Smartph ## Project History -This project is a downstream fork of the great [Slim Launcher](https://github.com/sduduzog/slim-launcher) by [sduduzog](https://github.com/sduduzog). The contributors to that project deserve all the credit for the beautiful layout of this app and most of its functionality. +This project is a fork of the great [Slim Launcher](https://github.com/sduduzog/slim-launcher) by [sduduzog](https://github.com/sduduzog). The contributors to that project deserve all the credit for the beautiful layout of this app! The main differentiator between Unlauncher and Slim Launcher lies in the number of apps the launcher gives you access too. Slim Launcher takes the Spartan approach of only allowing access to seven apps. Unlauncher, on the other hand, allows you to pin up to six apps on the home screen and then gives you access to all the rest of your apps by swiping up into a searchable app drawer. -The goal of this project is continue to remain synchronized, where possible, with Slim Launcher and to submit any new contributions back upstream (if they align with the design philosophy and goals of Slim Launcher). - ## Communication If you have any issues or questions, please log a [Github issue](https://github.com/jkuester/unlauncher/issues) for this repository. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 848352f1..f09543f4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,10 +1,11 @@ -import com.google.protobuf.gradle.* +import com.google.protobuf.gradle.id plugins { id("com.android.application") id("dagger.hilt.android.plugin") id("com.google.devtools.ksp") id("com.google.protobuf") + id("org.jlleitschuh.gradle.ktlint") kotlin("android") } @@ -38,7 +39,7 @@ android { isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) // signingConfig = signingConfigs.maybeCreate("release") } @@ -46,7 +47,7 @@ android { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) } } @@ -68,9 +69,10 @@ android { checkDependencies = false } namespace = "com.sduduzog.slimlauncher" - applicationVariants.all{ + applicationVariants.all { outputs.all { - (this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName = "${applicationId}.apk" + (this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName = + "$applicationId.apk" } } } @@ -96,7 +98,7 @@ dependencies { implementation("androidx.room:room-runtime:2.6.1") ksp("androidx.room:room-compiler:2.6.1") - //3rd party libs + // 3rd party libs implementation("com.intuit.sdp:sdp-android:1.0.6") implementation("com.intuit.ssp:ssp-android:1.0.6") implementation("com.google.dagger:hilt-android:2.50") @@ -116,4 +118,8 @@ protobuf { } } } -} \ No newline at end of file +} +ktlint { + android = true + ignoreFailures = false +} diff --git a/build.gradle.kts b/build.gradle.kts index c619aa37..a501199b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,4 +29,5 @@ tasks.register("clean", Delete::class) { plugins { id("com.google.devtools.ksp") version "1.9.22-1.0.16" apply false // This needs to match kotlin-stdlib id("com.google.protobuf") version "0.9.4" apply false + id("org.jlleitschuh.gradle.ktlint") version "12.0.3" }