From 2de827dfe516c8571a843e86a2e6f71a33762bc9 Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Sat, 4 Jun 2022 19:02:42 +0200 Subject: [PATCH 1/6] Bump TouchImageView to 3.2.0 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 7961361..1708ba0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5' implementation 'com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943' implementation 'org.matomo.sdk:tracker:4.1.2' - implementation 'com.github.MikeOrtiz:TouchImageView:3.1.1' + implementation 'com.github.MikeOrtiz:TouchImageView:3.2.0' implementation "com.itextpdf:kernel:$itextpdf_version" implementation "com.itextpdf:layout:$itextpdf_version" implementation "com.itextpdf:io:$itextpdf_version" From 70fc52d594e42682d6e727f926702aca59fe3547 Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Sat, 4 Jun 2022 19:04:34 +0200 Subject: [PATCH 2/6] Update targetSdk, define buildToolsVersion --- app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 1708ba0..c39a947 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,8 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdk 31 + compileSdk 32 + buildToolsVersion '32.0.0' compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 From 60a7611ab707b2e36ed4a330e1d509f188a058a5 Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Sat, 4 Jun 2022 19:05:06 +0200 Subject: [PATCH 3/6] Set jvmTarget to 11 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index c39a947..b73946a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } defaultConfig { applicationId "com.todobom.opennotescanner" From 89b8bc3de55b3d474c27c58d81f41213baaf2e3c Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Sat, 4 Jun 2022 19:13:22 +0200 Subject: [PATCH 4/6] Add verification of the downloaded Gradle distribution via SHA-256 hash sum comparison --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f3ac86c..e1e0c8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jun 04 09:50:44 BRT 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip From d26f29e4accc834f17123f0d30c09ad08bdc3da9 Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Tue, 7 Jun 2022 06:12:34 +0200 Subject: [PATCH 5/6] Migrate build system to Kotlin DSL --- app/build.gradle | 71 -------------------------------------------- app/build.gradle.kts | 70 +++++++++++++++++++++++++++++++++++++++++++ build.gradle | 32 -------------------- build.gradle.kts | 22 ++++++++++++++ settings.gradle | 1 - settings.gradle.kts | 11 +++++++ 6 files changed, 103 insertions(+), 104 deletions(-) delete mode 100644 app/build.gradle create mode 100644 app/build.gradle.kts delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index b73946a..0000000 --- a/app/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdk 32 - buildToolsVersion '32.0.0' - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - defaultConfig { - applicationId "com.todobom.opennotescanner" - minSdkVersion 21 - targetSdk 31 - versionCode 36 - versionName '1.0.36' - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - flavorDimensions "version" - productFlavors { - fdroid { - dimension "version" - applicationIdSuffix "" - versionNameSuffix "-fdroid" - } - gplay { - dimension "version" - applicationIdSuffix "" - versionNameSuffix "-gplay" - } - } - lintOptions { - abortOnError false - } -} - -repositories { - mavenCentral() -} - -def itextpdf_version = '7.2.2' -dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - - implementation "androidx.core:core-ktx:1.8.0" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - - implementation 'androidx.exifinterface:exifinterface:1.3.3' - testImplementation 'junit:junit:4.13.2' - implementation 'androidx.appcompat:appcompat:1.4.2' - 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' - implementation 'us.feras.mdv:markdownview:1.1.0' - implementation 'com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections' - implementation 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5' - implementation 'com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943' - implementation 'org.matomo.sdk:tracker:4.1.2' - implementation 'com.github.MikeOrtiz:TouchImageView:3.2.0' - implementation "com.itextpdf:kernel:$itextpdf_version" - implementation "com.itextpdf:layout:$itextpdf_version" - implementation "com.itextpdf:io:$itextpdf_version" -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..90d3e85 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,70 @@ +plugins { + id("com.android.application") + kotlin("android") +} + +android { + compileSdk = 32 + buildToolsVersion = "32.0.0" + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + defaultConfig { + applicationId = "com.todobom.opennotescanner" + minSdk = 21 + targetSdk = 31 + versionCode = 36 + versionName = "1.0.36" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + flavorDimensions += "version" + productFlavors { + create("fdroid") { + dimension = "version" + applicationIdSuffix = "" + versionNameSuffix = "-fdroid" + } + create("gplay") { + dimension = "version" + applicationIdSuffix = "" + versionNameSuffix = "-gplay" + } + } + lint { + abortOnError = false + } +} + +dependencies { + implementation(fileTree(mapOf("include" to listOf("*.jar"), "dir" to "libs"))) + + implementation("androidx.core:core-ktx:1.8.0") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21") + + implementation("androidx.exifinterface:exifinterface:1.3.3") + testImplementation("junit:junit:4.13.2") + implementation("androidx.appcompat:appcompat:1.4.2") + 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") + implementation("us.feras.mdv:markdownview:1.1.0") + implementation("com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections") + implementation("com.github.nostra13:Android-Universal-Image-Loader:v1.9.5") + implementation("com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943") + implementation("org.matomo.sdk:tracker:4.1.2") + implementation("com.github.MikeOrtiz:TouchImageView:3.2.0") + + val itextpdf_version = "7.2.2" + implementation("com.itextpdf:kernel:$itextpdf_version") + implementation("com.itextpdf:layout:$itextpdf_version") + implementation("com.itextpdf:io:$itextpdf_version") +} diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 9315b41..0000000 --- a/build.gradle +++ /dev/null @@ -1,32 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - ext.kotlin_version = '1.6.21' - repositories { - mavenCentral() - jcenter() - google() - } - dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - mavenCentral() - jcenter() - google() - maven { - url 'https://jitpack.io' - } - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..ebeeee5 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + mavenCentral() + jcenter() + google() + maven(url = "https://jitpack.io") + } + + dependencies { + classpath("com.android.tools.build:gradle:7.2.1") + classpath(kotlin("gradle-plugin", version = "1.6.21")) + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +tasks.register("clean", Delete::class) { + delete(rootProject.buildDir) +} diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index e7b4def..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..15a0f92 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,11 @@ +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + mavenCentral() + jcenter() + google() + maven(url = "https://jitpack.io") + } +} +rootProject.name = "Open Note Scanner" +include(":app") From b7a541776b0db57e606e5542202e37766e1dcf59 Mon Sep 17 00:00:00 2001 From: Patryk Mis Date: Tue, 7 Jun 2022 06:19:30 +0200 Subject: [PATCH 6/6] Bump Matomo SDK --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 90d3e85..0e57ce7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -60,7 +60,7 @@ dependencies { implementation("com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections") implementation("com.github.nostra13:Android-Universal-Image-Loader:v1.9.5") implementation("com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943") - implementation("org.matomo.sdk:tracker:4.1.2") + implementation("com.github.matomo-org:matomo-sdk-android:4.1.4") implementation("com.github.MikeOrtiz:TouchImageView:3.2.0") val itextpdf_version = "7.2.2"