-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild.gradle
More file actions
183 lines (165 loc) · 5.94 KB
/
build.gradle
File metadata and controls
183 lines (165 loc) · 5.94 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
plugins {
alias libs.plugins.androidApplication
alias libs.plugins.kotlin
alias libs.plugins.kotlin.plugin.parcelize
alias libs.plugins.kotlin.plugin.serialization
alias libs.plugins.kotlin.plugin.compose
alias libs.plugins.google.services
alias libs.plugins.huawei.connect
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file("keystore.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdk = 36
defaultConfig {
targetSdkVersion 36
minSdkVersion 24
versionCode 248
versionName "3.2." + versionCode
applicationId "com.juick"
namespace "com.juick"
vectorDrawables.useSupportLibrary true
def addConstant = {constantName, constantValue ->
manifestPlaceholders += [ (constantName):constantValue]
buildConfigField "String", "${constantName}", "\"${constantValue}\""
}
addConstant("API_ENDPOINT", "https://api.juick.com/")
addConstant("EVENTS_ENDPOINT", "https://juick.com/api/events")
addConstant("INTENT_NEW_EVENT_ACTION", "com.juick.NEW_EVENT_ACTION")
buildConfigField "boolean", "HIDE_NSFW", "false"
buildConfigField "boolean", "ENABLE_COMPOSE_UI", "false"
buildConfigField "boolean", "ENABLE_UPDATER", "true"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testHandleProfiling true
testFunctionalTest true
}
buildFeatures {
buildConfig true
viewBinding true
compose true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled false
signingConfig signingConfigs.release
}
next {
initWith debug
buildConfigField "boolean", "ENABLE_COMPOSE_UI", "true"
}
store {
initWith release
buildConfigField "boolean", "ENABLE_UPDATER", "false"
signingConfig signingConfigs.release
}
}
flavorDimensions += "notifications"
productFlavors {
google {
dimension "notifications"
}
huawei {
dimension "notifications"
buildConfigField "boolean", "HIDE_NSFW", "true"
}
free {
dimension "notifications"
}
}
lint {
abortOnError false
checkDependencies true
checkGeneratedSources true
checkReleaseBuilds false
disable "CoroutineCreationDuringComposition"
disable "StateFlowValueCalledInComposition"
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "Juick-${variant.flavorName}-v${variant.versionName}.apk"
}
variant.resValue "string", "applicationId", "${applicationId}"
variant.resValue "string", "messages_provider_authority", "${applicationId}.messages"
project.tasks.getByName('process' + variant.name.capitalize() + 'GoogleServices').enabled variant.name.contains('google')
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}
dependencies {
implementation libs.kotlinx.serialization.json
implementation libs.core.ktx
implementation libs.appcompat
implementation libs.browser
implementation libs.navigation.fragment.ktx
implementation libs.navigation.ui.ktx
implementation libs.savedstate.ktx
implementation libs.swiperefreshlayout
implementation libs.lifecycle.viewmodel.compose
implementation libs.lifecycle.extensions
implementation libs.material
// Sign in with Google
googleImplementation libs.credentials.play.services.auth
googleImplementation libs.play.services.auth
googleImplementation libs.googleid
// Firebase platform
googleImplementation platform(libs.firebase.bom)
googleImplementation libs.firebase.messaging
implementation libs.okhttp
implementation libs.logging.interceptor
freeImplementation libs.oksse
implementation libs.retrofit
implementation libs.converter.kotlinx.serialization
implementation libs.chatkit
huaweiImplementation libs.push
implementation libs.fragmentviewbindingdelegate.kt
implementation libs.android.image.cropper
// Compose
nextImplementation libs.activity.compose
nextImplementation libs.constraintlayout.compose
nextImplementation platform(libs.compose.bom)
nextImplementation libs.ui
nextImplementation libs.ui.graphics
nextImplementation libs.ui.viewbinding
nextImplementation libs.ui.tooling.preview
nextImplementation libs.material.icons.extended
nextImplementation libs.material3
nextImplementation libs.ui.tooling
// Core library
androidTestImplementation libs.test.core.ktx
// Assertions
androidTestImplementation libs.junit
androidTestImplementation libs.truth
androidTestImplementation libs.espresso.core
// Espresso intents for intercepting ACTION_VIEW
androidTestImplementation libs.espresso.intents
// Fragment testing helpers (launchFragmentInContainer)
androidTestImplementation libs.fragment.testing
// UI Automator
androidTestImplementation libs.uiautomator.v18
}