Skip to content

Commit

Permalink
Enh/gradle cleaning (#266)
Browse files Browse the repository at this point in the history
* Gradle files cleanup

* Remove Jetifier

* Remove irrelevant kapt properties
  • Loading branch information
Alireza-Farahani authored Nov 16, 2021
1 parent 675b7fc commit 2b3be06
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ subprojects {
allprojects {
repositories {
mavenCentral()
maven { url "https://maven.google.com" }
google()
maven { url "https://jitpack.io" }
}
}
Expand Down
11 changes: 3 additions & 8 deletions cropper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -61,17 +61,12 @@ 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"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"

testImplementation "junit:junit:$junitVersion"
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"
}
22 changes: 1 addition & 21 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,8 @@ 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
# 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

# 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
android.useAndroidX=true
7 changes: 3 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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"
}
5 changes: 0 additions & 5 deletions versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

0 comments on commit 2b3be06

Please sign in to comment.