diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index def74f971..ee958f136 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -83,6 +83,16 @@ android { variant.buildConfigField "short", "CLIENT_VERS_RELAY", "$INITIAL_CLIENT_VERS" } + + /* Variants: + * + * GPlay: for the Google Play store, include FCM but not SMS-data. + * + * FDroid: for the f-droid store, includes SMS-data but not FCM. + * + * Foss: released via SourceForge and Github, and auto-upgraded + * within the app. Includes both SMS-data and FCM + */ flavorDimensions "variant"//, "abi" productFlavors { @@ -105,7 +115,7 @@ android { buildConfigField "boolean", "HAVE_PASSWORD", "false" } - xw4NoSMS { + xw4GPlay { dimension "variant" applicationId "org.eehouse.android.xw4" manifestPlaceholders = [ APP_ID: applicationId ] @@ -116,7 +126,7 @@ android { buildConfigField "int", "VARIANT_CODE", "1" buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\"" resValue "string", "nfc_aid", "$NFC_AID_XW4" - externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4NoSMS'] + externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4GPlay'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID] } @@ -158,7 +168,7 @@ android { buildConfigField "boolean", "HAVE_KNOWN_PLAYERS", "true" } - xw4dNoSMS { + xw4dGPlay { dimension "variant" applicationId "org.eehouse.android.xw4dbg" buildConfigField "String", "DB_NAME", "\"xwddb\"" @@ -167,18 +177,18 @@ android { resValue "string", "invite_prefix", "/andd/" resValue "string", "newgame_scheme", "newxwgamed" buildConfigField "boolean", "WIDIR_ENABLED", "true" - buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug NoSMS\"" + buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug GPlay\"" buildConfigField "int", "VARIANT_CODE", "4" buildConfigField "boolean", "REPORT_LOCKS", "true" buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\"" resValue "string", "nfc_aid", "$NFC_AID_XW4d" - externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4dNoSMS'] + externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4dGPlay'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID] externalNativeBuild.ndkBuild.cFlags += ['-DXWFEATURE_KNOWNPLAYERS'] buildConfigField "boolean", "HAVE_KNOWN_PLAYERS", "true" } - xw4SMS { + xw4Foss { dimension "variant" applicationId "org.eehouse.android.xw4" manifestPlaceholders = [ APP_ID: applicationId ] @@ -189,7 +199,7 @@ android { buildConfigField "int", "VARIANT_CODE", "5" buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\"" resValue "string", "nfc_aid", "$NFC_AID_XW4" - externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4SMS'] + externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4Foss'] externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID] } @@ -279,12 +289,12 @@ android { // directories here. AS doesn't respect what's set here: it'll // compile, but post-install app launch and source-level // debugging don't work. - xw4NoSMS { + xw4GPlay { release { - jniLibs.srcDir "../libs-xw4NoSMSRelease" + jniLibs.srcDir "../libs-xw4GPlayRelease" } debug { - jniLibs.srcDir "../libs-xw4NoSMSDebug" + jniLibs.srcDir "../libs-xw4GPlayDebug" } } xw4d { @@ -295,20 +305,20 @@ android { jniLibs.srcDir "../libs-xw4dDebug" } } - xw4dNoSMS { + xw4dGPlay { release { - jniLibs.srcDir "../libs-xw4dNoSMSRelease" + jniLibs.srcDir "../libs-xw4dGPlayRelease" } debug { - jniLibs.srcDir "../libs-xw4dNoSMSDebug" + jniLibs.srcDir "../libs-xw4dGPlayDebug" } } - xw4SMS { + xw4Foss { release { - jniLibs.srcDir "../libs-xw4SMSRelease" + jniLibs.srcDir "../libs-xw4FossRelease" } debug { - jniLibs.srcDir "../libs-xw4SMSDebug" + jniLibs.srcDir "../libs-xw4FossDebug" } } xw4fdroid { @@ -374,7 +384,7 @@ task myPreBuild(dependsOn: ['mkImages', 'copyLocStrings', 'mkXml', 'copyStringsXw4D', - 'copyStringsXw4DNoSMS']) { + 'copyStringsXw4DGPlay']) { } preBuild.dependsOn myPreBuild @@ -392,11 +402,11 @@ task copyStringsXw4D(type: Exec) { "src/xw4d/res/values/strings.xml" } -task copyStringsXw4DNoSMS(type: Exec) { +task copyStringsXw4DGPlay(type: Exec) { workingDir './' environment.put('APPNAME', 'CrossDbg') commandLine 'make', '-f', '../scripts/Variant.mk', - "src/xw4dNoSMS/res/values/strings.xml" + "src/xw4dGPlay/res/values/strings.xml" } task makeBuildAssets() { diff --git a/xwords4/android/app/src/xw4SMS/AndroidManifest.xml b/xwords4/android/app/src/xw4Foss/AndroidManifest.xml similarity index 100% rename from xwords4/android/app/src/xw4SMS/AndroidManifest.xml rename to xwords4/android/app/src/xw4Foss/AndroidManifest.xml diff --git a/xwords4/android/app/src/xw4Foss/google-services.json b/xwords4/android/app/src/xw4Foss/google-services.json new file mode 120000 index 000000000..0726189e9 --- /dev/null +++ b/xwords4/android/app/src/xw4Foss/google-services.json @@ -0,0 +1 @@ +../xw4GPlay/google-services.json \ No newline at end of file diff --git a/xwords4/android/app/src/xw4Foss/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4Foss/java/org/eehouse/android/xw4/FBMService.java new file mode 120000 index 000000000..66224b90b --- /dev/null +++ b/xwords4/android/app/src/xw4Foss/java/org/eehouse/android/xw4/FBMService.java @@ -0,0 +1 @@ +../../../../../../xw4GPlay/java/org/eehouse/android/xw4/FBMService.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4NoSMS/AndroidManifest.xml b/xwords4/android/app/src/xw4GPlay/AndroidManifest.xml similarity index 100% rename from xwords4/android/app/src/xw4NoSMS/AndroidManifest.xml rename to xwords4/android/app/src/xw4GPlay/AndroidManifest.xml diff --git a/xwords4/android/app/src/xw4NoSMS/google-services.json b/xwords4/android/app/src/xw4GPlay/google-services.json similarity index 100% rename from xwords4/android/app/src/xw4NoSMS/google-services.json rename to xwords4/android/app/src/xw4GPlay/google-services.json diff --git a/xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4GPlay/java/org/eehouse/android/xw4/FBMService.java similarity index 100% rename from xwords4/android/app/src/xw4NoSMS/java/org/eehouse/android/xw4/FBMService.java rename to xwords4/android/app/src/xw4GPlay/java/org/eehouse/android/xw4/FBMService.java diff --git a/xwords4/android/app/src/xw4SMS/google-services.json b/xwords4/android/app/src/xw4SMS/google-services.json deleted file mode 120000 index 39334c474..000000000 --- a/xwords4/android/app/src/xw4SMS/google-services.json +++ /dev/null @@ -1 +0,0 @@ -../xw4NoSMS/google-services.json \ No newline at end of file diff --git a/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java deleted file mode 120000 index d9f24f9b7..000000000 --- a/xwords4/android/app/src/xw4SMS/java/org/eehouse/android/xw4/FBMService.java +++ /dev/null @@ -1 +0,0 @@ -../../../../../../xw4NoSMS/java/org/eehouse/android/xw4/FBMService.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4dNoSMS/AndroidManifest.xml b/xwords4/android/app/src/xw4dGPlay/AndroidManifest.xml similarity index 100% rename from xwords4/android/app/src/xw4dNoSMS/AndroidManifest.xml rename to xwords4/android/app/src/xw4dGPlay/AndroidManifest.xml diff --git a/xwords4/android/app/src/xw4dGPlay/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4dGPlay/java/org/eehouse/android/xw4/FBMService.java new file mode 120000 index 000000000..66224b90b --- /dev/null +++ b/xwords4/android/app/src/xw4dGPlay/java/org/eehouse/android/xw4/FBMService.java @@ -0,0 +1 @@ +../../../../../../xw4GPlay/java/org/eehouse/android/xw4/FBMService.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4dNoSMS/res/drawable/icon48x48.png b/xwords4/android/app/src/xw4dGPlay/res/drawable/icon48x48.png similarity index 100% rename from xwords4/android/app/src/xw4dNoSMS/res/drawable/icon48x48.png rename to xwords4/android/app/src/xw4dGPlay/res/drawable/icon48x48.png diff --git a/xwords4/android/app/src/xw4dNoSMS/res/drawable/notify.png b/xwords4/android/app/src/xw4dGPlay/res/drawable/notify.png similarity index 100% rename from xwords4/android/app/src/xw4dNoSMS/res/drawable/notify.png rename to xwords4/android/app/src/xw4dGPlay/res/drawable/notify.png diff --git a/xwords4/android/app/src/xw4dNoSMS/java/org/eehouse/android/xw4/FBMService.java b/xwords4/android/app/src/xw4dNoSMS/java/org/eehouse/android/xw4/FBMService.java deleted file mode 120000 index d9f24f9b7..000000000 --- a/xwords4/android/app/src/xw4dNoSMS/java/org/eehouse/android/xw4/FBMService.java +++ /dev/null @@ -1 +0,0 @@ -../../../../../../xw4NoSMS/java/org/eehouse/android/xw4/FBMService.java \ No newline at end of file diff --git a/xwords4/android/app/src/xw4dNoSMS/res/values/tmp_for_phony.xml b/xwords4/android/app/src/xw4dNoSMS/res/values/tmp_for_phony.xml deleted file mode 120000 index 6bd0cd04b..000000000 --- a/xwords4/android/app/src/xw4dNoSMS/res/values/tmp_for_phony.xml +++ /dev/null @@ -1 +0,0 @@ -../../../xw4d/res/values/tmp_for_phony.xml \ No newline at end of file diff --git a/xwords4/android/jni/andutils.c b/xwords4/android/jni/andutils.c index edc3b94e9..f47faa889 100644 --- a/xwords4/android/jni/andutils.c +++ b/xwords4/android/jni/andutils.c @@ -887,11 +887,11 @@ debugf( const char* format, va_list ap ) } const char* tag = -# if defined VARIANT_xw4NoSMS || defined VARIANT_xw4fdroid || defined VARIANT_xw4SMS +# if defined VARIANT_xw4GPlay || defined VARIANT_xw4fdroid || defined VARIANT_xw4Foss "xw4" -# elif defined VARIANT_xw4d || defined VARIANT_xw4dNoSMS +# elif defined VARIANT_xw4d || defined VARIANT_xw4dGPlay "x4bg" -# elif defined VARIANT_xw4dup || defined VARIANT_xw4dupNoSMS +# elif defined VARIANT_xw4dup || defined VARIANT_xw4dupGPlay "x4du" # endif ;