Skip to content

Commit

Permalink
build: updates (#317)
Browse files Browse the repository at this point in the history
* Update Gradle Wrapper

* build: updates

* move away from deprecated `package` attribute
* bump dependencies
* bump CompileSdk and BuildTools

* fix: properly reference exifinterface

* style: reformat

* build: add existing androidx.fragment

* Bump iTextPDF version

* Bump AndroidX

Co-authored-by: PatrickMis <[email protected]>
  • Loading branch information
PatrykMis and PatrykMis authored Oct 27, 2022
1 parent 970fe81 commit a8f0294
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 20 deletions.
18 changes: 10 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ plugins {
}

android {
compileSdk = 32
buildToolsVersion = "32.0.0"
compileSdk = 33
buildToolsVersion = "33.0.0"
namespace = "com.todobom.opennotescanner"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand All @@ -23,7 +24,7 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
flavorDimensions += "version"
Expand All @@ -47,12 +48,13 @@ android {
dependencies {
implementation(fileTree(mapOf("include" to listOf("*.jar"), "dir" to "libs")))

implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.core:core-ktx:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20")

implementation("androidx.exifinterface:exifinterface:1.3.3")
implementation("androidx.exifinterface:exifinterface:1.3.5")
testImplementation("junit:junit:4.13.2")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.fragment:fragment-ktx:1.5.4")
implementation("com.google.android.material:material:1.6.1")
implementation("com.google.zxing:core:3.5.0")
implementation("com.github.ctodobom:OpenCV-3.1.0-Android:9e00ee4218ca0c9e60a905c9f09bf499f9dc5115")
Expand All @@ -61,9 +63,9 @@ dependencies {
implementation("com.github.allgood:Android-Universal-Image-Loader:717a00c")
implementation("com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943")
implementation("com.github.matomo-org:matomo-sdk-android:4.1.4")
implementation("com.github.MikeOrtiz:TouchImageView:3.2.0")
implementation("com.github.MikeOrtiz:TouchImageView:3.2.1")

val itextpdf_version = "7.2.3"
val itextpdf_version = "7.2.4"
implementation("com.itextpdf:kernel:$itextpdf_version")
implementation("com.itextpdf:layout:$itextpdf_version")
implementation("com.itextpdf:io:$itextpdf_version")
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.todobom.opennotescanner">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-feature
android:name="android.hardware.camera"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.todobom.opennotescanner.views

import android.content.res.ColorStateList
import android.media.ExifInterface
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.Window
import android.widget.Button
import android.widget.ImageView
import androidx.exifinterface.media.ExifInterface
import androidx.fragment.app.DialogFragment
import com.todobom.opennotescanner.R
import java.io.IOException
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:7.3.0")
classpath("com.android.tools.build:gradle:7.3.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")

// NOTE: Do not place your application dependencies here; they belong
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionSha256Sum=db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down

0 comments on commit a8f0294

Please sign in to comment.