Skip to content

Commit

Permalink
[Build] Update Gradle to 8.12.1 and AGP to 8.8.1 (#21680)
Browse files Browse the repository at this point in the history
* Build: Upgrade agp to 8.6.1

Release Notes: https://developer.android.com/build/releases/
past-releases/agp-8-6-0-release-notes

* Build: Upgrade gradle to 8.9

Release Notes: https://docs.gradle.org/8.9/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.9
--distribution-type=all --gradle-distribution-sha256-sum=
258e722ec21e955201e31447b0aed14201765a3bfbae296a46cf60b70e66db70

* Build: Upgrade agp to 8.7.3

Release Notes: https://developer.android.com/build/releases/
past-releases/agp-8-7-0-release-notes

* Build: Upgrade gradle to 8.10.2

Release Notes: https://docs.gradle.org/8.10.2/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.10.2
--distribution-type=all --gradle-distribution-sha256-sum=
2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6

* Build: Upgrade agp to 8.8.0

Release Notes: https://developer.android.com/build/releases/
gradle-plugin

* Build: Upgrade gradle to 8.11.1

Release Notes: https://docs.gradle.org/8.11.1/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.11.1
--distribution-type=all --gradle-distribution-sha256-sum=
89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a

* Build: Upgrade gradle to 8.12.1

Release Notes: https://docs.gradle.org/8.12.1/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.12.1
--distribution-type=all --gradle-distribution-sha256-sum=
296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175

* Analysis: Suppress credential manager misuse lint warning on login mdl

This Lint warning can be suppressed because 'NoCredentialException' is
actually a subclass of 'GetCredentialException', which means that it is
already caught.

Warning Message: "Call to CredentialManager.getCredential without use of
NoCredentialException"

Explanation: "When calling CredentialManager.getCredential or
CredentialManager.getCredentialAsync, you should handle
NoCredentialException somewhere in your project.

More info: https://developer.android.com/identity/sign-in/
credential-manager#handle-exceptions"

* Analysis: Suppress set text i18n lint warnings on wordpress module

I18n is not actually needed on these specific cases.

Warning Messages: "Number formatting does not take into account locale
settings. Consider using String.format instead."

Explanation: "When calling TextView#setText
* Never call Number#toString() to format numbers; it will not handle
fraction separators and locale-specific digits properly. Consider using
String#format with proper format specifications (%d or %f) instead.
* Do not pass a string literal (e.g. "Hello") to display text. Hardcoded
text can not be properly translated to other languages. Consider using
Android resource strings instead.
* Do not build messages by concatenating text chunks. Such messages can
not be properly translated.

More info: https://developer.android.com/guide/topics/resources/
localization.html"

* Deps: Update gutenberg kit version to pr hash

This 'Gutenberg Kit' PR hash updates the library to that branch
version where 'Gradle & AGP' is also upgraded to version
'8.12.1 & 8.8.0' respectively.

Gutenberg Kit PR: https://github.com/wordpress-mobile/
GutenbergKit/pull/92

This step is required in order to check that these 'Gutenberg Kit'
related changes work as expected for JP/WPAndroid.

* Deps: Update gutenberg kit version to pr hash (v2)

This 'Gutenberg Kit' PR hash updates the library to that branch
version where 'Gradle & AGP' is also upgraded to version
'8.12.1 & 8.8.0' respectively.

Gutenberg Kit PR: https://github.com/wordpress-mobile/
GutenbergKit/pull/92

This step is required in order to check that these 'Gutenberg Kit'
related changes work as expected for JP/WPAndroid.

* Build: Upgrade agp to 8.8.1

Release Notes: https://developer.android.com/build/releases/
gradle-plugin

* Deps: Update gutenberg kit version to pr hash (v3)

This 'Gutenberg Kit' PR hash updates the library to that branch
version where 'Gradle & AGP' is also upgraded to version
'8.12.1 & 8.8.1' respectively.

Gutenberg Kit PR: https://github.com/wordpress-mobile/
GutenbergKit/pull/92

This step is required in order to check that these 'Gutenberg Kit'
related changes work as expected for JP/WPAndroid.

* Deps: Update gutenberg kit version to trunk hash

This 'Gutenberg Kit' trunk hash updates the library to that branch
version where 'Gradle & AGP' is also upgraded to version
'8.12.1 & 8.8.1' respectively.

Gutenberg Kit PR: https://github.com/wordpress-mobile/
GutenbergKit/pull/92

This step is required in order to check that these 'Gutenberg Kit'
related changes work as expected for JP/WPAndroid.
  • Loading branch information
ParaskP7 authored Feb 18, 2025
1 parent 7c3d45d commit 93ff765
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.history

import android.annotation.SuppressLint
import android.os.Bundle
import android.text.TextUtils
import android.view.View
Expand Down Expand Up @@ -46,13 +47,15 @@ class RevisionItemViewHolder(
diffLayout.visibility = View.VISIBLE

if (boundRevision.totalAdditions > 0) {
@SuppressLint("SetTextI18n")
diffAdditions.text = boundRevision.totalAdditions.toString()
diffAdditions.visibility = View.VISIBLE
} else {
diffAdditions.visibility = View.GONE
}

if (boundRevision.totalDeletions > 0) {
@SuppressLint("SetTextI18n")
diffDeletions.text = boundRevision.totalDeletions.toString()
diffDeletions.visibility = View.VISIBLE
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.jetpack.scan.details.adapters.viewholders

import android.annotation.SuppressLint
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ForegroundColorSpan
Expand Down Expand Up @@ -28,6 +29,7 @@ class ThreatContextLineViewHolder(
private fun updateLineNumber(itemState: ThreatContextLineItemState) {
with(binding.lineNumber) {
setBackgroundColor(ContextCompat.getColor(itemView.context, itemState.lineNumberBackgroundColorRes))
@SuppressLint("SetTextI18n")
text = itemState.line.lineNumber.toString()
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.mediapicker

import android.annotation.SuppressLint
import android.view.Menu
import android.view.MenuItem
import android.view.View
Expand Down Expand Up @@ -50,6 +51,7 @@ class MediaPickerActionModeCallback(private val viewModel: MediaPickerViewModel)
editItem.actionView?.findViewById<TextView>(R.id.customize_icon_count)?.let { editItemBadge ->
if (editItemUiModel.isCounterBadgeVisible) {
editItemBadge.visibility = View.VISIBLE
@SuppressLint("SetTextI18n")
editItemBadge.text = editItemUiModel.counterBadgeValue.toString()
} else {
editItemBadge.visibility = View.GONE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.stats.refresh

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.BlurMaskFilter
import android.graphics.BlurMaskFilter.Blur.NORMAL
Expand Down Expand Up @@ -46,6 +47,7 @@ class SubscribersChartMarkerView @Inject constructor(
val yValue = dataSet.values[index].y

val count = yValue.toLong()
@SuppressLint("SetTextI18n")
countView.text = count.toString()
val label = if (count > 1) {
R.string.stats_subscribers_marker_view_plural
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
agp = '8.5.1'
agp = '8.8.1'
airbnb-lottie = '6.6.2'
android-desugar = '2.1.4'
android-installreferrer = '2.2'
Expand Down Expand Up @@ -72,7 +72,7 @@ google-play-services-auth = '20.4.1'
google-services = '4.4.2'
gravatar = '2.3.1'
greenrobot-eventbus = '3.3.1'
gutenberg-kit = 'trunk-7894ff454cf2a889dd4634e031c1a0323d7f3d08'
gutenberg-kit = 'trunk-c7efee1859bacda21537ba144ac55c8abe4eaec8'
gutenberg-mobile = 'v1.121.0'
indexos-media-for-mobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a'
jackson-databind = '2.12.7.1'
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 3 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.login.webauthn

import android.annotation.SuppressLint
import android.content.Context
import android.os.CancellationSignal
import android.util.Log
Expand All @@ -18,6 +19,7 @@ import org.wordpress.android.fluxc.generated.AuthenticationActionBuilder
import org.wordpress.android.fluxc.store.AccountStore.FinishWebauthnChallengePayload
import java.util.concurrent.Executors

@SuppressLint("CredentialManagerMisuse")
class PasskeyRequest private constructor(
context: Context,
requestData: PasskeyRequestData,
Expand Down

0 comments on commit 93ff765

Please sign in to comment.