Update to AGP 9.1.1

This commit is contained in:
Greyson Parrelli
2026-05-06 13:08:38 -04:00
parent 4dd5a4ee53
commit 572c11ee6d
25 changed files with 13656 additions and 213 deletions
+134 -93
View File
@@ -1,7 +1,10 @@
@file:Suppress("UnstableApiUsage")
import com.android.build.api.dsl.ManagedVirtualDevice
import com.android.build.api.artifact.ArtifactTransformationRequest
import com.android.build.api.artifact.SingleArtifact
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
import java.time.Instant
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
@@ -10,7 +13,6 @@ import java.util.Properties
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlinx.serialization)
@@ -32,11 +34,11 @@ val maxHotfixVersions = 100
// We don't want versions to ever end in 0 so that they don't conflict with nightly versions
val possibleHotfixVersions = (0 until maxHotfixVersions).toList().filter { it % 10 != 0 }
val debugKeystorePropertiesProvider = providers.of(PropertiesFileValueSource::class.java) {
val debugKeystorePropertiesProvider: Provider<Properties> = providers.of(PropertiesFileValueSource::class.java) {
parameters.file.set(rootProject.layout.projectDirectory.file("keystore.debug.properties"))
}
val languagesProvider = providers.of(LanguageListValueSource::class.java) {
val languagesProvider: Provider<List<String>> = providers.of(LanguageListValueSource::class.java) {
parameters.resDir.set(layout.projectDirectory.dir("src/main/res"))
}
@@ -81,6 +83,21 @@ val selectableVariants = listOf(
"githubProdRelease"
)
// Wire 5.x iterates Android source sets and expects matching Kotlin source sets.
// AGP 9.0's built-in Kotlin doesn't create all source sets automatically.
val kotlinExt = extensions.getByName("kotlin") as KotlinAndroidProjectExtension
android.sourceSets.all {
kotlinExt.sourceSets.findByName(name) ?: kotlinExt.sourceSets.create(name)
}
// AGP 9.0's built-in Kotlin doesn't pick up extra java.srcDir entries from Android
// source sets, so add the testShared dir directly to test/androidTest Kotlin
// compile tasks.
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).configureEach {
if (name.contains("UnitTest") || name.contains("AndroidTest")) {
source("$projectDir/src/testShared")
}
}
wire {
kotlin {
javaInterop = true
@@ -94,8 +111,6 @@ wire {
srcDir("${project.rootDir}/lib/libsignal-service/src/main/protowire")
srcDir("${project.rootDir}/lib/archive/src/main/protowire")
}
// Handled by libsignal
prune("signalservice.DecryptionErrorMessage")
}
ktlint {
@@ -106,7 +121,7 @@ android {
namespace = "org.thoughtcrime.securesms"
buildToolsVersion = libs.versions.buildTools.get()
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
ndkVersion = libs.versions.ndk.get()
flavorDimensions += listOf("distribution", "environment")
@@ -114,13 +129,7 @@ android {
android.bundle.language.enableSplit = false
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
freeCompilerArgs = listOf("-Xjvm-default=all")
suppressWarnings = true
}
debugKeystorePropertiesProvider.orNull?.let { properties ->
debugKeystorePropertiesProvider.get().takeIf { it.isNotEmpty() }?.let { properties ->
signingConfigs.getByName("debug").apply {
storeFile = file("${project.rootDir}/${properties.getProperty("storeFile")}")
storePassword = properties.getProperty("storePassword")
@@ -137,8 +146,8 @@ android {
}
managedDevices {
devices {
create<ManagedVirtualDevice>("pixel3api30") {
localDevices {
create("pixel3api30") {
device = "Pixel 3"
apiLevel = 30
systemImageSource = "google-atd"
@@ -195,10 +204,6 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
defaultConfig {
if (currentHotfixVersion >= maxHotfixVersions) {
throw AssertionError("Hotfix version offset is too large!")
@@ -291,7 +296,7 @@ android {
isDefault = true
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard/proguard-firebase-messaging.pro",
"proguard/proguard-google-play-services.pro",
"proguard/proguard-jackson.pro",
@@ -308,6 +313,7 @@ android {
"proguard/proguard-retrolambda.pro",
"proguard/proguard-okhttp.pro",
"proguard/proguard-ez-vcard.pro",
"proguard/proguard-dnsjava.pro",
"proguard/proguard.cfg"
)
testProguardFiles(
@@ -480,70 +486,6 @@ android {
lintConfig = rootProject.file("lint.xml")
}
androidComponents {
beforeVariants { variant ->
variant.enable = variant.name in selectableVariants
}
onVariants(selector().all()) { variant: com.android.build.api.variant.ApplicationVariant ->
// Include the test-only library on debug builds.
if (variant.buildType != "instrumentation") {
variant.packaging.jniLibs.excludes.add("**/libsignal_jni_testing.so")
}
// Starting with minSdk 23, Android leaves native libraries uncompressed, which is fine for the Play Store, but not for our self-distributed APKs.
// This reverts it to the legacy behavior, compressing the native libraries, and drastically reducing the APK file size.
if (variant.name.contains("website", ignoreCase = true) || variant.name.contains("github", ignoreCase = true)) {
variant.packaging.jniLibs.useLegacyPackaging.set(true)
}
// Version overrides
if (variant.name.contains("nightly", ignoreCase = true)) {
var tag = getNightlyTagForCurrentCommit()
if (!tag.isNullOrEmpty()) {
if (tag.startsWith("v")) {
tag = tag.substring(1)
}
// We add a multiple of maxHotfixVersions to nightlies to ensure we're always at least that many versions ahead
val nightlyBuffer = (5 * maxHotfixVersions)
val nightlyVersionCode = (canonicalVersionCode * maxHotfixVersions) + (getNightlyBuildNumber(tag) * 10) + nightlyBuffer
variant.outputs.forEach { output ->
output.versionName.set("$tag | ${getLastCommitDateTimeUtc()}")
output.versionCode.set(nightlyVersionCode)
}
}
}
}
onVariants(selector().withBuildType("quickstart")) { variant ->
val environment = variant.flavorName?.let { name ->
when {
name.contains("staging", ignoreCase = true) -> "staging"
name.contains("prod", ignoreCase = true) -> "prod"
else -> "prod"
}
} ?: "prod"
val taskProvider = tasks.register<CopyQuickstartCredentialsTask>("copyQuickstartCredentials${variant.name.capitalize()}") {
if (quickstartCredentialsDir != null) {
inputDir.set(File(quickstartCredentialsDir))
}
filePrefix.set("${environment}_")
}
variant.sources.assets?.addGeneratedSourceDirectory(taskProvider) { it.outputDir }
}
onVariants(selector().withBuildType("benchmark")) { variant ->
val taskProvider = tasks.register<CopyBenchmarkBackupTask>("copyBenchmarkBackup${variant.name.capitalize()}") {
if (benchmarkBackupFile != null) {
inputFile.set(File(benchmarkBackupFile))
}
}
variant.sources.assets?.addGeneratedSourceDirectory(taskProvider) { it.outputDir }
}
}
val releaseDir = "$projectDir/src/release/java"
val debugDir = "$projectDir/src/debug/java"
@@ -565,15 +507,79 @@ android {
manifest.srcFile("$projectDir/src/benchmarkShared/AndroidManifest.xml")
}
}
}
applicationVariants.configureEach {
outputs.configureEach {
if (this is com.android.build.gradle.internal.api.BaseVariantOutputImpl) {
val fileVersionName = versionName.substringBefore(" |")
outputFileName = outputFileName.replace(".apk", "-$fileVersionName.apk")
androidComponents {
beforeVariants { variant ->
variant.enable = variant.name in selectableVariants
}
onVariants(selector().all()) { variant: com.android.build.api.variant.ApplicationVariant ->
// Rename APK to include version name
val renameTask = tasks.register<RenameApkTask>("renameApk${variant.name.replaceFirstChar { it.uppercase() }}")
val renameRequest = variant.artifacts.use(renameTask)
.wiredWithDirectories(RenameApkTask::apkFolder, RenameApkTask::outFolder)
.toTransformMany(SingleArtifact.APK)
renameTask.configure {
transformationRequest.set(renameRequest)
}
// Include the test-only library on debug builds.
if (variant.buildType != "instrumentation") {
variant.packaging.jniLibs.excludes.add("**/libsignal_jni_testing.so")
}
// Starting with minSdk 23, Android leaves native libraries uncompressed, which is fine for the Play Store, but not for our self-distributed APKs.
// This reverts it to the legacy behavior, compressing the native libraries, and drastically reducing the APK file size.
if (variant.name.contains("website", ignoreCase = true) || variant.name.contains("github", ignoreCase = true)) {
variant.packaging.jniLibs.useLegacyPackaging.set(true)
}
// Version overrides
if (variant.name.contains("nightly", ignoreCase = true)) {
var tag = getNightlyTagForCurrentCommit()
if (!tag.isNullOrEmpty()) {
if (tag.startsWith("v")) {
tag = tag.substring(1)
}
// We add a multiple of maxHotfixVersions to nightlies to ensure we're always at least that many versions ahead
val nightlyBuffer = (5 * maxHotfixVersions)
val nightlyVersionCode = (canonicalVersionCode * maxHotfixVersions) + (getNightlyBuildNumber(tag) * 10) + nightlyBuffer
variant.outputs.forEach { output ->
output.versionName.set("$tag | ${getLastCommitDateTimeUtc()}")
output.versionCode.set(nightlyVersionCode)
}
}
}
}
onVariants(selector().withBuildType("quickstart")) { variant ->
val environment = variant.flavorName?.let { name ->
when {
name.contains("staging", ignoreCase = true) -> "staging"
name.contains("prod", ignoreCase = true) -> "prod"
else -> "prod"
}
} ?: "prod"
val taskProvider = tasks.register<CopyQuickstartCredentialsTask>("copyQuickstartCredentials${variant.name.capitalize()}") {
if (quickstartCredentialsDir != null) {
inputDir.set(File(quickstartCredentialsDir))
}
filePrefix.set("${environment}_")
}
variant.sources.assets?.addGeneratedSourceDirectory(taskProvider) { it.outputDir }
}
onVariants(selector().withBuildType("benchmark")) { variant ->
val taskProvider = tasks.register<CopyBenchmarkBackupTask>("copyBenchmarkBackup${variant.name.capitalize()}") {
if (benchmarkBackupFile != null) {
inputFile.set(File(benchmarkBackupFile))
}
}
variant.sources.assets?.addGeneratedSourceDirectory(taskProvider) { it.outputDir }
}
}
baselineProfile {
@@ -590,6 +596,14 @@ baselineProfile {
dexLayoutOptimization = false
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
freeCompilerArgs.addAll("-Xjvm-default=all")
suppressWarnings = true
}
}
dependencies {
lintChecks(project(":lintchecks"))
ktlintRuleset(libs.ktlint.twitter.compose)
@@ -854,7 +868,7 @@ abstract class LanguageListValueSource : ValueSource<List<String>, LanguageListV
}
}
abstract class PropertiesFileValueSource : ValueSource<Properties?, PropertiesFileValueSource.Params> {
abstract class PropertiesFileValueSource : ValueSource<Properties, PropertiesFileValueSource.Params> {
interface Params : ValueSourceParameters {
@get:InputFile
@get:Optional
@@ -862,9 +876,9 @@ abstract class PropertiesFileValueSource : ValueSource<Properties?, PropertiesFi
val file: RegularFileProperty
}
override fun obtain(): Properties? {
override fun obtain(): Properties {
val f: File = parameters.file.asFile.get()
if (!f.exists()) return null
if (!f.exists()) return Properties()
return Properties().apply {
f.inputStream().use { load(it) }
@@ -934,3 +948,30 @@ abstract class CopyBenchmarkBackupTask : DefaultTask() {
backupFile.copyTo(dest.resolve("backup.binproto"), overwrite = true)
}
}
abstract class RenameApkTask : DefaultTask() {
@get:InputFiles
abstract val apkFolder: DirectoryProperty
@get:OutputDirectory
abstract val outFolder: DirectoryProperty
@get:Internal
abstract val transformationRequest: Property<ArtifactTransformationRequest<RenameApkTask>>
@TaskAction
fun rename() {
transformationRequest.get().submit(this) { artifact ->
val originalFile = File(artifact.outputFile)
val versionName = artifact.versionName?.substringBefore(" |")
val newName = if (!versionName.isNullOrEmpty()) {
originalFile.name.replace(".apk", "-$versionName.apk")
} else {
originalFile.name
}
val newFile = File(outFolder.get().asFile, newName)
originalFile.copyTo(newFile, overwrite = true)
newFile
}
}
}
+4
View File
@@ -0,0 +1,4 @@
# dnsjava references desktop/server-only classes that are absent on Android.
-dontwarn com.sun.jna.**
-dontwarn javax.naming.**
-dontwarn lombok.Generated
@@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.service.webrtc.state;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.checkerframework.checker.units.qual.N;
import org.signal.ringrtc.CallId;
import org.signal.ringrtc.CallManager;
import org.signal.ringrtc.GroupCall;
+8 -5
View File
@@ -1,6 +1,7 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.test")
alias(libs.plugins.jetbrains.kotlin.android)
alias(benchmarkLibs.plugins.baselineprofile)
}
@@ -15,10 +16,6 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
}
defaultConfig {
minSdk = 28
targetSdk = 36
@@ -55,6 +52,12 @@ android {
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
}
}
baselineProfile {
managedDevices += "api31"
useConnectedDevices = false
+8 -6
View File
@@ -3,27 +3,23 @@
import com.android.build.api.dsl.ManagedVirtualDevice
import org.gradle.api.JavaVersion
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
val benchmarkLibs = the<org.gradle.accessors.dm.LibrariesForBenchmarkLibs>()
plugins {
id("com.android.test")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "org.signal.benchmark"
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
compileOptions {
sourceCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
}
defaultConfig {
minSdk = 23
targetSdk = libs.versions.targetSdk.get().toInt()
@@ -63,6 +59,12 @@ android {
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
}
}
dependencies {
implementation(benchmarkLibs.androidx.test.ext.junit)
implementation(benchmarkLibs.espresso.core)
+2
View File
@@ -0,0 +1,2 @@
android.builtInKotlin=true
android.newDsl=true
@@ -3,6 +3,7 @@
import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.accessors.dm.LibrariesForTestLibs
import org.gradle.api.JavaVersion
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
val libs = the<LibrariesForLibs>()
val testLibs = the<LibrariesForTestLibs>()
@@ -11,13 +12,12 @@ plugins {
// We cannot use the version catalog in the plugins block in convention plugins (it's not supported).
// Instead, plugin versions are controlled through the dependencies block in the build.gradle.kts.
id("com.android.library")
id("kotlin-android")
id("ktlint")
}
android {
buildToolsVersion = libs.versions.buildTools.get()
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
@@ -30,17 +30,19 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
suppressWarnings = true
}
lint {
disable += "InvalidVectorPath"
lintConfig = rootProject.file("lint.xml")
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
suppressWarnings = true
}
}
dependencies {
lintChecks(project(":lintchecks"))
@@ -4,6 +4,7 @@ import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.accessors.dm.LibrariesForTestLibs
import org.gradle.api.JavaVersion
import org.gradle.kotlin.dsl.the
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
val libs = the<LibrariesForLibs>()
val testLibs = the<LibrariesForTestLibs>()
@@ -12,13 +13,12 @@ plugins {
// We cannot use the version catalog in the plugins block in convention plugins (it's not supported).
// Instead, plugin versions are controlled through the dependencies block in the build.gradle.kts.
id("com.android.application")
id("kotlin-android")
id("ktlint")
}
android {
buildToolsVersion = libs.versions.buildTools.get()
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
defaultConfig {
versionCode = 1
@@ -34,18 +34,16 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
suppressWarnings = true
}
buildFeatures {
buildConfig = true
compose = true
}
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
suppressWarnings = true
}
}
@@ -2,7 +2,6 @@ package org.signal.buildtools
import mockwebserver3.MockResponse
import mockwebserver3.MockWebServer
import okhttp3.ExperimentalOkHttpApi
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
@@ -10,7 +9,6 @@ import org.junit.Before
import org.junit.Test
import java.io.File
@OptIn(ExperimentalOkHttpApi::class)
class SmartlingClientTest {
private lateinit var server: MockWebServer
+8 -4
View File
@@ -30,7 +30,7 @@ buildscript {
classpath(libs.gradle)
classpath(libs.androidx.navigation.safe.args.gradle.plugin)
classpath(libs.protobuf.gradle.plugin)
classpath("com.squareup.wire:wire-gradle-plugin:4.4.3") {
classpath("com.squareup.wire:wire-gradle-plugin:6.0.0-alpha02") {
exclude(group = "com.squareup.wire", module = "wire-swift-generator")
exclude(group = "com.squareup.wire", module = "wire-grpc-client")
exclude(group = "com.squareup.wire", module = "wire-grpc-jvm")
@@ -120,9 +120,13 @@ gradle.projectsEvaluated {
// If you let all of these things run in parallel, gradle will likely OOM.
// To avoid this, we put non-app tests and lints behind the much heavier app tests and lints.
subprojects.filter { it.name != "Signal-Android" }.forEach { subproject ->
subproject.tasks.findByName("testDebugUnitTest")?.mustRunAfter(appTestTask)
subproject.tasks.findByName("test")?.mustRunAfter(appTestTask)
subproject.tasks.findByName("lintDebug")?.mustRunAfter(appLintTask)
appTestTask?.let { task ->
subproject.tasks.findByName("testDebugUnitTest")?.mustRunAfter(task)
subproject.tasks.findByName("test")?.mustRunAfter(task)
}
appLintTask?.let { task ->
subproject.tasks.findByName("lintDebug")?.mustRunAfter(task)
}
}
}
+2 -8
View File
@@ -11,10 +11,6 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
testFixtures {
enable = true
}
@@ -25,10 +21,8 @@ dependencies {
api(project(":core:util"))
platform(libs.androidx.compose.bom).let { composeBom ->
api(composeBom)
androidTestApi(composeBom)
}
api(platform(libs.androidx.compose.bom))
androidTestImplementation(platform(libs.androidx.compose.bom))
api(libs.androidx.compose.material3)
api(libs.androidx.compose.material3.adaptive)
+1 -5
View File
@@ -6,7 +6,7 @@ plugins {
android {
namespace = "org.signal.camera.demo"
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
defaultConfig {
applicationId = "org.signal.camera.demo"
@@ -33,10 +33,6 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
}
buildFeatures {
compose = true
}
+1
View File
@@ -70,6 +70,7 @@ dependencies {
// AndroidX
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.documentfile)
implementation(libs.androidx.sqlite)
implementation(libs.androidx.sqlite.framework)
+1 -7
View File
@@ -19,7 +19,7 @@ val localProperties: Properties? = if (localPropertiesFile.exists()) {
android {
namespace = "org.thoughtcrime.video.app"
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
defaultConfig {
applicationId = "org.thoughtcrime.video.app"
@@ -49,15 +49,9 @@ android {
sourceCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
+14 -1
View File
@@ -3,6 +3,7 @@ android.useAndroidX=true
android.experimental.androidTest.numManagedDeviceShards=1
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=fail
android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false
# We never want to use auto-provisioning, as it breaks reproducible builds.
# This should not be a problem, because we never configure a "javaRepositories"
# item to tell Gradle where to auto-provision the toolchain from, but adding
@@ -15,7 +16,19 @@ android.lint.useK2Uast=false
# Test fixtures support for Android modules
android.experimental.enableTestFixturesKotlinSupport=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.onlyEnableUnitTestForTheTestedBuildType=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=true
android.newDsl=true
android.disallowKotlinSourceSets=false
# Uncomment these to build libsignal from source.
# libsignalClientPath=../libsignal
# org.gradle.dependency.verification=lenient
# org.gradle.dependency.verification=lenient
+1 -1
View File
@@ -3,7 +3,7 @@
[versions]
androidx-test-ext-junit = "1.3.0"
baselineprofile = "1.4.1"
baselineprofile = "1.5.0-alpha03"
[plugins]
baselineprofile = { id = "androidx.baselineprofile", version.ref = "baselineprofile" }
+52 -52
View File
@@ -3,26 +3,26 @@
[versions]
# SDK & Build Versions
buildTools = "35.0.0"
buildTools = "36.0.0"
compileSdk = "android-36"
targetSdk = "35"
minSdk = "23"
ndk = "28.0.13004108"
javaVersion = "17"
kotlinJvmTarget = "17"
gradle = "8.13.2"
gradle = "9.1.1"
kotlin = "2.2.20"
android-gradle-plugin = "8.13.2"
android-gradle-plugin = "9.1.1"
# Other versions
androidx-appcompat = "1.7.0"
androidx-activity = "1.12.0"
androidx-appcompat = "1.7.1"
androidx-activity = "1.13.0"
androidx-camera = "1.5.2"
androidx-fragment = "1.8.5"
androidx-lifecycle = "2.8.7"
androidx-fragment = "1.8.9"
androidx-lifecycle = "2.10.0"
androidx-lifecycle-navigation3 = "2.10.0"
androidx-media3 = "1.9.1"
androidx-navigation = "2.8.5"
androidx-navigation = "2.9.8"
androidx-navigation3-core = "1.0.0"
androidx-core-telecom = "1.1.0-alpha04"
androidx-window = "1.3.0"
@@ -31,10 +31,10 @@ libsignal-client = "0.93.1"
mp4parser = "1.9.39"
accompanist = "0.28.0"
nanohttpd = "2.3.1"
navigation-safe-args-gradle-plugin = "2.8.5"
protobuf-gradle-plugin = "0.9.0"
ktlint = "14.0.1"
ui-test-junit4 = "1.9.4"
navigation-safe-args-gradle-plugin = "2.9.8"
protobuf-gradle-plugin = "0.10.0"
ktlint = "14.2.0"
ui-test-junit4 = "1.11.0"
[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
@@ -51,7 +51,7 @@ kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", vers
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
android-library = { module = "com.android.library:com.android.library.gradle.plugin", version.ref = "android-gradle-plugin" }
android-application = { module = "com.android.application:com.android.application.gradle.plugin", version.ref = "android-gradle-plugin" }
androidx-benchmark-gradle-plugin = "androidx.benchmark:benchmark-gradle-plugin:1.3.3"
androidx-benchmark-gradle-plugin = "androidx.benchmark:benchmark-gradle-plugin:1.4.1"
# Compose
androidx-compose-bom = "androidx.compose:compose-bom:2026.04.01"
@@ -69,19 +69,19 @@ androidx-compose-rxjava3 = "androidx.compose.runtime:runtime-rxjava3:1.11.0"
# Accompanist
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist-drawablepainter = "com.google.accompanist:accompanist-drawablepainter:0.36.0"
accompanist-drawablepainter = "com.google.accompanist:accompanist-drawablepainter:0.37.3"
# Desugaring
android-tools-desugar = "com.android.tools:desugar_jdk_libs:2.1.3"
android-tools-desugar = "com.android.tools:desugar_jdk_libs:2.1.5"
# Kotlin
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinx-coroutines-core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0"
kotlinx-coroutines-core-jvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0"
kotlinx-coroutines-play-services = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.9.0"
kotlinx-coroutines-rx3 = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.9.0"
kotlinx-coroutines-core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
kotlinx-coroutines-core-jvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.2"
kotlinx-coroutines-play-services = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.10.2"
kotlinx-coroutines-rx3 = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.10.2"
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.9.0" }
ktlint = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlint" }
ktlint-twitter-compose = "com.twitter.compose.rules:ktlint:0.0.26"
@@ -89,20 +89,20 @@ ktlint-twitter-compose = "com.twitter.compose.rules:ktlint:0.0.26"
# Android X
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-core-ktx = "androidx.core:core-ktx:1.15.0"
androidx-core-ktx = "androidx.core:core-ktx:1.18.0"
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" }
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "androidx-fragment" }
androidx-fragment-compose = { module = "androidx.fragment:fragment-compose", version.ref = "androidx-fragment" }
androidx-annotation = "androidx.annotation:annotation:1.9.1"
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.2.0"
androidx-annotation = "androidx.annotation:annotation:1.10.0"
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.2.1"
androidx-window-window = { module = "androidx.window:window", version.ref = "androidx-window" }
androidx-window-java = { module = "androidx.window:window-java", version.ref = "androidx-window" }
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.4.0"
androidx-legacy-support = "androidx.legacy:legacy-support-v13:1.0.0"
androidx-legacy-preference = "androidx.legacy:legacy-preference-v14:1.0.0"
androidx-preference = "androidx.preference:preference:1.2.1"
androidx-gridlayout = "androidx.gridlayout:gridlayout:1.0.0"
androidx-exifinterface = "androidx.exifinterface:exifinterface:1.3.7"
androidx-gridlayout = "androidx.gridlayout:gridlayout:1.1.0"
androidx-exifinterface = "androidx.exifinterface:exifinterface:1.4.2"
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3" }
androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3" }
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3" }
@@ -129,42 +129,42 @@ androidx-camera-lifecycle = { module = "androidx.camera:camera-lifecycle", versi
androidx-camera-view = { module = "androidx.camera:camera-view", version.ref = "androidx-camera" }
androidx-camera-video = { module = "androidx.camera:camera-video", version.ref = "androidx-camera" }
androidx-camera-compose = { module = "androidx.camera:camera-compose", version.ref = "androidx-camera" }
androidx-concurrent-futures = "androidx.concurrent:concurrent-futures:1.2.0"
androidx-autofill = "androidx.autofill:autofill:1.1.0"
androidx-concurrent-futures = "androidx.concurrent:concurrent-futures:1.3.0"
androidx-autofill = "androidx.autofill:autofill:1.3.0"
androidx-biometric = "androidx.biometric:biometric:1.1.0"
androidx-sharetarget = "androidx.sharetarget:sharetarget:1.2.0"
androidx-sqlite = "androidx.sqlite:sqlite:2.6.2"
androidx-sqlite-framework = "androidx.sqlite:sqlite-framework:2.6.2"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.1"
androidx-asynclayoutinflater = "androidx.asynclayoutinflater:asynclayoutinflater:1.1.0-alpha01"
androidx-asynclayoutinflater-appcompat = "androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0-alpha01"
androidx-emoji2 = "androidx.emoji2:emoji2:1.5.0"
androidx-asynclayoutinflater = "androidx.asynclayoutinflater:asynclayoutinflater:1.1.0"
androidx-asynclayoutinflater-appcompat = "androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0"
androidx-emoji2 = "androidx.emoji2:emoji2:1.6.0"
androidx-core-telecom = { module = "androidx.core:core-telecom", version.ref = "androidx-core-telecom" }
androidx-documentfile = "androidx.documentfile:documentfile:1.0.1"
androidx-credentials = "androidx.credentials:credentials:1.5.0"
androidx-credentials-compat = "androidx.credentials:credentials-play-services-auth:1.5.0"
android-billing = "com.android.billingclient:billing-ktx:7.1.1"
androidx-credentials = "androidx.credentials:credentials:1.6.0"
androidx-credentials-compat = "androidx.credentials:credentials-play-services-auth:1.6.0"
android-billing = "com.android.billingclient:billing-ktx:8.3.0"
# Billing
material-material = "com.google.android.material:material:1.12.0"
# Google
google-libphonenumber = "com.googlecode.libphonenumber:libphonenumber:8.13.50"
google-play-services-base = "com.google.android.gms:play-services-base:18.5.0"
google-play-services-maps = "com.google.android.gms:play-services-maps:19.0.0"
google-play-services-auth = "com.google.android.gms:play-services-auth:21.3.0"
google-libphonenumber = "com.googlecode.libphonenumber:libphonenumber:9.0.29"
google-play-services-base = "com.google.android.gms:play-services-base:18.10.0"
google-play-services-maps = "com.google.android.gms:play-services-maps:20.0.0"
google-play-services-auth = "com.google.android.gms:play-services-auth:21.5.1"
google-play-services-wallet = "com.google.android.gms:play-services-wallet:19.4.0"
google-signin = "com.google.android.libraries.identity.googleid:googleid:1.1.1"
google-signin = "com.google.android.libraries.identity.googleid:googleid:1.2.0"
google-zxing-android-integration = "com.google.zxing:android-integration:3.3.0"
google-zxing-core = "com.google.zxing:core:3.4.1"
google-zxing-core = "com.google.zxing:core:3.5.4"
google-ez-vcard = "com.googlecode.ez-vcard:ez-vcard:0.9.11"
google-jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
google-guava-android = "com.google.guava:guava:33.3.1-android"
google-guava-android = "com.google.guava:guava:33.6.0-android"
google-flexbox = "com.google.android.flexbox:flexbox:3.0.0"
com-google-devtools-ksp-gradle-plugin = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.2.20-2.0.2"
com-google-devtools-ksp-gradle-plugin = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.3.2"
# Firebase
firebase-messaging = "com.google.firebase:firebase-messaging:24.1.0"
firebase-messaging = "com.google.firebase:firebase-messaging:25.0.1"
# 1st Party
libsignal-client = { module = "org.signal:libsignal-client", version.ref = "libsignal-client" }
@@ -178,27 +178,27 @@ signal-android-database-sqlcipher = "net.zetetic:sqlcipher-android:4.14.0"
greenrobot-eventbus = "org.greenrobot:eventbus:3.0.0"
jackson-core = "com.fasterxml.jackson.core:jackson-databind:2.12.0"
jackson-module-kotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:2.12.0"
square-okhttp3 = "com.squareup.okhttp3:okhttp:5.0.0-alpha.16"
square-okio = "com.squareup.okio:okio:3.12.0"
square-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.7"
rxjava3-rxjava = "io.reactivex.rxjava3:rxjava:3.0.13"
rxjava3-rxandroid = "io.reactivex.rxjava3:rxandroid:3.0.0"
square-okhttp3 = "com.squareup.okhttp3:okhttp:5.3.2"
square-okio = "com.squareup.okio:okio:3.17.0"
square-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.14"
rxjava3-rxjava = "io.reactivex.rxjava3:rxjava:3.1.12"
rxjava3-rxandroid = "io.reactivex.rxjava3:rxandroid:3.0.2"
rxjava3-rxkotlin = "io.reactivex.rxjava3:rxkotlin:3.0.1"
rxdogtag = "com.uber.rxdogtag2:rxdogtag:2.0.1"
rxdogtag = "com.uber.rxdogtag2:rxdogtag:2.0.2"
conscrypt-android = "org.conscrypt:conscrypt-android:2.5.3"
mobilecoin = "com.mobilecoin:android-sdk:6.1.2"
leolin-shortcutbadger = "me.leolin:ShortcutBadger:1.1.22"
glide-glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glide" }
roundedimageview = "com.makeramen:roundedimageview:2.1.0"
roundedimageview = "com.makeramen:roundedimageview:2.3.0"
materialish-progress = "com.pnikosis:materialish-progress:1.7"
subsampling-scale-image-view = "com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0"
lottie = "com.airbnb.android:lottie:6.4.0"
lottie-compose = "com.airbnb.android:lottie-compose:6.4.0"
dnsjava = "dnsjava:dnsjava:2.1.9"
lottie = "com.airbnb.android:lottie:6.7.1"
lottie-compose = "com.airbnb.android:lottie-compose:6.7.1"
dnsjava = "dnsjava:dnsjava:3.6.4"
nanohttpd-webserver = { module = "org.nanohttpd:nanohttpd-webserver", version.ref = "nanohttpd" }
nanohttpd-websocket = { module = "org.nanohttpd:nanohttpd-websocket", version.ref = "nanohttpd" }
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5"
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.4.0"
# Can't use the newest version because it hits some weird NoClassDefFoundException
jknack-handlebars = "com.github.jknack:handlebars:4.0.7"
+1 -1
View File
@@ -2,7 +2,7 @@
# ./gradlew --write-verification-metadata sha256 qa --rerun-tasks
[versions]
lint = "31.13.2"
lint = "32.1.1"
[libraries]
lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+10 -6
View File
@@ -1,15 +1,17 @@
@file:Suppress("UnstableApiUsage")
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.library")
id("androidx.benchmark")
id("org.jetbrains.kotlin.android")
id("ktlint")
}
android {
namespace = "org.signal.microbenchmark"
compileSdkVersion = libs.versions.compileSdk.get()
compileSdkVersion(libs.versions.compileSdk.get())
compileOptions {
isCoreLibraryDesugaringEnabled = true
@@ -17,10 +19,6 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.javaVersion.get())
}
kotlinOptions {
jvmTarget = libs.versions.kotlinJvmTarget.get()
}
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
@@ -43,6 +41,12 @@ android {
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.kotlinJvmTarget.get())
}
}
dependencies {
coreLibraryDesugaring(libs.android.tools.desugar)
lintChecks(project(":lintchecks"))
+1 -1
View File
@@ -16,7 +16,7 @@ RUN apt install -y git openjdk-17-jdk unzip wget
ENV ANDROID_COMMAND_LINE_TOOLS_FILENAME commandlinetools-linux-10406996_latest.zip
ENV ANDROID_API_LEVELS android-36
ENV ANDROID_BUILD_TOOLS_VERSION 35.0.0
ENV ANDROID_BUILD_TOOLS_VERSION 36.0.0
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/cmdline-tools/bin
+1 -1
View File
@@ -13,5 +13,5 @@ repositories {
}
dependencies {
implementation("com.squareup.wire:wire-schema:4.4.3")
implementation("com.squareup.wire:wire-schema:6.0.0-alpha02")
}
@@ -3,7 +3,13 @@ package org.signal.wire
import com.squareup.wire.schema.SchemaHandler
class Factory : SchemaHandler.Factory {
override fun create(): SchemaHandler {
override fun create(
includes: List<String>,
excludes: List<String>,
exclusive: Boolean,
outDirectory: String,
options: Map<String, String>
): SchemaHandler {
return Handler()
}
}
Binary file not shown.