-
Notifications
You must be signed in to change notification settings - Fork 277
/
Copy pathbuild.gradle.kts
116 lines (101 loc) · 3.58 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import io.getstream.chat.android.Configuration
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.android.junit5)
alias(libs.plugins.androidx.baseline.profile)
}
rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "stream-chat-android-ui-components")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "$rootDir/scripts/publish-module.gradle")
apply(from = "$rootDir/scripts/android.gradle")
android {
namespace = "io.getstream.chat.android.ui"
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
resourcePrefix = "stream_ui_"
buildFeatures {
viewBinding = true
}
testOptions {
unitTests {
isIncludeAndroidResources = true
unitTests.isReturnDefaultValues = true
// Show the result of every unit test, even if it passes.
all {
it.testLogging {
events = setOf(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR,
)
}
}
}
}
sourceSets {
all {
java.srcDir("src/$name/kotlin")
}
}
}
baselineProfile {
baselineProfileOutputDir = "."
filter {
include("io.getstream.chat.android.ui.**")
}
}
tasks.withType<KotlinCompile> {
compilerOptions.freeCompilerArgs.addAll(
listOf(
"-progressive",
"-Xexplicit-api=strict",
"-opt-in=kotlin.contracts.ExperimentalContracts",
"-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi",
"-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi",
),
)
}
dependencies {
api(project(":stream-chat-android-ui-common"))
implementation(project(":stream-chat-android-ui-utils"))
implementation(libs.stream.log)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.legacy.support)
implementation(libs.androidx.constraintlayout)
implementation(libs.android.material)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.viewpager2)
implementation(libs.androidx.core.ktx)
implementation(libs.stream.photoview.dialog)
implementation(libs.coil)
implementation(libs.coil.gif)
implementation(libs.coil.video)
implementation(libs.androidx.startup.runtime)
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.keyboardvisibilityevent)
implementation(libs.permissionx)
// Tests
testImplementation(project(":stream-chat-android-test"))
testImplementation(testFixtures(project(":stream-chat-android-core")))
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.junit.vintage.engine)
testImplementation(libs.kluent)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.androidx.core.testing)
detektPlugins(libs.detekt.formatting)
baselineProfile(project(":stream-chat-android-benchmark"))
}