-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathbuild.gradle
More file actions
171 lines (142 loc) · 5.3 KB
/
build.gradle
File metadata and controls
171 lines (142 loc) · 5.3 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
id 'app.opendocument.conanandroidgradleplugin'
}
android {
ndkVersion "28.1.13356709"
}
tasks.register('conanProfile', Copy) {
from "conanprofile.txt"
into project.layout.buildDirectory
filter(ReplaceTokens, tokens: ["NDK_PATH": android.ndkDirectory.toString()])
}
["armv8", "armv7", "x86", "x86_64"].each { architecture ->
tasks.named("conanInstall-" + architecture) {
profile.set('build/conanprofile.txt')
deployer.set('conandeployer.py')
deployerFolder.set(outputDirectory.get().asFile.toString() + "/assets/core")
dependsOn(tasks.named('conanProfile'))
conanExecutable.set('conan')
}
}
android {
defaultConfig {
applicationId "at.tomtasche.reader"
minSdkVersion 23
compileSdkVersion 35
targetSdkVersion 35
testApplicationId "at.tomtasche.reader.test"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary true
externalNativeBuild {
cmake {
targets "odr-core"
arguments(
"-DANDROID_STL=c++_shared",
"-DCMAKE_TOOLCHAIN_FILE=build/conan/android_toolchain.cmake",
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
)
}
}
}
flavorDimensions "default"
signingConfigs {
releasePro {
storeFile file("../../google_play.keystore")
storePassword "releaseme"
keyAlias "reader-pro"
keyPassword "releaseme"
}
releaseLite {
storeFile file("../../google_play.keystore")
storePassword "releaseme"
keyAlias "reader"
keyPassword "releaseme"
}
}
productFlavors {
lite {
signingConfig signingConfigs.releaseLite
resValue("bool", "DISABLE_TRACKING", "false")
}
pro {
applicationIdSuffix ".pro"
versionNameSuffix "-pro"
signingConfig signingConfigs.releasePro
resValue("bool", "DISABLE_TRACKING", "true")
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt'
firebaseCrashlytics.nativeSymbolUploadEnabled true
ndk.debugSymbolLevel = "full"
}
}
android.bundle.language.enableSplit false
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
externalNativeBuild {
cmake {
version "3.22.0+"
path "CMakeLists.txt"
}
}
lint {
abortOnError false
}
packagingOptions {
jniLibs {
// No need to pickFirst libc++_shared.so if all files are identical.
// They will be identical if NDK major version matches.
// NDK runtime problems may occur if NDK version mismatches,
// so comment this out, to get a compile error instead
// pickFirsts += ['**/libc++_shared.so']
}
}
namespace 'at.tomtasche.reader'
compileSdk 35
buildToolsVersion '34.0.0'
// TODO can and should this be architecture dependent?
sourceSets.main.assets.srcDirs += "build/conan/armv8/assets"
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:33.3.0')
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-crashlytics-ndk'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-config'
implementation 'com.google.android.gms:play-services-ads:23.3.0'
implementation 'com.google.android.play:review:2.0.1'
implementation 'com.google.android.ump:user-messaging-platform:3.0.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core:1.13.1'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.webkit:webkit:1.11.0'
implementation 'com.viliussutkus89:assetextractor-android:1.3.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test:rules:1.6.1'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1'
// espresso-idling-resource is used in main sourceSet as well. cannot be just androidTestImplementation
implementation 'androidx.test.espresso:espresso-idling-resource:3.6.1'
implementation 'androidx.annotation:annotation:1.8.2'
}
// Without removing .cxx dir on cleanup, double gradle clean is erroring out.
// Before removing this workaround, check if "./gradlew assembleDebug; ./gradlew clean; ./gradlew clean" works
tasks.named("clean") {
def dotCxxDir = layout.projectDirectory.dir(".cxx")
doFirst {
delete dotCxxDir
}
}