From a09af4829cc4141094a4ea08d7d8cc63fec1c27f Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Sat, 3 Feb 2024 11:29:59 +0800 Subject: [PATCH] Update Android app config --- Android/build.gradle | 4 ++-- Android/gradle.properties | 4 +++- Android/gradle/wrapper/gradle-wrapper.properties | 2 +- wgpu-in-app/src/examples/msaa_line.rs | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Android/build.gradle b/Android/build.gradle index 0d2c743..9d5a79a 100644 --- a/Android/build.gradle +++ b/Android/build.gradle @@ -5,8 +5,8 @@ buildscript { } } plugins { - id 'com.android.application' version '7.4.1' apply false - id 'com.android.library' version '7.4.1' apply false + id 'com.android.application' version '8.2.2' apply false + id 'com.android.library' version '8.2.2' apply false id 'org.jetbrains.kotlin.android' version '1.7.0' apply false } diff --git a/Android/gradle.properties b/Android/gradle.properties index cd0519b..022338b 100644 --- a/Android/gradle.properties +++ b/Android/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/Android/gradle/wrapper/gradle-wrapper.properties b/Android/gradle/wrapper/gradle-wrapper.properties index 98ef64f..cc506d3 100644 --- a/Android/gradle/wrapper/gradle-wrapper.properties +++ b/Android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Jan 19 17:47:12 CST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/wgpu-in-app/src/examples/msaa_line.rs b/wgpu-in-app/src/examples/msaa_line.rs index df58c16..375782b 100644 --- a/wgpu-in-app/src/examples/msaa_line.rs +++ b/wgpu-in-app/src/examples/msaa_line.rs @@ -39,8 +39,10 @@ pub struct MSAALine { impl MSAALine { pub fn new(app_surface: &mut AppSurface) -> Self { // Only srgb format can show real MSAA effect on metal backend. - let msaa_format = app_surface.config.format.add_srgb_suffix(); - app_surface.sdq.update_config_format(msaa_format); + if app_surface.adapter.get_info().backend == wgpu::Backend::Metal { + let msaa_format = app_surface.config.format.add_srgb_suffix(); + app_surface.sdq.update_config_format(msaa_format); + } let config = &app_surface.config; let device = &app_surface.device;