From 27e9fc5774152147f24e7b949dd901f5bf7f8a20 Mon Sep 17 00:00:00 2001 From: Alireza Farahani Date: Thu, 4 Nov 2021 22:53:17 +0330 Subject: [PATCH 1/5] Gradle files cleanup --- README.md | 2 +- build.gradle | 2 +- cropper/build.gradle | 7 +++---- gradle.properties | 10 +--------- sample/build.gradle | 7 +++---- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9c86f43c..4da16478 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Only need if you run on devices under OS10 (SDK 29) - Go to app level `build.gradle` file -- Add this line inside ```android``` in build.gradle +- Add this line inside ```android``` in build.gradle (Android Gradle Plugin < 4.2) ```gradle compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/build.gradle b/build.gradle index 1ea94e84..1991aa32 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ subprojects { allprojects { repositories { mavenCentral() - maven { url "https://maven.google.com" } + google() maven { url "https://jitpack.io" } } } diff --git a/cropper/build.gradle b/cropper/build.gradle index c4953e42..59fc3d2a 100644 --- a/cropper/build.gradle +++ b/cropper/build.gradle @@ -25,11 +25,11 @@ afterEvaluate { } android { - compileSdkVersion rootProject.compileSdkVersion + compileSdk rootProject.compileSdkVersion defaultConfig { - minSdkVersion rootProject.minSdkVersion - targetSdkVersion rootProject.targetSdkVersion + minSdk rootProject.minSdkVersion + targetSdk rootProject.targetSdkVersion versionCode 1 versionName rootProject.libVersion } @@ -61,7 +61,6 @@ dependencies { implementation "androidx.exifinterface:exifinterface:$androidXExifVersion" implementation "androidx.core:core-ktx:$androidXCoreKtxVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$androidXLifeCycleVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" diff --git a/gradle.properties b/gradle.properties index 528da20c..94ca961c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,12 +37,4 @@ kapt.include.compile.classpath=false android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true - -# Once you have globally enabled the Daemon in this way, all your builds will take advantage of the -# speed boost, regardless of the version of Gradle a particular build uses. -org.gradle.daemon=true - -# Run with file system watching enabled -# https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:daemon_watch_fs -org.gradle.vfs.watch=true \ No newline at end of file +android.enableJetifier=true \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index aeb3b6f1..80dabc9e 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' android { - compileSdkVersion rootProject.compileSdkVersion + compileSdk rootProject.compileSdkVersion defaultConfig { - minSdkVersion 24 - targetSdkVersion rootProject.targetSdkVersion + minSdk 24 + targetSdk rootProject.targetSdkVersion versionCode 1 versionName '1.0' } @@ -31,6 +31,5 @@ dependencies { api project(':cropper') implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion" implementation "androidx.core:core-ktx:$androidXCoreKtxVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "com.google.android.material:material:$materialVersion" } From d48beecb4b73f890464a398fb4716820eab1837a Mon Sep 17 00:00:00 2001 From: Alireza Farahani Date: Mon, 15 Nov 2021 20:28:56 +0330 Subject: [PATCH 2/5] Remove Jetifier --- gradle.properties | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 94ca961c..e6ed4a8d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,7 +34,4 @@ kapt.include.compile.classpath=false # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn # Android plugin uses the appropriate AndroidX library instead of a Support Library. -android.useAndroidX=true - -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true \ No newline at end of file +android.useAndroidX=true \ No newline at end of file From f6f9d8aa0fc1d56ad3ef40d2f90c68c9bfe5438b Mon Sep 17 00:00:00 2001 From: Alireza Farahani Date: Mon, 15 Nov 2021 20:31:39 +0330 Subject: [PATCH 3/5] Remove irrelevant kapt properties --- gradle.properties | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index e6ed4a8d..c014b797 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,15 +21,6 @@ org.gradle.configureondemand=true # When set to true, Gradle will reuse task outputs from any previous build, when possible. org.gradle.caching=true -# Enable Kapt Incremental annotation processing requeste -kapt.incremental.apt=true - -# Decrease gradle builds time -kapt.use.worker.api=true - -# turn off AP discovery in compile path, and therefore turn on Compile Avoidance -kapt.include.compile.classpath=false - # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn From 0eed2f4ccf69284c89c6fe47b8ec5a8269096c31 Mon Sep 17 00:00:00 2001 From: Alireza Farahani Date: Mon, 15 Nov 2021 20:56:08 +0330 Subject: [PATCH 4/5] Remove unused dependencies --- cropper/build.gradle | 4 ---- versions.gradle | 5 ----- 2 files changed, 9 deletions(-) diff --git a/cropper/build.gradle b/cropper/build.gradle index 59fc3d2a..945c8b6c 100644 --- a/cropper/build.gradle +++ b/cropper/build.gradle @@ -61,8 +61,6 @@ dependencies { implementation "androidx.exifinterface:exifinterface:$androidXExifVersion" implementation "androidx.core:core-ktx:$androidXCoreKtxVersion" - implementation "androidx.lifecycle:lifecycle-runtime-ktx:$androidXLifeCycleVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" @@ -70,7 +68,5 @@ dependencies { testImplementation "androidx.test.ext:junit:$androidXJunitVersion" testImplementation "androidx.test:core:$androidXTestVersion" testImplementation "androidx.test:runner:$androidXTestVersion" - debugImplementation "androidx.fragment:fragment-testing:$androidXFragmentVersion" - testImplementation "org.robolectric:robolectric:$robolectricVersion" testImplementation "io.mockk:mockk:$mockkVersion" } diff --git a/versions.gradle b/versions.gradle index 42a7d7b8..3001a54e 100644 --- a/versions.gradle +++ b/versions.gradle @@ -23,17 +23,12 @@ ext { androidXAppCompatVersion = '1.3.1' androidXExifVersion = '1.3.3' androidXCoreKtxVersion = '1.6.0' - androidXLifeCycleVersion = '2.3.1' androidXJunitVersion = '1.1.3' - androidXFragmentVersion = '1.3.5' androidXTestVersion = '1.4.0' // when update to android 12, please uncomment PickImageContractTest && CropImageContractTest // JUnit junitVersion = '4.13.2' - // Robolectric - robolectricVersion = '4.5.1' - // Mockk mockkVersion = '1.12.0' } From 748296d33f3ae4cc5f07fd5929aa51085848ca68 Mon Sep 17 00:00:00 2001 From: Alireza Farahani Date: Mon, 15 Nov 2021 20:56:19 +0330 Subject: [PATCH 5/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2b276d..75e7d500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [unreleased] ### Removed - Removed ProGuard rule from ReadMe [#257](https://github.com/CanHub/Android-Image-Cropper/issues/257) +- Removed unused dependencies and settings from Gradle files [#265](https://github.com/CanHub/Android-Image-Cropper/issues/265) ## [3.3.6] - 05/11/21 ### Added