Skip to content

Commit 51fbcb9

Browse files
authored
Merge pull request #9044 from wordpress-mobile/gradle-4-10
Update to Gradle 4.10.3/Android Gradle plugin 3.2.1
2 parents 4cba045 + 0277f36 commit 51fbcb9

File tree

17 files changed

+43
-95
lines changed

17 files changed

+43
-95
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ android:
3030
- extra-android-support
3131
- platform-tools
3232
- tools
33-
- build-tools-27.0.3
33+
- build-tools-28.0.3
3434
- android-27
3535

3636
env:

WordPress/build.gradle

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66
dependencies {
77
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
8-
classpath 'io.fabric.tools:gradle:1.+'
8+
classpath 'io.fabric.tools:gradle:1.27.0'
99
classpath 'com.google.gms:google-services:3.2.0'
1010
}
1111
}
@@ -39,7 +39,7 @@ android {
3939
}
4040

4141
compileSdkVersion 27
42-
buildToolsVersion '27.0.3'
42+
buildToolsVersion '28.0.3'
4343

4444
defaultConfig {
4545
applicationId "org.wordpress.android"
@@ -162,7 +162,7 @@ dependencies {
162162
implementation 'org.wordpress:graphview:3.4.0'
163163
implementation 'org.wordpress:persistentedittext:1.0.2'
164164
implementation 'org.wordpress:emailchecker2:1.1.0'
165-
implementation 'com.squareup.okio:okio:1.13.0'
165+
implementation 'com.squareup.okio:okio:1.14.0'
166166
implementation 'org.apache.commons:commons-text:1.1'
167167
implementation 'com.airbnb.android:lottie:2.0.0-rc2'
168168
implementation 'com.facebook.shimmer:shimmer:0.3.0'
@@ -186,7 +186,7 @@ dependencies {
186186
androidTestImplementation 'org.objenesis:objenesis:2.1'
187187
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
188188
androidTestImplementation 'com.squareup.okhttp:mockwebserver:2.7.5'
189-
androidTestImplementation 'com.squareup.okio:okio:1.13.0'
189+
androidTestImplementation 'com.squareup.okio:okio:1.14.0'
190190
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2', {
191191
exclude group: 'com.android.support', module: 'support-annotations'
192192
}
@@ -251,18 +251,6 @@ configurations.all {
251251
exclude group: 'org.wordpress', module: 'analytics'
252252
}
253253

254-
task copyGoogleServicesExampleFile(type: Copy) {
255-
from('.')
256-
into('.')
257-
include('google-services.json-example')
258-
rename('google-services.json-example', 'google-services.json')
259-
}
260-
261-
task copyGoogleServicesBuddybuildFile(type: Copy) {
262-
from(file(System.getenv("BUDDYBUILD_SECURE_FILES") + "/google-services.json"))
263-
into('.')
264-
}
265-
266254
task generateCrashlyticsConfig(group: "generate", description: "Generate Crashlytics config") {
267255
def outputFile = new File("${rootDir}/WordPress/crashlytics.properties")
268256
def inputFile = checkGradlePropertiesFile()
@@ -301,11 +289,11 @@ android.buildTypes.all { buildType ->
301289
// If Google services file doesn't exist...
302290
if (!file("google-services.json").exists()) {
303291
// ... copy example file.
304-
if (!file(System.getenv("BUDDYBUILD_SECURE_FILES") + "/google-services.json").exists()) {
305-
tasks.copyGoogleServicesExampleFile.execute()
306-
// ... copy Buddybuild file.
307-
} else {
308-
tasks.copyGoogleServicesBuddybuildFile.execute()
292+
copy {
293+
from(".")
294+
into(".")
295+
include("google-services.json-example")
296+
rename('google-services.json-example', 'google-services.json')
309297
}
310298
}
311299

@@ -318,11 +306,7 @@ android.buildTypes.all { buildType ->
318306
def checkGradlePropertiesFile() {
319307
def inputFile = file("${rootDir}/gradle.properties")
320308
if (!inputFile.exists()) {
321-
// Try the BuddyBuild provided file if it's there
322-
inputFile = file(System.getenv("BUDDYBUILD_SECURE_FILES") + "/gradle.properties")
323-
if (!inputFile.exists()) {
324-
throw new StopActionException("Build configuration file gradle.properties doesn't exist, follow README instructions")
325-
}
309+
throw new StopActionException("Build configuration file gradle.properties doesn't exist, follow README instructions")
326310
}
327311
return inputFile
328312
}

WordPress/lint-baseline.xml

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<issues format="4" by="lint 3.1.3">
33

4-
<issue
5-
id="DefaultLocale"
6-
message="Implicitly using the default locale is a common source of bugs: Use `toUpperCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
7-
errorLine1=" matched.appendReplacement(sb, matched.group(1).toUpperCase());"
8-
errorLine2=" ~~~~~~~~~~~">
9-
<location
10-
file="src/main/java/com/horcrux/svg/RenderableShadowNode.java"
11-
line="400"
12-
column="60"/>
13-
</issue>
14-
15-
<issue
16-
id="WrongCall"
17-
message="Suspicious method call; should probably call &quot;`layout`&quot; rather than &quot;`onLayout`&quot;"
18-
errorLine1=" onLayout(false, getLeft(), getTop(), getRight(), getBottom());"
19-
errorLine2=" ~~~~~~~~">
20-
<location
21-
file="src/main/java/com/github/godness84/RNRecyclerViewList/RecyclerViewBackedScrollView.java"
22-
line="364"
23-
column="21"/>
24-
</issue>
25-
264
<issue
275
id="ClickableViewAccessibility"
286
message="Custom view ``EditTextWithKeyBackListener`` has `setOnTouchListener` called on it but does not override `performClick`"
@@ -192,31 +170,15 @@
192170
column="97"/>
193171
</issue>
194172

195-
<issue
196-
id="ManifestOrder"
197-
severity="Warning"
198-
message="`&lt;uses-permission>` tag appears after `&lt;application>` tag"
199-
category="Correctness"
200-
priority="5"
201-
summary="Incorrect order of elements in manifest"
202-
explanation="The &lt;application> tag should appear after the elements which declare which version you need, which features you need, which libraries you need, and so on. In the past there have been subtle bugs (such as themes not getting applied correctly) when the `&lt;application>` tag appears before some of these other elements, so it&apos;s best to order your manifest in the logical dependency order."
203-
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.DISABLE_KEYGUARD&quot;/>"
204-
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
205-
<location
206-
file="../WordPress/src/debug/AndroidManifest.xml"
207-
line="18"
208-
column="5"/>
209-
</issue>
210-
211173
<issue
212174
id="GradleDependency"
213175
severity="Warning"
214-
message="A newer version of com.android.tools.build:gradle than 3.1.2 is available: 3.2.1"
176+
message="A newer version of com.android.tools.build:gradle than 3.2.1 is available: 3.3.0"
215177
category="Correctness"
216178
priority="4"
217179
summary="Obsolete Gradle Dependency"
218180
explanation="This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find."
219-
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.1.2&apos;"
181+
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.2.1&apos;"
220182
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
221183
quickfix="studio">
222184
<location
@@ -228,12 +190,12 @@
228190
<issue
229191
id="GradleDependency"
230192
severity="Warning"
231-
message="A newer version of com.android.tools.build:gradle than 3.1.2 is available: 3.2.1"
193+
message="A newer version of com.android.tools.build:gradle than 3.2.1 is available: 3.3.0"
232194
category="Correctness"
233195
priority="4"
234196
summary="Obsolete Gradle Dependency"
235197
explanation="This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find."
236-
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.1.2&apos;"
198+
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.2.1&apos;"
237199
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
238200
quickfix="studio">
239201
<location
@@ -245,12 +207,12 @@
245207
<issue
246208
id="GradleDependency"
247209
severity="Warning"
248-
message="A newer version of com.android.tools.build:gradle than 3.1.2 is available: 3.2.1"
210+
message="A newer version of com.android.tools.build:gradle than 3.2.1 is available: 3.3.0"
249211
category="Correctness"
250212
priority="4"
251213
summary="Obsolete Gradle Dependency"
252214
explanation="This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find."
253-
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.1.2&apos;"
215+
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.2.1&apos;"
254216
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
255217
quickfix="studio">
256218
<location
@@ -262,12 +224,12 @@
262224
<issue
263225
id="GradleDependency"
264226
severity="Warning"
265-
message="A newer version of com.android.tools.build:gradle than 3.1.3 is available: 3.2.1"
227+
message="A newer version of com.android.tools.build:gradle than 3.2.1 is available: 3.3.0"
266228
category="Correctness"
267229
priority="4"
268230
summary="Obsolete Gradle Dependency"
269231
explanation="This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find."
270-
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.1.3&apos;"
232+
errorLine1=" classpath &apos;com.android.tools.build:gradle:3.2.1&apos;"
271233
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
272234
quickfix="studio">
273235
<location

WordPress/lint.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@
8383
<ignore regexp="java-common-1.13.jar" />
8484
</issue>
8585

86-
<issue id="IconLauncherFormat">
87-
<ignore path="src/main/res/mipmap-anydpi-v26/app_icon.xml" />
88-
</issue>
89-
9086
<issue id="UnusedResources" severity="error">
9187
<ignore path="**/WordPressEditor/**" />
9288
<ignore path="**/WordPressLoginFlow/**" />

WordPress/src/main/java/org/wordpress/android/util/analytics/service/InstallationReferrerServiceLogic.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public void onInstallReferrerSetupFinished(int responseCode) {
104104
// if this is retried but the error persists
105105
AppLog.i(T.UTILS, "installation referrer: service unavailable");
106106
break;
107+
case InstallReferrerResponse.DEVELOPER_ERROR:
108+
break;
109+
case InstallReferrerResponse.SERVICE_DISCONNECTED:
110+
break;
107111
}
108112

109113
stopService();

WordPress/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@
14111411
<!-- Error Messages -->
14121412
<!-- The following messages can\'t be factorized due to i18n -->
14131413
<string name="error_refresh_posts">Posts couldn\'t be refreshed at this time</string>
1414-
<string name="error_refresh_pages">Pages couldn\'t be refreshed at this time</string>
1414+
<string name="error_refresh_pages" tools:ignore="UnusedResources">Pages couldn\'t be refreshed at this time</string>
14151415
<string name="error_refresh_comments">Comments couldn\'t be refreshed at this time</string>
14161416
<string name="error_refresh_comments_showing_older">Comments couldn\'t be refreshed at this time - showing older comments</string>
14171417
<string name="error_refresh_stats">Stats couldn\'t be refreshed at this time</string>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.1.3'
12+
classpath 'com.android.tools.build:gradle:3.2.1'
1313
classpath 'com.automattic.android:fetchstyle:1.1'
1414
}
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Mar 28 12:21:02 CEST 2018
1+
#Tue Jan 22 14:59:58 GMT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

libs/analytics/WordPressAnalytics/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.1.2'
7+
classpath 'com.android.tools.build:gradle:3.2.1'
88
classpath 'com.novoda:bintray-release:0.8.1'
99
}
1010
}
@@ -27,7 +27,7 @@ dependencies {
2727

2828
android {
2929
compileSdkVersion 27
30-
buildToolsVersion "27.0.3"
30+
buildToolsVersion "28.0.3"
3131

3232
defaultConfig {
3333
versionName "1.3.0"

libs/editor/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android:
77
- extra-android-support
88
- platform-tools
99
- tools
10-
- build-tools-27.0.3
10+
- build-tools-28.0.3
1111
- android-27
1212

1313
env:

0 commit comments

Comments
 (0)