diff --git a/build.gradle b/build.gradle index fcfbe8a9..27b56793 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.3.2' + classpath 'com.android.tools.build:gradle:8.6.0' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/google3/third_party/gradle/wrapper_files/gradle/libs.versions.toml b/google3/third_party/gradle/wrapper_files/gradle/libs.versions.toml deleted file mode 100644 index 4ac3234a..00000000 --- a/google3/third_party/gradle/wrapper_files/gradle/libs.versions.toml +++ /dev/null @@ -1,2 +0,0 @@ -# This file was generated by the Gradle 'init' task. -# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd491..1b33c55b 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e093..d4081da4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a42..23d15a93 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -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 @@ -112,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -203,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..5eed7ee8 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,94 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@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 ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/hellocardboard-android/build.gradle b/hellocardboard-android/build.gradle index 157f9102..a4188b6f 100644 --- a/hellocardboard-android/build.gradle +++ b/hellocardboard-android/build.gradle @@ -18,7 +18,7 @@ android { minSdkVersion 26 targetSdkVersion 35 versionCode 1 - versionName "1.30.0" + versionName "1.31.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' ndk { abiFilters 'armeabi-v7a', 'arm64-v8a' diff --git a/hellocardboard-ios/HelloCardboard-Info.plist b/hellocardboard-ios/HelloCardboard-Info.plist index ddcf49e6..744762e6 100644 --- a/hellocardboard-ios/HelloCardboard-Info.plist +++ b/hellocardboard-ios/HelloCardboard-Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.30.0 + 1.31.0 CFBundleVersion - 1.30.0 + 1.31.0 LSRequiresIPhoneOS NSCameraUsageDescription diff --git a/sdk/lens_distortion.cc b/sdk/lens_distortion.cc index c88c2193..fff71fa9 100644 --- a/sdk/lens_distortion.cc +++ b/sdk/lens_distortion.cc @@ -15,8 +15,12 @@ */ #include "lens_distortion.h" +#include +#include #include #include +#include +#include #include "include/cardboard.h" #include "screen_params.h" diff --git a/sdk/qrcode/android/qr_code.cc b/sdk/qrcode/android/qr_code.cc index 60278e44..d8cc6086 100644 --- a/sdk/qrcode/android/qr_code.cc +++ b/sdk/qrcode/android/qr_code.cc @@ -19,6 +19,7 @@ #include #include +#include #include "jni_utils/android/jni_utils.h" @@ -148,7 +149,7 @@ void saveDeviceParams(const uint8_t* uri, int size) { // Copy the uint8_t* to a jbyteArray jbyte* java_data_ptr = env->GetByteArrayElements(uri_jbyte_array, 0); - memcpy(java_data_ptr, uri, size); + std::memcpy(java_data_ptr, uri, size); env->SetByteArrayRegion(uri_jbyte_array, 0, size, java_data_ptr); // Get the Java class method to be called diff --git a/sdk/qrcode/ios/sdk.bundle/resolutions.csv b/sdk/qrcode/ios/sdk.bundle/resolutions.csv index 84cc2ec8..c920bf12 100644 --- a/sdk/qrcode/ios/sdk.bundle/resolutions.csv +++ b/sdk/qrcode/ios/sdk.bundle/resolutions.csv @@ -55,4 +55,9 @@ iPhone17.3,iPhone 16,460.0f iPhone17.4,iPhone 16 Plus,460.0f iPhone17.1,iPhone 16 Pro,460.0f iPhone17.2,iPhone 16 Pro Max,460.0f +iPhone17.5,iPhone 16e,460.0f +iPhone18.4,iPhone Air,460.0f +iPhone18.3,iPhone 17,460.0f +iPhone18.1,iPhone 17 Pro,460.0f +iPhone18.2,iPhone 17 Pro Max,460.0f iPod9.1,iPod touch (7th generation),326.0f \ No newline at end of file diff --git a/sdk/rendering/android/vulkan_distortion_renderer.cc b/sdk/rendering/android/vulkan_distortion_renderer.cc index 7219c8cf..3417fe92 100644 --- a/sdk/rendering/android/vulkan_distortion_renderer.cc +++ b/sdk/rendering/android/vulkan_distortion_renderer.cc @@ -553,8 +553,9 @@ class VulkanDistortionRenderer : public DistortionRenderer { PushConstantsObject push_constants{ .left_u = eye_description->left_u, .right_u = eye_description->right_u, - .top_v = eye_description->top_v, - .bottom_v = eye_description->bottom_v, + .top_v = eye_description->bottom_v, // Swap top and bottom to match the + // texture coordinates. + .bottom_v = eye_description->top_v, }; vkCmdPushConstants(command_buffer, pipeline_layout_, VK_SHADER_STAGE_VERTEX_BIT, 0, @@ -612,10 +613,12 @@ class VulkanDistortionRenderer : public DistortionRenderer { vkUpdateDescriptorSets(logical_device_, 1, descriptor_writes, 0, nullptr); // Update Viewport and scissor + // Swap the height to make the viewport bottom-left origin as expected by + // the distortion mesh. VkViewport viewport = {.x = static_cast(x), - .y = static_cast(y), + .y = static_cast(y + height), .width = static_cast(width), - .height = static_cast(height), + .height = -static_cast(height), .minDepth = 0.0, .maxDepth = 1.0}; diff --git a/sdk/sensors/accelerometer_data.h b/sdk/sensors/accelerometer_data.h index ea13a1e0..684d8143 100644 --- a/sdk/sensors/accelerometer_data.h +++ b/sdk/sensors/accelerometer_data.h @@ -16,6 +16,8 @@ #ifndef CARDBOARD_SDK_SENSORS_ACCELEROMETER_DATA_H_ #define CARDBOARD_SDK_SENSORS_ACCELEROMETER_DATA_H_ +#include + #include "util/vector.h" namespace cardboard { diff --git a/sdk/sensors/gyroscope_data.h b/sdk/sensors/gyroscope_data.h index cffbe1ec..6c3ae7b1 100644 --- a/sdk/sensors/gyroscope_data.h +++ b/sdk/sensors/gyroscope_data.h @@ -16,6 +16,8 @@ #ifndef CARDBOARD_SDK_SENSORS_GYROSCOPE_DATA_H_ #define CARDBOARD_SDK_SENSORS_GYROSCOPE_DATA_H_ +#include + #include "util/vector.h" namespace cardboard { diff --git a/sdk/sensors/lowpass_filter.h b/sdk/sensors/lowpass_filter.h index 9c135261..b2974871 100644 --- a/sdk/sensors/lowpass_filter.h +++ b/sdk/sensors/lowpass_filter.h @@ -17,6 +17,7 @@ #define CARDBOARD_SDK_SENSORS_LOWPASS_FILTER_H_ #include +#include #include #include "util/vector.h"