1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 12:02:33 +01:00

Add spotless

This commit is contained in:
Allan Wang 2023-06-17 21:53:56 -07:00
parent 48339b8a15
commit 20c4545874
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56
7 changed files with 34 additions and 11 deletions

View File

@ -6,6 +6,8 @@ plugins {
id "com.google.devtools.ksp"
}
apply from: '../spotless.gradle'
android {
compileSdk 33

View File

@ -1,5 +1,5 @@
/*
* Copyright 2018 Allan Wang
* Copyright 2023 Allan Wang
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -19,11 +19,8 @@ package com.pitchedapps.frost
import android.app.Activity
import android.app.Application
import android.os.Bundle
import android.util.Log
import com.google.common.flogger.FluentLogger
import dagger.hilt.android.HiltAndroidApp
import java.util.Random
import javax.inject.Inject
@HiltAndroidApp
class FrostApp : Application() {
@ -35,7 +32,9 @@ class FrostApp : Application() {
registerActivityLifecycleCallbacks(
object : ActivityLifecycleCallbacks {
override fun onActivityPaused(activity: Activity) {}
override fun onActivityResumed(activity: Activity) {}
override fun onActivityStarted(activity: Activity) {}
override fun onActivityDestroyed(activity: Activity) {

View File

@ -1,8 +1,22 @@
/*
* Copyright 2023 Allan Wang
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.pitchedapps.frost
import androidx.appcompat.app.AppCompatActivity
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class StartActivity : AppCompatActivity() {
}
@AndroidEntryPoint class StartActivity : AppCompatActivity() {}

View File

@ -11,6 +11,7 @@ plugins {
id 'org.jetbrains.kotlin.android' version '1.8.21' apply false
// https://mvnrepository.com/artifact/com.google.devtools.ksp/com.google.devtools.ksp.gradle.plugin
id 'com.google.devtools.ksp' version '1.8.21-1.0.11' apply false
id 'com.diffplug.spotless' version '6.19.0' apply false
}
tasks.register('clean', Delete) {

View File

@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@ -19,4 +19,11 @@ APP_GROUP=com.pitchedapps
KAU=00595a89
android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -3,7 +3,7 @@ apply plugin: "com.diffplug.spotless"
spotless {
kotlin {
target "**/*.kt"
ktfmt(kau.Versions.ktfmt).googleStyle()
ktfmt().googleStyle()
licenseHeaderFile '../spotless.license.kt'
trimTrailingWhitespace()
endWithNewline()