From c888e2621bbc6b540bfb743f52a9f35f142aca5e Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 13 Nov 2022 10:52:41 -0800 Subject: [PATCH] builds for both 30 and 31 (with manual changes) --- xwords4/android/app/build.gradle | 22 ++++++++++++------- .../java/org/eehouse/android/xw4/Perms23.java | 6 ++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 5e4cd8607..bd5c85b7e 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -112,6 +112,9 @@ android { flavorDimensions "variant"//, "abi" productFlavors { all { + buildConfigField "int", "FLAG_IMMUTABLE", "0" + buildConfigField "boolean", "BLUETOOTH_CONNECT", "true" + buildConfigField "boolean", "BLUETOOTH_SCAN", "true" buildConfigField "String", "JNI_LIB_NAME", "\"xwjni\"" buildConfigField "String", "DB_NAME", "\"xwdb\"" buildConfigField "String", "BUILD_INFO_NAME", "\"${BUILD_INFO_NAME}\"" @@ -150,9 +153,6 @@ android { xw4fdroid { dimension "variant" - targetSdkVersion 30 - compileSdkVersion 30 - buildConfigField "int", "FLAG_IMMUTABLE", "0" applicationId "org.eehouse.android.xw4" manifestPlaceholders = [ APP_ID: applicationId ] resValue "string", "app_name", "CrossWords" @@ -169,9 +169,15 @@ android { xw4d { dimension "variant" - targetSdkVersion 31 - compileSdkVersion 31 + + android { + targetSdkVersion 31 + compileSdkVersion 31 + } + buildConfigField "String", "BLUETOOTH_CONNECT", "android.Manifest.permission.BLUETOOTH_CONNECT" + buildConfigField "String", "BLUETOOTH_SCAN", "android.Manifest.permission.BLUETOOTH_SCAN" buildConfigField "int", "FLAG_IMMUTABLE", "android.app.PendingIntent.FLAG_IMMUTABLE" + buildConfigField "String", "DB_NAME", "\"xwddb\"" applicationId "org.eehouse.android.xw4dbg" resValue "string", "app_name", "CrossDbg" @@ -210,9 +216,6 @@ android { xw4Foss { dimension "variant" - targetSdkVersion 30 - compileSdkVersion 30 - buildConfigField "int", "FLAG_IMMUTABLE", "0" applicationId "org.eehouse.android.xw4" manifestPlaceholders = [ APP_ID: applicationId ] resValue "string", "app_name", "CrossWords" @@ -244,6 +247,9 @@ android { // dimension "abi" // versionCode 3 + VERSION_CODE_BASE // } + all { + buildConfigField "String", "compileSdkVersion", "\"$compileSdkVersion\"" + } } signingConfigs { diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java index b48b74b57..71a9f32fd 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/Perms23.java @@ -47,10 +47,14 @@ public class Perms23 { STORAGE(Manifest.permission.WRITE_EXTERNAL_STORAGE), SEND_SMS(Manifest.permission.SEND_SMS), RECEIVE_SMS(Manifest.permission.RECEIVE_SMS), - READ_CONTACTS(Manifest.permission.READ_CONTACTS); + READ_CONTACTS(Manifest.permission.READ_CONTACTS), + BLUETOOTH_CONNECT(BuildConfig.BLUETOOTH_CONNECT), + BLUETOOTH_SCAN(BuildConfig.BLUETOOTH_SCAN); private String m_str; + private boolean m_granted; private Perm(String str) { m_str = str; } + private Perm(boolean granted) { m_granted = granted; } public String getString() { return m_str; } public boolean isBanned( Context context )