Skip to content

Commit

Permalink
Merge branch 'molly-7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Mar 20, 2024
2 parents d470ac9 + 374134d commit 1fea489
Show file tree
Hide file tree
Showing 482 changed files with 17,914 additions and 10,716 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/prerelease.yml

This file was deleted.

55 changes: 33 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"

env:
HAVE_RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE != '' }}
HAVE_KEYSTORE: ${{ secrets.KEYSTORE != '' }}

jobs:
build:
name: Build
if: "github.event.base_ref == 'refs/heads/main'"
if: "github.event.base_ref != 'refs/heads/upstream'"
runs-on: ubuntu-22.04

permissions:
contents: read # to fetch code (actions/checkout)

env:
GRADLE_OPTS: "-Dorg.gradle.project.kotlin.compiler.execution.strategy=in-process"
CI_ENV_FILE: ${{ vars.CI_ENV_FILE || 'beta-stable.env' }}
CI_MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}

steps:
Expand All @@ -24,33 +29,33 @@ jobs:
run: docker-compose build
working-directory: reproducible-builds

- name: Extract release keys
if: "env.HAVE_RELEASE_KEYSTORE == 'true'"
run: printenv RELEASE_KEYSTORE | base64 -d > certs/release.jks
- name: Extract signing keys
if: "env.HAVE_KEYSTORE == 'true'"
run: printenv KEYSTORE | base64 -d > certs/keystore.jks
working-directory: reproducible-builds
env:
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
KEYSTORE: ${{ secrets.KEYSTORE }}

- name: Build release
if: "env.HAVE_RELEASE_KEYSTORE == 'false'"
run: docker-compose --env-file ci/release.env run assemble
- name: Build without signing
if: "env.HAVE_KEYSTORE == 'false'"
run: docker-compose --env-file "ci/$CI_ENV_FILE" run assemble
working-directory: reproducible-builds

- name: Build and sign release
if: "env.HAVE_RELEASE_KEYSTORE == 'true'"
run: docker-compose --env-file ci/release.env run assemble
- name: Build and sign
if: "env.HAVE_KEYSTORE == 'true'"
run: docker-compose --env-file "ci/$CI_ENV_FILE" run assemble
working-directory: reproducible-builds
env:
CI_KEYSTORE_PATH: certs/release.jks
CI_KEYSTORE_ALIAS: release
CI_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
CI_KEYSTORE_PATH: certs/keystore.jks
CI_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
CI_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

- name: Clean up
- name: Clean up keystore
if: "always()"
run: rm -f certs/release.jks
run: rm -f certs/keystore.jks
working-directory: reproducible-builds

- name: Log checksums
- name: Log APK and AAB checksums
run: find outputs \( -name "*.aab" -o -name "*.apk" \) -exec sha256sum '{}' +
working-directory: reproducible-builds

Expand Down Expand Up @@ -83,15 +88,21 @@ jobs:

- name: Check version for upgrade compatibility
run: |
gh release list --exclude-drafts
echo "Listing latest APKs"
gh release list --exclude-drafts --limit 10
gh release download --pattern '*.apk' --dir latest || exit 0
latest_apks=(latest/*.apk)
build_apks=(apk/*/release/*.apk)
aapt=($ANDROID_HOME/build-tools/*/aapt)
version_code() {
local aapt=($ANDROID_HOME/build-tools/30.*/aapt)
$aapt d badging "$1" | gawk 'match($0, /^package:.*versionCode=.([0-9]+)/, v) {print v[1]}'
}
test $(version_code "$build_apks") -gt $(version_code "$latest_apks")
echo "Using aapt: $aapt"
latest_version_code=$(version_code "$latest_apks")
build_version_code=$(version_code "$build_apks")
echo "Latest version code: $latest_version_code"
echo "Build version code: $build_version_code"
test $build_version_code -gt $latest_version_code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/reprocheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
tag_name:
description: "Enter the version to check"
required: true
prerelease:
description: 'Pre-release build'
required: true
type: boolean
release:
types:
- published
Expand All @@ -19,14 +15,14 @@ permissions:

