Skip to content

Commit b2daccc

Browse files
authored
Full migration to Compose (#69)
1 parent 9b1a68c commit b2daccc

File tree

1,308 files changed

+13662
-42171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,308 files changed

+13662
-42171
lines changed

app/build.gradle.kts

+34-71
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,28 @@ plugins {
1212

1313
android {
1414
namespace = "com.twofasapp"
15+
16+
ksp {
17+
arg("room.schemaLocation", "$projectDir/schemas")
18+
}
1519
}
1620

1721
dependencies {
18-
implementation(project(":base"))
19-
implementation(project(":core:di"))
20-
implementation(project(":extensions"))
21-
implementation(project(":prefs"))
22-
23-
implementation(project(":serialization"))
24-
implementation(project(":spanner"))
25-
implementation(project(":truetime"))
26-
implementation(project(":truetime-rx"))
27-
implementation(project(":browserextension"))
28-
implementation(project(":parsers"))
29-
implementation(project(":resources"))
30-
implementation(project(":design"))
31-
implementation(project(":permissions"))
32-
implementation(project(":push"))
33-
implementation(project(":persistence"))
34-
implementation(project(":qrscanner"))
35-
implementation(project(":widgets"))
36-
implementation(project(":services"))
37-
implementation(project(":services:domain"))
38-
implementation(project(":widgets:domain"))
39-
40-
implementation(project(":backup"))
41-
implementation(project(":core"))
42-
implementation(project(":time"))
43-
implementation(project(":featuretoggle"))
44-
implementation(project(":developer"))
45-
implementation(project(":backup:domain"))
46-
implementation(project(":security"))
47-
implementation(project(":security:domain"))
48-
implementation(project(":start"))
49-
implementation(project(":start:domain"))
50-
implementation(project(":time:domain"))
51-
5222
implementation(project(":core:common"))
5323
implementation(project(":core:android"))
5424
implementation(project(":core:designsystem"))
5525
implementation(project(":core:storage"))
5626
implementation(project(":core:network"))
5727
implementation(project(":core:locale"))
28+
implementation(project(":core:cipher"))
29+
5830
implementation(project(":data:notifications"))
5931
implementation(project(":data:session"))
6032
implementation(project(":data:services"))
6133
implementation(project(":data:browserext"))
34+
implementation(project(":data:cloud"))
35+
implementation(project(":data:push"))
36+
6237
implementation(project(":feature:startup"))
6338
implementation(project(":feature:home"))
6439
implementation(project(":feature:trash"))
@@ -67,70 +42,58 @@ dependencies {
6742
implementation(project(":feature:browserext"))
6843
implementation(project(":feature:appsettings"))
6944
implementation(project(":feature:qrscan"))
45+
implementation(project(":feature:backup"))
46+
implementation(project(":feature:widget"))
47+
implementation(project(":feature:security"))
48+
49+
implementation(project(":base"))
50+
implementation(project(":prefs"))
51+
implementation(project(":truetime"))
52+
implementation(project(":parsers"))
7053

7154
implementation(libs.bundles.appCompat)
72-
implementation(libs.bundles.rxJava)
73-
implementation(libs.bundles.materialDialogs)
74-
implementation(libs.bundles.fastAdapter)
75-
implementation(libs.bundles.rxBinding)
7655
implementation(libs.bundles.compose)
7756
implementation(libs.bundles.barcodeScanner)
7857
implementation(libs.bundles.room)
58+
implementation(libs.reLinker)
59+
ksp(libs.roomCompiler)
7960
implementation(libs.bundles.compose)
8061
implementation(libs.bundles.viewModel)
8162
implementation(libs.bundles.accompanist)
8263
implementation(libs.bundles.playReview)
8364
implementation(libs.bundles.playUpdate)
65+
implementation(libs.bundles.glance)
66+
implementation(libs.biometric)
8467
implementation(libs.timber)
8568
implementation(libs.webkit)
8669
implementation(libs.securityCrypto)
8770
implementation(libs.secureStorage)
8871
implementation(libs.lottie)
8972
implementation(libs.kotlinCoroutines)
90-
implementation(libs.coroutinesToRx)
9173
implementation(libs.workManager)
92-
implementation(libs.workManagerRx)
9374
implementation(libs.activityX)
94-
9575
implementation(libs.coreSplash)
96-
97-
// Google
98-
implementation("androidx.recyclerview:recyclerview:1.2.1")
99-
implementation("androidx.cardview:cardview:1.0.0")
100-
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
101-
implementation("androidx.drawerlayout:drawerlayout:1.1.1")
102-
implementation("androidx.multidex:multidex:2.0.1")
103-
implementation("androidx.biometric:biometric:1.1.0")
104-
105-
implementation("com.google.android.gms:play-services-auth:20.4.0"){
76+
implementation(platform(libs.firebaseBom))
77+
implementation(libs.firebaseCrashlytics)
78+
implementation(libs.firebaseMessaging)
79+
implementation(libs.playServicesCorutines)
80+
implementation(libs.googleApiClientGson)
81+
implementation(libs.googleApiClientAndroid) {
82+
exclude("org.apache.httpcomponents", "guava-jdk5")
10683
exclude("com.google.http-client", "google-http-client")
107-
exclude("com.google.http-client", "google-http-client-jackson")
10884
}
109-
110-
implementation("com.github.rafakob.google-http-java-client:google-http-client-gson:1.43.0")
111-
112-
implementation("com.google.api-client:google-api-client-android:2.2.0") {
113-
exclude("org.apache.httpcomponents", "guava-jdk5")
114-
exclude("com.google.http-client","google-http-client")
85+
implementation(libs.googleAuth) {
86+
exclude("com.google.http-client", "google-http-client")
87+
exclude("com.google.http-client", "google-http-client-jackson")
11588
}
116-
implementation("com.google.apis:google-api-services-drive:v3-rev197-1.25.0") {
89+
implementation(libs.googleDrive) {
11790
exclude("org.apache.httpcomponents", "guava-jdk5")
118-
exclude("com.google.http-client","google-http-client")
119-
91+
exclude("com.google.http-client", "google-http-client")
12092
}
12193

122-
// Utilities
94+
// ObjectBox - legacy
12395
debugImplementation("io.objectbox:objectbox-android-objectbrowser:2.9.1")
12496
releaseImplementation("io.objectbox:objectbox-android:2.9.1")
12597
implementation("io.objectbox:objectbox-kotlin:2.9.1")
12698
kapt("io.objectbox:objectbox-processor:2.9.1")
127-
implementation("org.apache.commons:commons-text:1.9")
128-
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
129-
implementation("androidx.lifecycle:lifecycle-common-java8:2.4.1")
130-
131-
implementation(platform("com.google.firebase:firebase-bom:31.1.0"))
132-
implementation("com.google.firebase:firebase-messaging-ktx")
133-
implementation("com.google.firebase:firebase-crashlytics")
134-
135-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.1")
13699
}

app/src/main/AndroidManifest.xml

+8-49
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
<uses-permission android:name="android.permission.INTERNET" />
66
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
77
<uses-permission android:name="android.permission.CAMERA" />
8-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
98
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
10-
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
119
<uses-permission android:name="android.permission.VIBRATE" />
1210
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
1311

@@ -54,19 +52,14 @@
5452
</provider>
5553

5654
<service
57-
android:name=".push.FcmMessagingService"
55+
android:name=".data.push.FcmMessagingService"
5856
android:exported="false"
5957
android:stopWithTask="false">
6058
<intent-filter>
6159
<action android:name="com.google.firebase.MESSAGING_EVENT" />
6260
</intent-filter>
6361
</service>
6462

65-
<service
66-
android:name=".widgets.adapter.WidgetViewsService"
67-
android:exported="false"
68-
android:permission="android.permission.BIND_REMOTEVIEWS" />
69-
7063
<!--
7164
Prompt Google Play services to install the backported photo picker module
7265
https://developer.android.com/training/data-storage/shared/photopicker#device-availability
@@ -87,7 +80,7 @@
8780

8881
<receiver
8982
android:name=".widgets.WidgetProvider"
90-
android:exported="false">
83+
android:exported="true">
9184
<intent-filter>
9285
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
9386
</intent-filter>
@@ -97,27 +90,16 @@
9790

9891
<meta-data
9992
android:name="android.appwidget.provider"
100-
android:resource="@xml/widget_provider" />
101-
</receiver>
102-
103-
<receiver
104-
android:name=".widgets.WidgetTimerReceiver"
105-
android:enabled="true"
106-
android:exported="false">
107-
<intent-filter>
108-
<action android:name="WIDGET_TIMER" />
109-
</intent-filter>
93+
android:resource="@xml/widget_info" />
11094
</receiver>
11195

11296
<!-- ACTIVITIES -->
113-
11497
<activity
11598
android:name=".ui.main.StartActivity"
11699
android:exported="true"
117100
android:launchMode="singleTask"
118101
android:noHistory="false"
119-
android:screenOrientation="locked"
120-
android:theme="@style/Theme.App">
102+
android:screenOrientation="locked">
121103
<intent-filter>
122104
<action android:name="android.intent.action.MAIN" />
123105

@@ -133,26 +115,6 @@
133115
<data android:scheme="otpauth" />
134116
</intent-filter>
135117

136-
</activity>
137-
138-
<activity
139-
android:name=".ui.main.MainActivity"
140-
android:label="Add service by scanning QR Code"
141-
android:launchMode="singleTask" />
142-
143-
<activity
144-
android:name=".features.backup.BackupActivity"
145-
android:label="@string/backup__2fas_backup"
146-
android:windowSoftInputMode="adjustResize" />
147-
148-
<activity
149-
android:name=".backup.ui.export.ExportBackupActivity"
150-
android:label="Export Backup" />
151-
152-
<activity
153-
android:name=".features.backup.import.ImportBackupActivity"
154-
android:exported="true"
155-
android:label="Import Backup">
156118
<intent-filter>
157119
<action android:name="android.intent.action.VIEW" />
158120

@@ -173,16 +135,13 @@
173135
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.2fas" />
174136

175137
</intent-filter>
138+
176139
</activity>
177140

178141
<activity
179-
android:name=".widgets.configure.WidgetSettingsActivity"
180-
android:exported="true"
181-
android:label="Widget settings">
182-
<intent-filter>
183-
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
184-
</intent-filter>
185-
</activity>
142+
android:name=".ui.main.MainActivity"
143+
android:label="Add service by scanning QR Code"
144+
android:launchMode="singleTask" />
186145

187146
</application>
188147
</manifest>
File renamed without changes.

app/src/main/java/com/twofasapp/ActivityModule.kt

-47
This file was deleted.

0 commit comments

Comments
 (0)