Skip to content

Commit

Permalink
Upgrade. Release 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mtotschnig committed Nov 15, 2024
1 parent 7ff2ec4 commit 5fe5c20
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OCR

This app bundles OCR functionality that can be called from other apps via Intents. Depending on the product flavor, it either uses [Mlkit](https://developers.google.com/ml-kit/vision/text-recognition/android) or [Tesseract](https://tesseract-ocr.github.io/).
This app bundles OCR functionality that can be called from other apps via Intents. Depending on the product flavor, it either uses [Mlkit](https://developers.google.com/ml-kit/vision/text-recognition/android) or [Tesseract](https://tesseract-ocr.github.io/) via [Tesseract4Android](https://github.com/adaptech-cz/Tesseract4Android).


It listens for Intents with action "org.totschnig.ocr.action.RECOGNIZE" and expects an Uri pointing to a JPEG file as data.

Expand Down
27 changes: 13 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ def getPropertyIfDefined(property, defaultValue) {
}

android {
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "org.totschnig.ocr"
minSdkVersion 16
targetSdkVersion 34
versionCode 7
versionName "2.3"
minSdkVersion 21
targetSdkVersion 35
versionCode 8
versionName "2.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -30,7 +30,6 @@ android {
mlkit {
dimension "engine"
applicationIdSuffix ".mlkit"
minSdkVersion 19
}
tesseract {
dimension "engine"
Expand Down Expand Up @@ -69,18 +68,18 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.7'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
testImplementation 'junit:junit:4.13.2'
mlkitImplementation 'com.google.mlkit:text-recognition:16.0.0'
mlkitImplementation 'com.google.mlkit:text-recognition:16.0.1'
tesseractImplementation 'cz.adaptech.tesseract4android:tesseract4android-openmp:4.7.0'
implementation 'com.jakewharton.timber:timber:5.0.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0"
implementation "androidx.activity:activity-ktx:1.9.0"
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7"
implementation "androidx.activity:activity-ktx:1.9.3"
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

}
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />

<application
android:name=".MyApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_scan"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_scan_round"
android:supportsRtl="true">
<activity android:name=".SettingsActivity"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.4.1'
classpath 'com.android.tools.build:gradle:8.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
2 changes: 2 additions & 0 deletions metadata/en-US/changelogs/8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Target Android 15 (SDK 35), minimum Android 5 (SDK 21)
Upgrade Tesseract4Android to 4.7.0 (Tesseract 5.3.4)

0 comments on commit 5fe5c20

Please sign in to comment.