Merge branch 'molly-7.39'

This commit is contained in:
Oscar Mira 2025-04-14 01:41:51 +02:00
commit 50a7355acb
No known key found for this signature in database
GPG key ID: B371B98C5DC32237
2105 changed files with 54538 additions and 28217 deletions

View file

@ -18,3 +18,14 @@ ktlint_standard_statement-wrapping = disabled
internal:ktlint-suppression = disabled
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
ktlint_standard_value-parameter-comment = disabled
# Disable ktlint on generated source code, see
# https://github.com/JLLeitschuh/ktlint-gradle/issues/746
[**/build/generated/source/**]
ktlint = disabled
[build/generated/*/main/**]
ktlint = disabled
[**/build/generated-sources/**]
ktlint = disabled

View file

@ -23,7 +23,7 @@ RUN yes | sdkmanager --licenses
RUN sdkmanager "platform-tools"
ARG NDK_VERSION=27.0.12077973
ARG BUILD_TOOLS_VERSION=34.0.0
ARG BUILD_TOOLS_VERSION=35.0.0
ARG COMPILE_SDK_VERSION=android-35
RUN sdkmanager "ndk;${NDK_VERSION}"

View file

@ -23,7 +23,7 @@ If you're interested in a life of peace and tranquility, stick with the standard
## Contributing Code
If you're new to the Signal codebase, we recommend going through our issues and picking out a simple bug to fix (check the "easy" label in our issues) in order to get yourself familiar. Also please have a look at the [CONTRIBUTING.md](https://github.com/signalapp/Signal-Android/blob/main/CONTRIBUTING.md), that might answer some of your questions.
If you're new to the Signal codebase, we recommend going through our issues and picking out a simple bug to fix in order to get yourself familiar. Also please have a look at the [CONTRIBUTING.md](https://github.com/signalapp/Signal-Android/blob/main/CONTRIBUTING.md), that might answer some of your questions.
For larger changes and feature ideas, we ask that you propose it on the [unofficial Community Forum](https://community.signalusers.org) for a high-level discussion with the wider community before implementation.
@ -54,8 +54,8 @@ The form and manner of this distribution makes it eligible for export under the
## License
Copyright 2013-2024 Signal Messenger, LLC
Copyright 2013-2025 Signal Messenger, LLC
Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html
Licensed under the GNU AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html
Google Play and the Google Play logo are trademarks of Google LLC.

View file

@ -1,6 +1,3 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.io.ByteArrayOutputStream
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
@ -11,13 +8,13 @@ plugins {
id("molly")
}
val canonicalVersionCode = 1519
val canonicalVersionName = "7.36.2"
val canonicalVersionCode = 1535
val canonicalVersionName = "7.39.4"
val currentHotfixVersion = 0
val maxHotfixVersions = 100
val mollyRevision = 1
val sourceVersionNameWithRevision = "${canonicalVersionName}-${mollyRevision}"
// MOLLY: Use default debug keystore generated by Android Studio at $HOME/.android/debug.keystore
val selectableVariants = listOf(
"prodFossWebsiteDebug",
@ -83,6 +80,7 @@ android {
kotlinOptions {
jvmTarget = signalKotlinJvmTarget
freeCompilerArgs = listOf("-Xjvm-default=all")
suppressWarnings = true
}
signingConfigs {
@ -163,6 +161,8 @@ android {
}
defaultConfig {
val sourceVersionNameWithRevision = "${canonicalVersionName}-${mollyRevision}"
versionCode = (canonicalVersionCode * maxHotfixVersions) + mollyRevision + currentHotfixVersion
versionName = if (ciEnabled) getCommitTag() else sourceVersionNameWithRevision
@ -198,7 +198,6 @@ android {
buildConfigField("String", "CONTENT_PROXY_HOST", "\"contentproxy.signal.org\"")
buildConfigField("int", "CONTENT_PROXY_PORT", "443")
buildConfigField("String", "SIGNAL_AGENT", "\"OWA\"")
buildConfigField("String", "CDSI_MRENCLAVE", "\"0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57\"")
buildConfigField("String", "SVR2_MRENCLAVE", "\"9314436a9a144992bb3680770ea5fd7934a7ffd29257844a33763a238903d570\"")
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/9pFFEB3pSbf4iiUukw63Eo8Aqnf4iwob6X1QviCWuc8t0LUlT9vALgh/f2DPVOOmR0RW6bgRvc7DSF20V/omg+YBw==\"")
@ -356,7 +355,8 @@ android {
lint {
abortOnError = true
baseline = file("lint-baseline.xml")
disable += "LintError"
ignoreWarnings = true
quiet = true
}
applicationVariants.all {
@ -467,6 +467,7 @@ dependencies {
implementation(libs.androidx.asynclayoutinflater)
implementation(libs.androidx.asynclayoutinflater.appcompat)
implementation(libs.androidx.emoji2)
implementation(libs.androidx.splashscreen)
implementation(libs.androidx.webkit)
"gmsImplementation"(libs.firebase.messaging) {
exclude(group = "com.google.firebase", module = "firebase-core")
@ -501,6 +502,7 @@ dependencies {
implementation(libs.lottie.compose)
implementation(libs.signal.android.database.sqlcipher)
implementation(libs.androidx.sqlite)
testImplementation(libs.androidx.sqlite.framework)
implementation(libs.google.ez.vcard) {
exclude(group = "com.fasterxml.jackson.core")
exclude(group = "org.freemarker")
@ -560,6 +562,7 @@ dependencies {
testImplementation(testLibs.mockk)
testImplementation(testFixtures(project(":libsignal-service")))
testImplementation(testLibs.espresso.core)
testImplementation(testLibs.kotlinx.coroutines.test)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
@ -577,19 +580,16 @@ dependencies {
}
fun assertIsGitRepo() {
if (!file("${project.rootDir}/.git").exists()) {
throw IllegalStateException("Must be a git repository to guarantee reproducible builds! (git hash is part of APK)")
if (!project.rootDir.resolve(".git").exists()) {
throw GradleException("Must be a git repository to guarantee reproducible builds! (git hash is part of APK)")
}
}
fun getLastCommitTimestamp(): String {
val stdout = ByteArrayOutputStream()
return try {
exec {
commandLine = listOf("git", "log", "-1", "--pretty=format:%ct000")
standardOutput = stdout
}
stdout.toString().trim()
providers.exec {
commandLine("git", "log", "-1", "--pretty=format:%ct000")
}.standardOutput.asText.get().trim()
} catch (e: Throwable) {
logger.warn("Failed to get Git commit timestamp: ${e.message}. Using mtime of current build script.")
buildFile.lastModified().toString()
@ -597,13 +597,10 @@ fun getLastCommitTimestamp(): String {
}
fun getGitHash(): String {
val stdout = ByteArrayOutputStream()
return try {
exec {
commandLine = listOf("git", "rev-parse", "--short=12", "HEAD")
standardOutput = stdout
}
stdout.toString().trim()
providers.exec {
commandLine("git", "rev-parse", "--short=12", "HEAD")
}.standardOutput.asText.get().trim()
} catch (e: Throwable) {
logger.warn("Failed to get Git commit hash: ${e.message}. Using default value.")
"abc123def456"
@ -613,18 +610,31 @@ fun getGitHash(): String {
fun getCommitTag(): String {
assertIsGitRepo()
val stdout = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "describe", "--tags", "--exact-match")
standardOutput = stdout
val tag = providers.exec {
commandLine("git", "describe", "--tags", "--exact-match")
}.standardOutput.asText.get().trim()
return tag.takeIf { it.isNotEmpty() } ?: "untagged"
}
fun getCurrentGitTag(): String? {
assertIsGitRepo()
val output = providers.exec {
commandLine("git", "tag", "--points-at", "HEAD")
}.standardOutput.asText.get().trim()
return if (output.isNotEmpty()) {
val tags = output.split("\n").toList()
tags.firstOrNull { it.contains("nightly") } ?: tags[0]
} else {
null
}
return stdout.toString().trim().takeIf { it.isNotEmpty() } ?: "untagged"
}
tasks.withType<Test>().configureEach {
testLogging {
events("failed")
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues>
<issues format="6" by="lint 8.7.3" type="baseline" client="gradle" dependencies="false" name="AGP (8.7.3)" variant="all" version="8.7.3">
</issues>

View file

@ -43,6 +43,7 @@
</issue>
<issue id="OptionalUsedAsFieldOrParameterType" severity="ignore" />
<issue id="SameParameterValue" severity="ignore" />
<issue id="ForegroundServiceType" severity="warning" />
</lint>

Some files were not shown because too many files have changed in this diff Show more