Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit a4e3c21

Browse files
Mikhail VorozhtsovMikhail Vorozhtsov
authored andcommitted
Merge branch 'release/sprint-4-5' into prod
2 parents b34e068 + adf4c75 commit a4e3c21

File tree

81 files changed

+1831
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1831
-42
lines changed

.detekt/detekt-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ complexity:
124124
threshold: 600
125125
LongMethod:
126126
active: true
127-
threshold: 60
127+
threshold: 600
128128
LongParameterList:
129129
active: true
130-
functionThreshold: 6
130+
functionThreshold: 10
131131
constructorThreshold: 7
132132
ignoreDefaultParameters: false
133133
ignoreDataClasses: true

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ plugins {
66
id("io.gitlab.arturbosch.detekt") version Dependencies.Plugins.DETEKT_VERSION
77
}
88

9+
buildscript {
10+
dependencies {
11+
Dependencies.Firebase.ALL_GRADLE_PLUGINS.forEach {
12+
classpath(it)
13+
}
14+
}
15+
}
16+
917
tasks {
1018
val detektAll by registering(io.gitlab.arturbosch.detekt.Detekt::class) {
1119
parallel = true

buildSrc/src/main/kotlin/consts/Dependencies.kt

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ object Dependencies {
8686
val ALL_RXJAVA_DEPS = listOf(RX_JAVA)
8787
}
8888

89+
object UiTest {
90+
91+
// add to build.gradle with androidTestImplementation()
92+
const val UI_TEST = "androidx.compose.ui:ui-test-junit4:$COMPOSE_VERSION"
93+
94+
// add to build.gradle with debugImplementation
95+
const val UI_TEST_DEBUG = "androidx.compose.ui:ui-test-manifest:$COMPOSE_VERSION"
96+
}
97+
8998
val ALL_DEPS =
9099
Core.ALL_CORE_DEPS + Lifecycle.ALL_LIFECYCLE_DEPS + Foundation.ALL_FOUNDATION_DEPS +
91100
RxJava.ALL_RXJAVA_DEPS + Navigation.ALL_NAVIGATION_DEPS
@@ -108,12 +117,25 @@ object Dependencies {
108117
}
109118

110119
object Retrofit {
111-
private const val VERSION = "2.9.0"
120+
private const val RETROFIT_VERSION = "2.9.0"
121+
private const val XMLRPC_VERSION = "1.2"
122+
123+
const val CONVERTER_GSON = "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
124+
const val RETROFIT_DEPENDENCY = "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
125+
const val RETROFIT_XMLRPC = "com.github.erickok:retrofit-xmlrpc:$XMLRPC_VERSION"
126+
const val RX_ADAPTER = "com.squareup.retrofit2:adapter-rxjava3:$RETROFIT_VERSION"
127+
128+
val ALL_DEPS = listOf(CONVERTER_GSON, RETROFIT_DEPENDENCY, RETROFIT_XMLRPC, RX_ADAPTER)
129+
}
112130

113-
const val CONVERTER_GSON = "com.squareup.retrofit2:converter-gson:$VERSION"
114-
const val RETROFIT_DEPENDENCY = "com.squareup.retrofit2:retrofit:$VERSION"
131+
object RxJava {
132+
private const val RX_VERSION = "3.1.5"
133+
private const val RX_ANDROID_VERSION = "3.0.2"
115134

116-
val ALL_DEPS = listOf(CONVERTER_GSON, RETROFIT_DEPENDENCY)
135+
const val RXJAVA_DEPENDENCE = "io.reactivex.rxjava3:rxjava:$RX_VERSION"
136+
const val RXJAVA_ANDROID = "io.reactivex.rxjava3:rxandroid:$RX_ANDROID_VERSION"
137+
138+
val ALL_DEPS = listOf(RXJAVA_DEPENDENCE, RXJAVA_ANDROID)
117139
}
118140

119141
object Test {
@@ -135,6 +157,24 @@ object Dependencies {
135157
val ALL_DEPS = listOf(CONSTRAINT_LAYOUT, CORE)
136158
}
137159

160+
object Firebase {
161+
private const val GOOGLE_SERVICES_VERSION = "4.3.14"
162+
private const val BOM_VERSION = "31.1.0"
163+
private const val CRASHLYTICS_GRADLE_VERSION = "2.9.2"
164+
165+
const val GOOGLE_SERVICES_GRADLE_PLUGIN = "com.google.gms:google-services:$GOOGLE_SERVICES_VERSION"
166+
const val FIREBASE_CRASHLYTICS_GRADLE_PLUGIN =
167+
"com.google.firebase:firebase-crashlytics-gradle:$CRASHLYTICS_GRADLE_VERSION"
168+
169+
const val FIREBASE_BOM = "com.google.firebase:firebase-bom:$BOM_VERSION"
170+
const val FIREBASE_ANALYTICS = "com.google.firebase:firebase-analytics-ktx"
171+
const val FIREBASE_CRASHLYTICS = "com.google.firebase:firebase-crashlytics-ktx"
172+
173+
val ALL_GRADLE_PLUGINS = listOf(GOOGLE_SERVICES_GRADLE_PLUGIN, FIREBASE_CRASHLYTICS_GRADLE_PLUGIN)
174+
175+
val ALL_DEPS = listOf(FIREBASE_ANALYTICS, FIREBASE_CRASHLYTICS)
176+
}
177+
138178
object Plugins {
139179
const val DETEKT_VERSION = "1.22.0-RC1"
140180

buildSrc/src/main/kotlin/conventions/module/conventions.module-app.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import org.gradle.kotlin.dsl.dependencies
22
import org.gradle.kotlin.dsl.kotlin
33

44
/**
5-
* Конвеция для app модулей, которая содержит [conventions.base-api] и
5+
* Конвеция для app модулей, которая содержит [conventions.base-app] и
66
* добавляет необходимые зависимости
77
*
88
* @author Ворожцов Михаил
@@ -23,6 +23,10 @@ dependencies {
2323
implementation(Dependencies.Dagger.ANDROID)
2424
Dependencies.Dagger.KAPT_DEPS.forEach { kapt(it) }
2525

26+
// Firebase
27+
Dependencies.Firebase.ALL_DEPS.forEach { implementation(it) }
28+
implementation(platform(Dependencies.Firebase.FIREBASE_BOM))
29+
2630
// Logger
2731
implementation(Dependencies.Logger.TIMBER)
2832

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Convention for expansion [conventions.base-impl] for to generalize
3+
* common dependencies in `common/network/-/api` modules
4+
*
5+
* @author Vorozhtsov Mikhail
6+
* @since 27.11.2022
7+
*/
8+
plugins {
9+
id("conventions.base-impl")
10+
}
11+
12+
dependencies {
13+
14+
implementation(Dependencies.RxJava.RXJAVA_DEPENDENCE)
15+
16+
// Core
17+
// DI
18+
api(project(":core:di:api"))
19+
20+
// Utils
21+
implementation(project(":core:utils"))
22+
}

buildSrc/src/main/kotlin/conventions/module_advanced/conventions.module-compose-api.gradle.kts renamed to buildSrc/src/main/kotlin/conventions/module_advanced/api/conventions.module-compose-api.gradle.kts

File renamed without changes.

buildSrc/src/main/kotlin/conventions/module_advanced/conventions.module-compose-app.gradle.kts renamed to buildSrc/src/main/kotlin/conventions/module_advanced/app/conventions.module-compose-app.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.gradle.kotlin.dsl.dependencies
2-
31
/**
42
* Конвеция для расширения [conventions.module-app] в andorid-compose состовляющую
53
*
@@ -25,7 +23,7 @@ dependencies {
2523
// Android Core
2624
Dependencies.AndroidCore.ALL_DEPS.forEach { implementation(it) }
2725

28-
// // Compose
26+
// Compose
2927
Dependencies.Compose.ALL_DEPS.forEach { implementation(it) }
3028
Dependencies.Compose.Core.ALL_CORE_DEBUG_DEPS.forEach { debugImplementation(it) }
3129

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Convention for expansion [conventions.module-impl] for to generalize
3+
* common dependencies in `common/network/-/impl` modules
4+
*
5+
* @author Vorozhtsov Mikhail
6+
* @since 27.11.2022
7+
*/
8+
plugins {
9+
id("conventions.module-impl")
10+
}
11+
12+
dependencies {
13+
14+
Dependencies.RxJava.ALL_DEPS.forEach { implementation(it) }
15+
16+
// Core
17+
// Utils
18+
implementation(project(":core:utils"))
19+
20+
// Core
21+
// Retrofit Api Fabric
22+
implementation(project(":core:retrofitApiFabric:impl"))
23+
}

buildSrc/src/main/kotlin/conventions/module_advanced/conventions.module-compose-impl.gradle.kts renamed to buildSrc/src/main/kotlin/conventions/module_advanced/impl/conventions.module-compose-impl.gradle.kts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.gradle.kotlin.dsl.dependencies
2-
31
/**
42
* Конвеция для расширения [conventions.module-impl] в android-compose состовляющую
53
*
@@ -15,6 +13,10 @@ android {
1513
compose = true
1614
}
1715

16+
defaultConfig {
17+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
1820
composeOptions {
1921
kotlinCompilerExtensionVersion = CompileVersions.COMPOSE_COMPILE_VERSION
2022
}
@@ -29,6 +31,14 @@ dependencies {
2931
Dependencies.Compose.ALL_DEPS.forEach { implementation(it) }
3032
Dependencies.Compose.Core.ALL_CORE_DEBUG_DEPS.forEach { debugImplementation(it) }
3133

34+
// Tests
35+
androidTestImplementation(Dependencies.Compose.UiTest.UI_TEST)
36+
debugImplementation(Dependencies.Compose.UiTest.UI_TEST_DEBUG)
37+
3238
// UI
3339
Dependencies.UI.ALL_DEPS.forEach { implementation(it) }
40+
41+
// Core
42+
// Utils
43+
implementation(project(":core:utils"))
3444
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins {
2+
conventions.`module-common-network-api`
3+
}

0 commit comments

Comments
 (0)