From a18364b12b1914a0e1309f15a78e3d187aeefa2d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 28 Jul 2023 12:52:44 -0700 Subject: [PATCH] Update dependencies used in hello-vulkan. --- hello-vulkan/app/build.gradle | 19 ++++++++++++++----- .../com/android/hellovk/VulkanActivity.kt | 2 ++ hello-vulkan/build.gradle | 4 ++-- hello-vulkan/gradle.properties | 3 +++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/hello-vulkan/app/build.gradle b/hello-vulkan/app/build.gradle index 572aeb199..346788896 100644 --- a/hello-vulkan/app/build.gradle +++ b/hello-vulkan/app/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'kotlin-android' android { compileSdk 33 - ndkVersion '25.1.8937393' + ndkVersion '25.2.9519653' defaultConfig { shaders { @@ -50,13 +50,22 @@ android { buildFeatures { prefab true } - + namespace 'com.android.hellovk' + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } } dependencies { - implementation 'androidx.core:core:1.9.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'androidx.games:games-activity:1.2.2-alpha01' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.games:games-activity:2.1.0-alpha01' } diff --git a/hello-vulkan/app/src/main/java/com/android/hellovk/VulkanActivity.kt b/hello-vulkan/app/src/main/java/com/android/hellovk/VulkanActivity.kt index c5588e151..ece0a3e18 100644 --- a/hello-vulkan/app/src/main/java/com/android/hellovk/VulkanActivity.kt +++ b/hello-vulkan/app/src/main/java/com/android/hellovk/VulkanActivity.kt @@ -69,6 +69,8 @@ class VulkanActivity : GameActivity() { return processed } + // TODO: Migrate to androidx.activity.OnBackPressedCallback. + // onBackPressed is deprecated. override fun onBackPressed() { System.gc() System.exit(0) diff --git a/hello-vulkan/build.gradle b/hello-vulkan/build.gradle index 75f4e58e7..e2a9a0849 100644 --- a/hello-vulkan/build.gradle +++ b/hello-vulkan/build.gradle @@ -19,14 +19,14 @@ buildscript { ext { - kotlin_version = '1.7.21' + kotlin_version = '1.8.20' } repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/hello-vulkan/gradle.properties b/hello-vulkan/gradle.properties index 9e6fce102..f6720ae0b 100644 --- a/hello-vulkan/gradle.properties +++ b/hello-vulkan/gradle.properties @@ -9,7 +9,10 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m diff --git a/hello-vulkan/gradle/wrapper/gradle-wrapper.properties b/hello-vulkan/gradle/wrapper/gradle-wrapper.properties index 41dfb8790..da1db5f04 100644 --- a/hello-vulkan/gradle/wrapper/gradle-wrapper.properties +++ b/hello-vulkan/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists