Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/refactoring #48

Open
wants to merge 12 commits into
base: baseproject
Choose a base branch
from
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.{kt,kts}]
twitter_compose_allowed_composition_locals = LocalPraxisCloneColor
14 changes: 7 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ dependencies {
Lib.Google.list.forEach(::api)
Lib.Kotlin.list.forEach(::api)

api(project(":ui-onboarding"))
api(project(":ui-authentication"))
api(project(":navigator"))
api(project(":data"))
api(project(":domain"))
api(project(":common"))
api(project(":commonui"))
api(project(":feature:ui-onboarding"))
api(project(":feature:ui-authentication"))
api(project(":core:navigator"))
api(project(":core:data"))
api(project(":core:domain"))
api(project(":core:common"))
api(project(":feature:commonui"))

/*DI*/
api(Lib.Di.hilt)
Expand Down
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id(BuildPlugins.KOTLINTER) version BuildPlugins.KOTLINTER_PLUGIN_VERSION apply true
}

buildscript {
repositories {
Expand All @@ -13,11 +16,16 @@ buildscript {
classpath(kotlin("serialization", version = Lib.Kotlin.KOTLIN_VERSION))
classpath(BuildPlugins.KTLINT_GRADLE_PLUGIN)
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
classpath(BuildPlugins.TWITTER_COMPOSE_RULES)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

subprojects {
apply(plugin = BuildPlugins.KOTLINTER)
}

allprojects {
repositories {
google()
Expand All @@ -35,4 +43,16 @@ apply(from = teamPropsFile("git-hooks.gradle.kts"))
fun teamPropsFile(propsFile: String): File {
val teamPropsDir = file("team-props")
return File(teamPropsDir, propsFile)
}

tasks.register("check").configure {
dependsOn("installKotlinterPrePushHook")
}

kotlinter {
ignoreFailures = false
reporters = arrayOf("checkstyle", "html", "plain")
experimentalRules = true
disabledRules = emptyArray()
// disabledRules = arrayOf("experimental:argument-list-wrapping", "no-wildcard-imports")
Ruthvikbr-MM marked this conversation as resolved.
Show resolved Hide resolved
}
6 changes: 5 additions & 1 deletion buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

object BuildPlugins {
private const val TOOLS_BUILD = "7.1.1"
private const val KT_LINT = "9.2.1"
private const val SAFE_ARGS = "2.3.5"
private const val KT_LINT = "11.0.0"
private const val TWITTER_COMPOSE_RULES_VER = "0.0.22"
const val KOTLINTER_PLUGIN_VERSION = "3.12.0"

const val TOOLS_BUILD_GRADLE = "com.android.tools.build:gradle:${TOOLS_BUILD}"
const val KTLINT_GRADLE_PLUGIN = "org.jlleitschuh.gradle:ktlint-gradle:${KT_LINT}"
Expand All @@ -19,6 +21,8 @@ object BuildPlugins {
const val DAGGER_HILT = "dagger.hilt.android.plugin"
const val ktLint = "org.jlleitschuh.gradle.ktlint"
const val SAFE_ARGS_KOTLIN = "androidx.navigation.safeargs.kotlin"
const val TWITTER_COMPOSE_RULES = "com.twitter.compose.rules:ktlint:$TWITTER_COMPOSE_RULES_VER"
const val KOTLINTER = "org.jmailen.kotlinter"
}

object Lib {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions data/build.gradle.kts → core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ kapt {
}

dependencies {
implementation(project(":common"))
implementation(project(":domain"))
implementation(project(":core:common"))
implementation(project(":core:domain"))

Lib.Kotlin.list.forEach(::implementation)
Lib.Networking.ktorList.forEach(::implementation)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.mutualmobile.praxis.navigator

import androidx.navigation.NamedNavArgument
import androidx.navigation.NavType
import androidx.navigation.navArgument

sealed class PraxisScreen(
val route: String,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ kapt {

dependencies {
/*Kotlin*/
implementation(project(":data"))
implementation(project(":domain"))
implementation(project(":common"))
implementation(project(":navigator"))
implementation(project(":commonui"))
implementation(project(":core:data"))
implementation(project(":core:domain"))
implementation(project(":core:common"))
implementation(project(":core:navigator"))
implementation(project(":feature:commonui"))



Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ dependencies {


/*Kotlin*/
implementation(project(":data"))
implementation(project(":domain"))
implementation(project(":common"))
implementation(project(":navigator"))
implementation(project(":commonui"))
implementation(project(":core:data"))
implementation(project(":core:domain"))
implementation(project(":core:common"))
implementation(project(":core:navigator"))
implementation(project(":feature:commonui"))


Lib.Androidx.list.forEach(::implementation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import com.mutualmobile.praxis.commonui.theme.PraxisColorProvider
import com.mutualmobile.praxis.commonui.theme.PraxisTypography
import com.mutualmobile.praxis.navigator.ComposeNavigator
import com.mutualmobile.praxis.navigator.PraxisRoute
import com.mutualmobile.praxis.navigator.PraxisScreen

@Composable
fun CommonInputUI(
Expand Down
14 changes: 7 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
include(":app")

// Feature modules
include(":ui-onboarding")
include(":ui-authentication")
include(":feature:ui-onboarding")
include(":feature:ui-authentication")
include(":feature:commonui")

// Other modules
include(":domain")
include(":data")
include(":common")
include(":commonui")
include(":navigator")
include(":core:domain")
include(":core:data")
include(":core:common")
include(":core:navigator")