Skip to content

Commit

Permalink
- update libraries: stable camera release, gradle, kotlin, coroutines…
Browse files Browse the repository at this point in the history
…, removed jcenter.
  • Loading branch information
iulian-buzila committed May 7, 2021
1 parent f3f56ed commit 683140f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
20 changes: 9 additions & 11 deletions DocumentScanner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ apply plugin: 'com.github.dcendents.android-maven'

group="com.zynkware"

def libraryVersionCode = 4
def libraryVersionName = "1.0.0"
def libraryVersionCode = 5
def libraryVersionName = "1.0.1"

repositories {
mavenCentral()
google()
jcenter()
maven { url "https://jitpack.io" }
}

Expand Down Expand Up @@ -55,30 +54,29 @@ android {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://jitpack.io' }
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'

implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'

implementation 'com.github.zynkware:Tiny-OpenCV:4.4.0-4'

implementation "androidx.camera:camera-camera2:1.0.0-beta10"
implementation "androidx.camera:camera-lifecycle:1.0.0-beta10"
implementation "androidx.camera:camera-view:1.0.0-alpha17"
implementation "androidx.camera:camera-camera2:1.0.0"
implementation "androidx.camera:camera-lifecycle:1.0.0"
implementation "androidx.camera:camera-view:1.0.0-alpha24"

implementation 'com.github.tbruyelle:rxpermissions:0.12'

implementation 'androidx.exifinterface:exifinterface:1.3.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
implementation 'id.zelory:compressor:3.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
implementation 'id.zelory:compressor:3.0.1'
}

task sourceJar(type: Jar) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Path
import android.os.Handler
import android.os.Looper
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
Expand All @@ -46,7 +47,7 @@ internal class ScanCanvasView : FrameLayout {

private var paint = Paint()
private var border = Paint()
private val handlerClear = Handler()
private val handlerClear = Handler(Looper.getMainLooper())

private var shouldAnimate = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import android.graphics.PointF
import android.graphics.drawable.BitmapDrawable
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
Expand Down Expand Up @@ -68,7 +69,7 @@ internal class ImageCropFragment : BaseFragment() {
} else {
Log.e(TAG, DocumentScannerErrorModel.ErrorMessage.INVALID_IMAGE.error)
onError(DocumentScannerErrorModel(DocumentScannerErrorModel.ErrorMessage.INVALID_IMAGE))
Handler().post{
Handler(Looper.getMainLooper()).post{
closeFragment()
}
}
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand All @@ -52,6 +52,6 @@ dependencies {
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.github.chrisbanes:PhotoView:2.0.0'

implementation 'com.github.zynkware:Document-Scanning-Android-SDK:1.0.0'
// implementation project(":DocumentScanner")
// implementation 'com.github.zynkware:Document-Scanning-Android-SDK:1.0.0'
implementation project(":DocumentScanner")
}
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.0"
ext.kotlin_version = "1.4.30"
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath "com.android.tools.build:gradle:4.1.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
Expand All @@ -15,7 +18,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//include ':DocumentScanner'
include ':DocumentScanner'
include ':app'
rootProject.name = "DocumentScannerSample"

0 comments on commit 683140f

Please sign in to comment.