Skip to content

Commit 3c76c2d

Browse files
authored
Merge pull request #940 from wordpress-mobile/upgrade-gradle-to-7.1.1-agp-to-4.2.2
Upgrade Gradle to 7.1.1 & Android Gradle Plugin to 4.2.2
2 parents bc57789 + c4e3f53 commit 3c76c2d

File tree

15 files changed

+139
-155
lines changed

15 files changed

+139
-155
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ annotations/
4242
!/.idea/codeStyleSettings.xml
4343
!/.idea/encodings.xml
4444
!/.idea/copyright/
45-
!/.idea/compiler.xml
4645
# Enforce plugins
4746
!/.idea/externalDependencies.xml
4847

.idea/compiler.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

app/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
apply plugin: 'com.android.application'
2-
apply plugin: 'kotlin-android'
1+
plugins {
2+
id "com.android.application"
3+
id "org.jetbrains.kotlin.android"
4+
}
35

46
android {
57
compileSdkVersion 28
6-
buildToolsVersion '28.0.3'
78

89
defaultConfig {
910
applicationId "org.wordpress.aztec"
1011
minSdkVersion 16
11-
targetSdkVersion 28
12+
targetSdkVersion commonTargetSdkVersion
1213
versionCode 1
1314
versionName "1.0"
1415
vectorDrawables.useSupportLibrary = true
@@ -39,7 +40,7 @@ dependencies {
3940
implementation project(':wordpress-comments')
4041
implementation project(':wordpress-shortcodes')
4142

42-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
43+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$gradle.ext.kotlinVersion"
4344

4445
implementation 'androidx.appcompat:appcompat:1.0.0'
4546
implementation "org.wordpress:utils:$wordpressUtilsVersion"

aztec/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android'
1+
plugins {
2+
id "com.android.library"
3+
id "org.jetbrains.kotlin.android"
4+
}
35

46
android {
57
compileSdkVersion 28
6-
buildToolsVersion "28.0.3"
78

89
defaultConfig {
910
minSdkVersion 16
10-
targetSdkVersion 28
11+
targetSdkVersion commonTargetSdkVersion
1112
versionName "1.0"
1213
vectorDrawables.useSupportLibrary = true
1314
}
@@ -46,7 +47,7 @@ android {
4647
}
4748

4849
dependencies {
49-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
50+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$gradle.ext.kotlinVersion"
5051

5152
implementation "org.ccil.cowan.tagsoup:tagsoup:$tagSoupVersion"
5253
implementation "org.jsoup:jsoup:$jSoupVersion"

aztec/src/main/kotlin/org/wordpress/aztec/EnhancedMovementMethod.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ object EnhancedMovementMethod : ArrowKeyMovementMethod() {
4646
layout.getLineBounds(line, lineRect)
4747

4848
val clickedWithinLineHeight = y >= lineRect.top && y <= lineRect.bottom
49-
val clickedOnSpanToTheLeftOfCursor = x in charPrevX..charX
50-
val clickedOnSpanToTheRightOfCursor = x in charX..charNextX
49+
val clickedOnSpanToTheLeftOfCursor = x.toFloat() in charPrevX..charX
50+
val clickedOnSpanToTheRightOfCursor = x.toFloat() in charX..charNextX
5151

5252
val clickedOnSpan = clickedWithinLineHeight &&
5353
(clickedOnSpanToTheLeftOfCursor || clickedOnSpanToTheRightOfCursor)

build.gradle

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
buildscript {
22
ext {
33
gradlePluginVersion = '3.3.1'
4-
kotlinVersion = '1.3.11'
54
kotlinCoroutinesVersion = '1.1.0'
65
supportLibVersion = '27.1.1'
76
tagSoupVersion = '1.2.1'
87
glideVersion = '4.10.0'
98
picassoVersion = '2.5.2'
10-
robolectricVersion = '4.3.1'
9+
robolectricVersion = '4.4'
1110
jUnitVersion = '4.12'
1211
jSoupVersion = '1.11.3'
1312
wordpressUtilsVersion = '1.21'
1413
espressoVersion = '3.0.1'
15-
}
16-
17-
repositories {
18-
google()
19-
jcenter()
20-
}
21-
22-
dependencies {
23-
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
24-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
14+
commonTargetSdkVersion = 30
2515
}
2616
}
2717

glide-loader/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android'
1+
plugins {
2+
id "com.android.library"
3+
id "org.jetbrains.kotlin.android"
4+
}
35

46
android {
57
compileSdkVersion 28
6-
buildToolsVersion "28.0.3"
78

89
defaultConfig {
910
minSdkVersion 16
10-
targetSdkVersion 28
11+
targetSdkVersion commonTargetSdkVersion
1112
versionCode 1
1213
versionName "1.0"
1314

@@ -22,7 +23,7 @@ android {
2223
}
2324

2425
dependencies {
25-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
26+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$gradle.ext.kotlinVersion"
2627

2728
implementation project(':aztec')
2829
implementation "com.github.bumptech.glide:glide:$glideVersion"

gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ android.useAndroidX=true
1919
# This option should only be used with decoupled projects. More details, visit
2020
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
2121
org.gradle.parallel=true
22-
23-
android.enableUnitTestBinaryResources=true

gradle/wrapper/gradle-wrapper.jar

1.43 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Oct 23 14:31:33 CEST 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

0 commit comments

Comments
 (0)