mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Add a new PNP build flavor.
This commit is contained in:
@@ -80,6 +80,9 @@ def selectableVariants = [
|
||||
'nightlyProdSpinner',
|
||||
'nightlyProdPerf',
|
||||
'nightlyProdRelease',
|
||||
'nightlyStagingRelease',
|
||||
'nightlyPnpPerf',
|
||||
'nightlyPnpRelease',
|
||||
'playProdDebug',
|
||||
'playProdSpinner',
|
||||
'playProdPerf',
|
||||
@@ -89,6 +92,8 @@ def selectableVariants = [
|
||||
'playStagingSpinner',
|
||||
'playStagingPerf',
|
||||
'playStagingInstrumentation',
|
||||
'playPnpDebug',
|
||||
'playPnpSpinner',
|
||||
'playStagingRelease',
|
||||
'websiteProdSpinner',
|
||||
'websiteProdRelease',
|
||||
@@ -313,11 +318,13 @@ android {
|
||||
matchingFallbacks = ['debug']
|
||||
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Spinner\""
|
||||
}
|
||||
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles = buildTypes.debug.proguardFiles
|
||||
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Release\""
|
||||
}
|
||||
|
||||
perf {
|
||||
initWith debug
|
||||
isDefault false
|
||||
@@ -392,6 +399,15 @@ android {
|
||||
buildConfigField "String", "BUILD_ENVIRONMENT_TYPE", "\"Staging\""
|
||||
buildConfigField "String", "STRIPE_PUBLISHABLE_KEY", "\"pk_test_sngOd8FnXNkpce9nPXawKrJD00kIDngZkD\""
|
||||
}
|
||||
|
||||
pnp {
|
||||
dimension 'environment'
|
||||
|
||||
initWith staging
|
||||
applicationIdSuffix ".pnp"
|
||||
|
||||
buildConfigField "String", "BUILD_ENVIRONMENT_TYPE", "\"Pnp\""
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.thoughtcrime.securesms.BuildConfig
|
||||
|
||||
object Environment {
|
||||
const val IS_STAGING: Boolean = BuildConfig.BUILD_ENVIRONMENT_TYPE == "Staging"
|
||||
const val IS_PNP: Boolean = BuildConfig.BUILD_ENVIRONMENT_TYPE == "Pnp"
|
||||
|
||||
object Donations {
|
||||
@JvmStatic
|
||||
|
||||
@@ -321,7 +321,7 @@ public final class FeatureFlags {
|
||||
|
||||
/** Internal testing extensions. */
|
||||
public static boolean internalUser() {
|
||||
return getBoolean(INTERNAL_USER, false);
|
||||
return getBoolean(INTERNAL_USER, false) || Environment.IS_PNP;
|
||||
}
|
||||
|
||||
/** Whether or not to use the UUID in verification codes. */
|
||||
@@ -344,7 +344,7 @@ public final class FeatureFlags {
|
||||
* IMPORTANT: This is under active development. Enabling this *will* break your contacts in terrible, irreversible ways.
|
||||
*/
|
||||
public static boolean phoneNumberPrivacy() {
|
||||
return getBoolean(PHONE_NUMBER_PRIVACY, false);
|
||||
return getBoolean(PHONE_NUMBER_PRIVACY, false) || Environment.IS_PNP;
|
||||
}
|
||||
|
||||
/** Whether to use the custom streaming muxer or built in android muxer. */
|
||||
|
||||
11
app/src/nightlyPnp/AndroidManifest.xml
Normal file
11
app/src/nightlyPnp/AndroidManifest.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.thoughtcrime.securesms">
|
||||
|
||||
<application
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:usesCleartextTraffic"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/nightlyPnp/res/drawable/nightly_pnp_background.webp
Normal file
BIN
app/src/nightlyPnp/res/drawable/nightly_pnp_background.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
6
app/src/nightlyPnp/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
6
app/src/nightlyPnp/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/nightly_pnp_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
|
||||
</adaptive-icon>
|
||||
4
app/src/nightlyPnp/res/values/strings.xml
Normal file
4
app/src/nightlyPnp/res/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="app_name">Signal (PNP)</string>
|
||||
</resources>
|
||||
11
app/src/pnp/AndroidManifest.xml
Normal file
11
app/src/pnp/AndroidManifest.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.thoughtcrime.securesms">
|
||||
|
||||
<application
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:usesCleartextTraffic"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</manifest>
|
||||
5
app/src/pnp/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
5
app/src/pnp/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/storage_color_files"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
4
app/src/pnp/res/values/strings.xml
Normal file
4
app/src/pnp/res/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="app_name">Signal (PNP)</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user