-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
165 lines (146 loc) · 5.83 KB
/
build.gradle
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
buildscript {
ext.kotlin_version = "2.0.21"
ext.navigation_version = "2.8.4"
ext.okhttp_version = "4.12.0"
ext.retrofit_version = "2.11.0"
ext.glide_version = "4.16.0"
ext.androidx_fragment_version = "1.8.5"
ext.androidx_test_version = "1.6.1"
repositories {
mavenCentral()
google()
maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.huawei.agconnect:agcp:1.9.1.304'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$kotlin_version-1.0.25"
classpath "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.kotlin.plugin.parcelize'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
apply plugin: 'com.google.devtools.ksp'
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://developer.huawei.com/repo/' }
}
android {
compileSdk 35
defaultConfig {
targetSdkVersion 35
minSdkVersion 24
versionCode 223
versionName "3.2." + versionCode
applicationId "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"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testHandleProfiling true
testFunctionalTest true
}
buildFeatures {
buildConfig true
viewBinding true
}
kotlinOptions {
jvmTarget = '1.8'
}
buildTypes {
debug {
debuggable true
}
release {
namespace "com.juick"
minifyEnabled false
}
}
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
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "Juick-${variant.flavorName}-v${variant.versionName}.apk"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.browser:browser:1.8.0'
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
implementation "androidx.savedstate:savedstate-ktx:1.2.1"
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.google.android.material:material:1.12.0'
googleImplementation 'com.google.android.gms:play-services-auth:21.2.0'
// Firebase platform
googleImplementation platform('com.google.firebase:firebase-bom:33.6.0')
googleImplementation 'com.google.firebase:firebase-messaging'
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
freeImplementation 'com.github.heremaps:oksse:0.9.0'
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-kotlinx-serialization:$retrofit_version"
implementation "com.github.bumptech.glide:glide:$glide_version"
ksp "com.github.bumptech.glide:ksp:$glide_version"
implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version"
implementation 'com.github.vitalyster:ChatKit:5e99a8bf3c'
huaweiImplementation 'com.huawei.hms:push:6.12.0.300'
implementation 'com.github.Zhuinden:fragmentviewbindingdelegate-kt:1.0.2'
implementation 'com.vanniktech:android-image-cropper:4.6.0'
// Fragment testing
debugImplementation "androidx.fragment:fragment-testing-manifest:$androidx_fragment_version"
// Core library
androidTestImplementation "androidx.test:core-ktx:$androidx_test_version"
// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.ext:truth:1.6.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation("androidx.fragment:fragment-testing:$androidx_fragment_version")
// UI Automator
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
}
apply plugin: 'com.google.gms.google-services'
googleServices {
disableVersionCheck true
}
apply plugin: 'com.huawei.agconnect'
android.applicationVariants.configureEach { variant ->
project.tasks.getByName('process' + variant.name.capitalize() + 'GoogleServices').enabled variant.name.contains('google')
}