Skip to content

Commit

Permalink
Add ktlint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuester committed Jan 7, 2024
1 parent 4e04f6e commit 0db65ba
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
6 changes: 6 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 13 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
}

Expand Down Expand Up @@ -38,15 +39,15 @@ android {
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
// signingConfig = signingConfigs.maybeCreate("release")
}
named("debug").configure {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand All @@ -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"
}
}
}
Expand All @@ -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")
Expand All @@ -116,4 +118,8 @@ protobuf {
}
}
}
}
}
ktlint {
android = true
ignoreFailures = false
}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 0db65ba

Please sign in to comment.