builds for both 30 and 31 (with manual changes)

This commit is contained in:
Eric House 2022-11-13 10:52:41 -08:00
parent 7620e64516
commit c888e2621b
2 changed files with 19 additions and 9 deletions

View file

@ -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 {

View file

@ -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 )