-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
196 lines (162 loc) · 5.7 KB
/
build.gradle.kts
File metadata and controls
196 lines (162 loc) · 5.7 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
184
185
186
187
188
189
190
191
192
193
194
195
196
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
compileSdk = 36
namespace = "host.stjin.anonaddy"
//compileSdkPreview = "Tiramisu"
defaultConfig {
applicationId = namespace
minSdk = 23
targetSdk = 36
/*
Set the first two digits of the version code to the targetSdkVersion, such as 28.
Set the next three digits to the product version, such as 152 for a product version of 1.5.2.
Set the next two digits to build or release number, such as 01.
Reserve the last two digits for a multi-APK variant, 00 for app, 01 for wearOS
*/
// SDK 36 + v6.1.0 + release 01 + 00 (for app)
versionCode = 366100100 // https://developer.android.com/training/wearables/packaging
// The "v" is important, as the updater class compares with the RSS feed on GitHub
versionName = "v6.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildFeatures {
viewBinding = true
buildConfig = true
}
buildTypes {
getByName("release") {
// Do not enable, Fuel will break
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("debug")
}
getByName("debug") {
applicationIdSuffix = ".debug"
isDebuggable = true
}
}
flavorDimensions.add("type")
productFlavors {
create("gplay") {
dimension = "type"
}
create("gplayless") {
dimension = "type"
}
}
/**
* END FLAVORS
*/
compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
lint {
disable += setOf("WearableBindListener")
}
}
dependencies {
modules {
module("org.jetbrains.kotlin:kotlin-stdlib-jdk7") {
replacedBy("org.jetbrains.kotlin:kotlin-stdlib", "kotlin-stdlib-jdk7 is now part of kotlin-stdlib")
}
module("org.jetbrains.kotlin:kotlin-stdlib-jdk8") {
replacedBy("org.jetbrains.kotlin:kotlin-stdlib", "kotlin-stdlib-jdk8 is now part of kotlin-stdlib")
}
}
}
dependencies {
implementation(project(mapOf("path" to ":anonaddy_shared")))
}
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.3.10")
implementation("androidx.core:core-ktx:1.17.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("com.google.android.material:material:1.13.0")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.9.7")
implementation("androidx.navigation:navigation-ui-ktx:2.9.7")
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
}
//https://developer.android.com/studio/write/java8-support#library-desugaring
// For using java.time pre-oreo
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}
// Shimmer
dependencies {
implementation("com.facebook.shimmer:shimmer:0.5.0")
implementation("com.github.omtodkar:ShimmerRecyclerView:v0.4.1")
}
// Securing app
dependencies {
implementation("androidx.biometric:biometric:1.1.0")
}
// Apache for extracting strings ManageAliasActivity
dependencies {
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation("org.apache.commons:commons-lang3:3.20.0")
}
// Scanning QR codes
dependencies {
implementation("com.github.yuriy-budiyev:code-scanner:2.3.2")
}
// For updating widgets and caching data
dependencies {
implementation("androidx.work:work-runtime-ktx:2.11.1")
}
// For the donut in the aliasview
dependencies {
implementation("app.futured.donut:donut:2.3.0") // FIXME: https://github.com/futuredapp/donut/pull/96
}
// Loading spinners when execution actions from e.g. bottom sheets
dependencies {
implementation("com.github.Stjin:LoadingButtonAndroid:2.2.0")
}
// Backup manager
dependencies {
implementation("org.ocpsoft.prettytime:prettytime:5.0.7.Final")
implementation("androidx.activity:activity-ktx:1.12.4")
}
// Communication with Wear OS device
// Only implement GPlay in the gplay version
// Because the app has a gplayless flavor define a gplayImplementation
val gplayImplementation by configurations
dependencies {
gplayImplementation("com.google.android.gms:play-services-wearable:19.0.0")
gplayImplementation("com.android.billingclient:billing-ktx:8.3.0")
gplayImplementation("com.google.android.play:review-ktx:2.0.2")
}
// Backgroundworker
dependencies {
implementation("com.google.code.gson:gson:2.13.2")
}
// Built-in updater
dependencies {
implementation("com.github.einmalfel:Earl:1.2.0")
}
// Activity Embedding
dependencies {
implementation("androidx.window:window:1.5.1")
implementation("androidx.startup:startup-runtime:1.2.0")
}
// Edge-To-Edge
dependencies {
implementation("androidx.documentfile:documentfile:1.1.0")
}