Skip to content

Commit

Permalink
Merge pull request #13500 from woocommerce/build/update-gradle-to-8.1…
Browse files Browse the repository at this point in the history
…2.1-and-agp-to-8.8

[Build] Update Gradle to 8.12.1 and AGP to 8.8
  • Loading branch information
ParaskP7 authored Feb 11, 2025
2 parents b483dbb + 92a2a6a commit 46bb108
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 7 deletions.
1 change: 0 additions & 1 deletion WooCommerce-Wear/lint.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- WARNING -->

Expand Down
3 changes: 2 additions & 1 deletion WooCommerce/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@
<service
android:name=".media.ProductImagesJobService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
android:permission="android.permission.BIND_JOB_SERVICE"
tools:ignore="NewApi" />

<!-- Provider for exposing file URIs on Android 7+ (required for camera) -->
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.woocommerce.android.ui.barcodescanner

import androidx.activity.compose.ManagedActivityResultLauncher
import androidx.annotation.StringRes
import androidx.camera.core.ExperimentalGetImage
import androidx.camera.core.ImageProxy
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
Expand Down Expand Up @@ -39,6 +40,7 @@ class BarcodeScanningViewModel @Inject constructor(
fun startCodesRecognition() {
frameChannel = createChannel()
processingJob = launch {
@ExperimentalGetImage
for (frame in frameChannel) {
codeScanner.recogniseCode(frame).let { status ->
when (status) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.woocommerce.android.ui.orders.creation

import android.os.Parcelable
import androidx.camera.core.ExperimentalGetImage
import androidx.camera.core.ImageProxy
import com.woocommerce.android.ui.orders.creation.GoogleBarcodeFormatMapper.BarcodeFormat
import kotlinx.parcelize.Parcelize

interface CodeScanner {
@ExperimentalGetImage
suspend fun recogniseCode(imageProxy: ImageProxy): CodeScannerStatus
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.woocommerce.android.ui.orders.creation

import androidx.camera.core.ExperimentalGetImage
import androidx.camera.core.ImageProxy
import com.google.mlkit.vision.barcode.BarcodeScanner
import com.google.mlkit.vision.barcode.common.Barcode
Expand All @@ -14,8 +15,8 @@ class GoogleMLKitCodeScanner @Inject constructor(
private val barcodeFormatMapper: GoogleBarcodeFormatMapper,
private val inputImageProvider: MediaImageProvider,
) : CodeScanner {
@ExperimentalGetImage
override suspend fun recogniseCode(imageProxy: ImageProxy): CodeScannerStatus = suspendCoroutine { cont ->
@androidx.camera.core.ExperimentalGetImage
val image = inputImageProvider.provideImage(imageProxy)

val barcodeTask = barcodeScanner.process(image)
Expand Down
2 changes: 1 addition & 1 deletion 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.0'
android-billingclient = '5.0.0'
android-desugar = '2.1.3'
android-security-lint = '1.0.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

0 comments on commit 46bb108

Please sign in to comment.