-
Notifications
You must be signed in to change notification settings - Fork 278
/
Copy pathbuild.gradle.kts
124 lines (104 loc) · 3.98 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
117
118
119
120
121
122
123
124
import io.getstream.chat.android.Configuration
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.android.junit5)
alias(libs.plugins.androidx.baseline.profile)
alias(libs.plugins.paparazzi)
}
rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "stream-chat-android-compose")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "$rootDir/scripts/publish-module.gradle")
apply(from = "$rootDir/scripts/android.gradle")
apply(from = "$rootDir/scripts/detekt-compose.gradle")
android {
namespace = "io.getstream.chat.android.compose"
defaultConfig {
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
resourcePrefix = "stream_compose_"
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
buildFeatures {
compose = true
}
}
composeCompiler {
enableStrongSkippingMode = true
reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf")
}
baselineProfile {
baselineProfileOutputDir = "."
filter {
include("io.getstream.chat.android.compose.**")
}
}
tasks.withType<KotlinCompile> {
compilerOptions.freeCompilerArgs.addAll(
listOf(
"-progressive",
"-Xexplicit-api=strict",
"-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi",
"-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi",
"-opt-in=kotlin.RequiresOptIn",
),
)
}
dependencies {
api(project(":stream-chat-android-ui-common"))
implementation(project(":stream-chat-android-previewdata"))
implementation(project(":stream-chat-android-ui-utils"))
implementation(libs.androidx.appcompat)
implementation(libs.stream.log)
// Compose
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.constraintlayout.compose)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.adaptive)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.google.accompanist.permissions)
implementation(libs.google.accompanist.pager)
implementation(libs.google.accompanist.systemuicontroller)
// Coil
implementation(libs.coil.compose)
implementation(libs.skydoves.landscapist.coil)
implementation(libs.skydoves.landscapist.placeholder)
implementation(libs.skydoves.landscapist.animation)
implementation(libs.coil.gif)
implementation(libs.coil.video)
// UI
implementation(libs.reorderable)
// Tests
testImplementation(project(":stream-chat-android-test"))
testImplementation(testFixtures(project(":stream-chat-android-core")))
testImplementation(project(":stream-chat-android-previewdata"))
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)
testImplementation(libs.mockito.kotlin)
detektPlugins(libs.detekt.formatting)
baselineProfile(project(":stream-chat-android-benchmark"))
}