Skip to content

Commit 3abd102

Browse files
authored
Merge pull request #59 from getyoti/YD-6940
[TASK][YD-6940] Migrate webapp module UI to Jetpack Compose
2 parents 8cd7bd2 + a78069a commit 3abd102

File tree

17 files changed

+443
-450
lines changed

17 files changed

+443
-450
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies {
4848
implementation fileTree(dir: 'libs', include: ['*.jar'])
4949
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
5050

51-
def composeBom = platform("androidx.compose:compose-bom:2025.04.00")
51+
def composeBom = platform("androidx.compose:compose-bom:$composeBomVersion")
5252
implementation composeBom
5353
implementation 'androidx.compose.material3:material3'
5454
implementation 'androidx.activity:activity-compose'

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ android.useAndroidX=true
1919
android.enableJetifier=true
2020
# Kotlin code style for this project: "official" or "obsolete":
2121
kotlin.code.style=official
22+
23+
composeBomVersion=2025.04.00
24+
navigationComposeVersion=2.8.9

webapp/build.gradle

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
34

45
android {
56
namespace "com.yoti.mobile.android.sdk.yotidocscan.websample"
67

7-
compileSdk 33
8+
compileSdk 34
89

910
defaultConfig {
1011
applicationId "com.yoti.mobile.android.sdk.yotidocscan.websample"
1112
minSdkVersion 21
12-
targetSdkVersion 33
13+
targetSdkVersion 34
1314
versionCode 1
1415
versionName "1.0"
1516

@@ -24,6 +25,7 @@ android {
2425
buildFeatures {
2526
viewBinding true
2627
buildConfig true
28+
compose true
2729
}
2830

2931
buildTypes {
@@ -38,12 +40,12 @@ android {
3840
dependencies {
3941
implementation fileTree(dir: 'libs', include: ['*.jar'])
4042
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
41-
implementation 'androidx.appcompat:appcompat:1.1.0'
42-
implementation 'androidx.core:core-ktx:1.3.0'
43-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
44-
implementation 'com.google.android.material:material:1.1.0'
45-
46-
// Multi-module projects: Add this dependency because of Android Studio Issue
47-
// and androix.navigation dependencies management https://issuetracker.google.com/issues/152245564
48-
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
43+
44+
def composeBom = platform("androidx.compose:compose-bom:$composeBomVersion")
45+
implementation composeBom
46+
implementation 'androidx.compose.material3:material3'
47+
implementation 'androidx.activity:activity-compose'
48+
debugImplementation 'androidx.compose.ui:ui-tooling'
49+
50+
implementation "androidx.navigation:navigation-compose:$navigationComposeVersion"
4951
}

webapp/src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
<uses-permission android:name="android.permission.INTERNET" />
55
<uses-permission android:name="android.permission.CAMERA" />
6-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
86
<uses-permission android:name="android.permission.RECORD_AUDIO" />
97
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
108
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />

webapp/src/main/java/com/yoti/mobile/android/sdk/yotidocscan/websample/AccelerometerListener.kt

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.yoti.mobile.android.sdk.yotidocscan.websample
2+
3+
object AppDestinations {
4+
5+
const val MAIN_SCREEN = "main_screen"
6+
const val WEB_SCREEN = "web_screen"
7+
}

0 commit comments

Comments
 (0)