env:
TAG_NAME: "${{ github.event.inputs.tag_name || github.event.release.tag_name }}"
PRE_RELEASE: "${{ github.event.inputs.prerelease || github.event.release.prerelease }}"

jobs:
build:
name: Build new
runs-on: ubuntu-22.04
env:
GRADLE_OPTS: "-Dorg.gradle.project.kotlin.compiler.execution.strategy=in-process"
CI_ENV_FILE: ${{ vars.CI_ENV_FILE || 'beta-stable.env' }}
CI_MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}

steps:
Expand All @@ -39,13 +35,7 @@ jobs:
working-directory: reproducible-builds

- name: Build release
if: "env.PRE_RELEASE == 'false'"
run: docker-compose --env-file ci/release.env run assemble
working-directory: reproducible-builds

- name: Build pre-release
if: "env.PRE_RELEASE == 'true'"
run: docker-compose --env-file ci/prerelease.env run assemble
run: docker-compose --env-file "ci/$CI_ENV_FILE" run assemble
working-directory: reproducible-builds

- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README-ORIG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Signal Android
# Signal Android

Signal is a simple, powerful, and secure messenger.

Expand Down Expand Up @@ -54,7 +54,7 @@ The form and manner of this distribution makes it eligible for export under the

## License

Copyright 2013-2022 Signal
Copyright 2013-2024 Signal Messenger, LLC

Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ apply {
from("fix-profm.gradle")
}

val canonicalVersionCode = 1396
val canonicalVersionName = "7.0.2"
val canonicalVersionCode = 1400
val canonicalVersionName = "7.1.3"
val mollyRevision = 1

