@@ -31,25 +31,59 @@ There are two ways in which you can include the `dynamsoftbarcodereaderbundle` l
3131
3232### Option 1: Add the Library via Maven
3333
34- 1 . Open the file ` [App Project Root Path]\app\build .gradle ` and add the Maven repository:
34+ 1 . Open the file ` [App Project Root Path]\settings .gradle ` and add the Maven repository:
3535
36+ <div class =" sample-code-prefix " ></div >
37+ > - groovy
38+ > - kts
39+ >
40+ > 1 .
3641 ``` groovy
37- allprojects {
42+ dependencyResolutionManagement {
43+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3844 repositories {
39- maven {
40- url "https://download2.dynamsoft.com/maven/aar"
41- }
45+ google()
46+ mavenCentral()
47+ maven {
48+ url "https://download2.dynamsoft.com/maven/aar"
49+ }
50+ }
51+ }
52+ ```
53+ 2 .
54+ ``` kts
55+ dependencyResolutionManagement {
56+ repositoriesMode.set(RepositoriesMode .FAIL_ON_PROJECT_REPOS )
57+ repositories {
58+ google()
59+ mavenCentral()
60+ maven {
61+ url = uri(" https://download2.dynamsoft.com/maven/aar" )
62+ }
4263 }
4364 }
4465 ```
4566
46- 2 . Add the references in the dependencies:
67+ > Note: If you are using gradle 6.x or older version, the maven dependencies should be configured in ` [App Project Root Path]\app\build.gradle `
4768
69+ 2 . Open the file ` [App Project Root Path]\app\build.gradle ` and add the dependencies:
70+
71+ <div class =" sample-code-prefix " ></div >
72+ > - groovy
73+ > - kts
74+ >
75+ > 1 .
4876 ``` groovy
4977 dependencies {
5078 implementation 'com.dynamsoft:dynamsoftbarcodereaderbundle:10.4.3001'
5179 }
5280 ```
81+ 2 .
82+ ``` kts
83+ dependencies {
84+ implementation(" com.dynamsoft:dynamsoftbarcodereaderbundle:10.4.3001" )
85+ }
86+ ```
5387
54883 . Click ** Sync Now** . After the synchronization is complete, the SDK is added to the project.
5589
@@ -70,15 +104,30 @@ There are two ways in which you can include the `dynamsoftbarcodereaderbundle` l
70104
711053 . Open the file ` [App Project Root Path]\app\build.gradle ` and add the reference in the dependencies:
72106
107+ <div class =" sample-code-prefix " ></div >
108+ > - groovy
109+ > - kts
110+ >
111+ > 1 .
73112 ``` groovy
74113 dependencies {
75- implementation fileTree(dir: 'libs', include: ['*.aar'])
76-
77- def camerax_version = '1.1.0'
78- implementation "androidx.camera:camera-core:$camerax_version"
79- implementation "androidx.camera:camera-camera2:$camerax_version"
80- implementation "androidx.camera:camera-lifecycle:$camerax_version"
81- implementation "androidx.camera:camera-view:$camerax_version"
114+ implementation fileTree(dir: 'libs', include: ['*.aar'])
115+ def camerax_version = '1.1.0'
116+ implementation "androidx.camera:camera-core:$camerax_version"
117+ implementation "androidx.camera:camera-camera2:$camerax_version"
118+ implementation "androidx.camera:camera-lifecycle:$camerax_version"
119+ implementation "androidx.camera:camera-view:$camerax_version"
120+ }
121+ ```
122+ 2 .
123+ ``` kts
124+ val camerax_version = " 1.1.0"
125+ dependencies {
126+ implementation(fileTree(mapOf (" dir" to " libs" , " include" to listOf (" *.aar" ))))
127+ implementation(" androidx.camera:camera-core:$camerax_version " )
128+ implementation(" androidx.camera:camera-camera2:$camerax_version " )
129+ implementation(" androidx.camera:camera-lifecycle:$camerax_version " )
130+ implementation(" androidx.camera:camera-view:$camerax_version " )
82131 }
83132 ```
84133
0 commit comments