Skip to content

Commit d382c97

Browse files
authored
Gradle: Use Java 11, Android Gradle Plugin 8.0.2 & update all dependencies. (#577)
1 parent 6bcf718 commit d382c97

15 files changed

Lines changed: 94 additions & 42 deletions

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ continuation_indent_size=2
44
insert_final_newline=true
55
ij_kotlin_allow_trailing_comma=true
66
ij_kotlin_allow_trailing_comma_on_call_site=true
7-
ktlint_disabled_rules=annotation,argument-list-wrapping,spacing-between-declarations-with-annotations,filename
7+
ktlint_standard_annotation=disabled
8+
ktlint_standard_argument-list-wrapping=disabled
9+
ktlint_standard_spacing-between-declarations-with-annotations=disabled
10+
ktlint_standard_filename=disabled
11+
ktlint_standard_property-naming=disabled

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
java_version: [11]
12+
java_version: [17]
1313

1414
steps:
1515
- name: Checkout

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717

18-
- name: Install JDK 11
18+
- name: Install JDK 17
1919
uses: actions/setup-java@v3
2020
with:
2121
distribution: 'zulu'
22-
java-version: 11
22+
java-version: 17
2323

2424
- name: Setup gradle
2525
uses: gradle/gradle-build-action@v2

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717

18-
- name: Install JDK 11
18+
- name: Install JDK 17
1919
uses: actions/setup-java@v3
2020
with:
2121
distribution: 'zulu'
22-
java-version: 11
22+
java-version: 17
2323

2424
- name: Setup gradle
2525
uses: gradle/gradle-build-action@v2

build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
buildscript {
2-
repositories {
3-
mavenCentral()
4-
google()
5-
gradlePluginPortal()
6-
}
72
dependencies {
83
classpath(libs.plugin.android.cache.fix)
94
classpath(libs.plugin.androidgradleplugin)

cropper/build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ plugins {
55
id("org.jetbrains.kotlin.plugin.parcelize")
66
id("com.vanniktech.maven.publish")
77
id("app.cash.licensee")
8-
id("dev.chrisbanes.paparazzi")
8+
id("app.cash.paparazzi")
99
}
1010

1111
licensee {
1212
allow("Apache-2.0")
1313
}
1414

15+
kotlin {
16+
jvmToolchain {
17+
languageVersion.set(JavaLanguageVersion.of(11))
18+
}
19+
}
20+
1521
android {
1622
namespace = "com.canhub.cropper"
1723

@@ -25,6 +31,11 @@ android {
2531
viewBinding = true
2632
}
2733

34+
compileOptions {
35+
sourceCompatibility = JavaVersion.VERSION_11
36+
targetCompatibility = JavaVersion.VERSION_11
37+
}
38+
2839
testOptions {
2940
unitTests {
3041
isIncludeAndroidResources = true

cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,14 +1558,18 @@ class CropImageView @JvmOverloads constructor(
15581558
* To set square/circle crop shape set aspect ratio to 1:1.
15591559
*/
15601560
enum class CropShape {
1561-
RECTANGLE, OVAL, RECTANGLE_VERTICAL_ONLY, RECTANGLE_HORIZONTAL_ONLY
1561+
RECTANGLE,
1562+
OVAL,
1563+
RECTANGLE_VERTICAL_ONLY,
1564+
RECTANGLE_HORIZONTAL_ONLY,
15621565
}
15631566

15641567
/**
15651568
* Possible crop corner shape
15661569
*/
15671570
enum class CropCornerShape {
1568-
RECTANGLE, OVAL
1571+
RECTANGLE,
1572+
OVAL,
15691573
}
15701574

15711575
/**

cropper/src/main/kotlin/com/canhub/cropper/CropWindowMoveHandler.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ internal class CropWindowMoveHandler(
1919

2020
/** The type of crop window move that is handled. */
2121
internal enum class Type {
22-
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, LEFT, TOP, RIGHT, BOTTOM, CENTER
22+
TOP_LEFT,
23+
TOP_RIGHT,
24+
BOTTOM_LEFT,
25+
BOTTOM_RIGHT,
26+
LEFT,
27+
TOP,
28+
RIGHT,
29+
BOTTOM,
30+
CENTER,
2331
}
2432

2533
internal companion object {

gradle/libs.versions.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@ minSdk = "21"
33
compileSdk = "33"
44
targetSdk = "33"
55

6-
androidgradleplugin = "7.3.1"
7-
kotlin = "1.7.20"
8-
kotlinxcoroutines = "1.6.4"
9-
ktlint = "0.47.1"
6+
androidgradleplugin = "8.0.2"
7+
kotlin = "1.8.22"
8+
kotlinxcoroutines = "1.7.2"
9+
ktlint = "0.50.0"
1010

1111
[libraries]
12-
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.6.0" }
13-
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.5.1" }
12+
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.7.2" }
13+
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
1414
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.9.0" }
15-
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version = "1.3.4" }
16-
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.5.3" }
17-
androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.1.3" }
15+
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version = "1.3.6" }
16+
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.6.0" }
17+
androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.1.5" }
1818
junit = { module = "junit:junit", version = "4.13.2" }
1919
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxcoroutines" }
2020
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxcoroutines" }
21-
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version = "2.9.1" }
22-
material = { module = "com.google.android.material:material", version = "1.6.1" }
23-
mock = { module = "io.mockk:mockk", version = "1.13.2" }
24-
plugin-android-cache-fix = { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version = "2.6.0" }
21+
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version = "2.12" }
22+
material = { module = "com.google.android.material:material", version = "1.9.0" }
23+
mock = { module = "io.mockk:mockk", version = "1.13.5" }
24+
plugin-android-cache-fix = { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version = "2.7.2" }
2525
plugin-androidgradleplugin = { module = "com.android.tools.build:gradle", version.ref = "androidgradleplugin" }
26-
plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.7.20" }
26+
plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.8.20" }
2727
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
28-
plugin-licensee = { module = "app.cash.licensee:licensee-gradle-plugin", version = "1.5.0" }
29-
plugin-paparazzi = { module = "dev.chrisbanes.paparazzi:paparazzi-gradle-plugin", version = "1.1.0-sdk33-alpha02" }
30-
plugin-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.22.0" }
28+
plugin-licensee = { module = "app.cash.licensee:licensee-gradle-plugin", version = "1.7.0" }
29+
plugin-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version = "1.3.0" }
30+
plugin-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.25.3" }
3131
robolectric = { module = "org.robolectric:robolectric", version = "4.9" }
3232
timber = { module = "com.jakewharton.timber:timber", version = "5.0.1" }
3333

3434
[plugins]
35-
codequalitytools = { id = "com.vanniktech.code.quality.tools", version = "0.22.0" }
35+
codequalitytools = { id = "com.vanniktech.code.quality.tools", version = "0.23.0" }
3636
dependencygraphgenerator = { id = "com.vanniktech.dependency.graph.generator", version = "0.8.0" }

gradle/wrapper/gradle-wrapper.jar

2.56 KB
Binary file not shown.

0 commit comments

Comments
 (0)