val postFixSize = 100
Expand Down Expand Up @@ -187,7 +187,6 @@ android {
buildConfigField("int", "CONTENT_PROXY_PORT", "443")
buildConfigField("String", "SIGNAL_AGENT", "\"OWA\"")
buildConfigField("String", "CDSI_MRENCLAVE", "\"0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57\"")
buildConfigField("String", "SVR2_MRENCLAVE_DEPRECATED", "\"6ee1042f9e20f880326686dd4ba50c25359f01e9f733eeba4382bca001d45094\"")
buildConfigField("String", "SVR2_MRENCLAVE", "\"a6622ad4656e1abcd0bc0ff17c229477747d2ded0495c4ebee7ed35c1789fa97\"")
buildConfigField("String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\"")
buildConfigField("String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P+NameAZYOD12qRkxosQQP5uux6B2nRyZ7sAV54DgFyLiRcq1FvwKw2EPQdk4HDoePrO/RNUbyNddnM/mMgj4FW65xCoT1LmjrIjsv/Ggdlx46ueczhMgtBunx1/w8k8V+l8LVZ8gAT6wkU5J+DPQalQguMg12Jzug3q4TbdHiGCmD9EunCwOmsLuLJkz6EcSYXtrlDEnAM+hicw7iergYLLlMXpfTdGxJCWJmP4zqUFeTTmsmhsjGBt7NiEB/9pFFEB3pSbf4iiUukw63Eo8Aqnf4iwob6X1QviCWuc8t0I=\"")
Expand All @@ -198,6 +197,7 @@ android {
buildConfigField("String", "GIPHY_API_KEY", "\"3o6ZsYH6U6Eri53TXy\"")
buildConfigField("String", "SIGNAL_CAPTCHA_URL", "\"https://signalcaptchas.org/registration/generate.html\"")
buildConfigField("String", "RECAPTCHA_PROOF_URL", "\"https://signalcaptchas.org/challenge/generate.html\"")
buildConfigField("org.signal.libsignal.net.Network.Environment", "LIBSIGNAL_NET_ENV", "org.signal.libsignal.net.Network.Environment.PRODUCTION")

// MOLLY: Rely on the built-in variables FLAVOR and BUILD_TYPE instead of BUILD_*_TYPE
buildConfigField("String", "BADGE_STATIC_ROOT", "\"https://updates2.signal.org/static/badges/\"")
Expand Down Expand Up @@ -333,7 +333,6 @@ android {
buildConfigField("String", "SIGNAL_CDSI_URL", "\"https://cdsi.staging.signal.org\"")
buildConfigField("String", "SIGNAL_KEY_BACKUP_URL", "\"https://api-staging.backup.signal.org\"")
buildConfigField("String", "SIGNAL_SVR2_URL", "\"https://svr2.staging.signal.org\"")
buildConfigField("String", "SVR2_MRENCLAVE_DEPRECATED", "\"a8a261420a6bb9b61aa25bf8a79e8bd20d7652531feb3381cbffd446d270be95\"")
buildConfigField("String", "SVR2_MRENCLAVE", "\"acb1973aa0bbbd14b3b4e06f145497d948fd4a98efc500fcce363b3b743ec482\"")
buildConfigField("String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx\"")
buildConfigField("String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X4ntARBgELuMWWUEEfSK0mjXg+/2lPmWcTZWR9nkqgQQP0tbzuiPm74H2wMO4u1Wafe+UwyIlIT9L7KLS19Aw8r4sPrXZSSsOZ6s7M1+rTJN0bI5CKY2PX29y5Ok3jSWufIKcgKOnWoP67d5b2du2ZVJjpjfibNIHbT/cegy/sBLoFwtHogVYUewANUAXIaMPyCLRArsKhfJ5wBtTminG/PAvuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUjlENAErBme1YHmOSpU6tr6doJ66dPzVAWIanmO/5mgjNEDeK7DDqQdB1xd03HT2Qs2TxY3kCK8aAb/0iM0HQiXjxZ9HIgYhbtvGEnDKW5ILSUydqH/KBhW4Pb0jZWnqN/YgbWDKeJxnDbYcUob5ZY5Lt5ZCMKuaGUvCJRrCtuugSMaqjowCGRempsDdJEt+cMaalhZ6gczklJB/IbdwENW9KeVFPoFNFzhxWUIS5ML9riVYhAtE6JE5jX0xiHNVIIPthb458cfA8daR0nYfYAUKogQArm0iBezOO+mPk5vCM=\"")
Expand All @@ -342,6 +341,7 @@ android {
buildConfigField("String", "MOBILE_COIN_ENVIRONMENT", "\"testnet\"")
buildConfigField("String", "SIGNAL_CAPTCHA_URL", "\"https://signalcaptchas.org/staging/registration/generate.html\"")
buildConfigField("String", "RECAPTCHA_PROOF_URL", "\"https://signalcaptchas.org/staging/challenge/generate.html\"")
buildConfigField("org.signal.libsignal.net.Network.Environment", "LIBSIGNAL_NET_ENV", "org.signal.libsignal.net.Network.Environment.STAGING")

buildConfigField("String", "BUILD_ENVIRONMENT_TYPE", "\"Staging\"")
buildConfigField("String", "STRIPE_PUBLISHABLE_KEY", "\"pk_test_sngOd8FnXNkpce9nPXawKrJD00kIDngZkD\"")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,18 @@ class SignalInstrumentationApplicationContext : ApplicationContext() {
LogDatabase.getInstance(this).logs.trimToSize()
}
}

override fun beginJobLoop() = Unit

/**
* Some of the jobs can interfere with some of the instrumentation tests.
*
* For example, we may try to create a release channel recipient while doing
* an import/backup test.
*
* This can be used to start the job loop if needed for tests that rely on it.
*/
fun beginJobLoopForTests() {
super.beginJobLoop()
}
}
Loading

0 comments on commit 1fea489

Please sign in to comment.