Skip to content

Commit

Permalink
chore: upgrade APG to 8.3.2 (#3079)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods authored Jun 6, 2024
1 parent d0b2c78 commit 1f8b72e
Show file tree
Hide file tree
Showing 11 changed files with 346 additions and 373 deletions.
656 changes: 328 additions & 328 deletions app/lint-baseline.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ import com.wire.kalium.logic.data.conversation.Conversation
import com.wire.kalium.logic.data.conversation.MutedConversationStatus
import com.wire.kalium.logic.data.id.ConversationId
import com.wire.kalium.logic.data.id.GroupID
import com.wire.kalium.logic.data.mls.CipherSuite
import kotlinx.coroutines.launch
import kotlinx.datetime.Instant

Expand Down Expand Up @@ -587,7 +588,7 @@ fun PreviewGroupConversationDetails() {
groupState = Conversation.ProtocolInfo.MLSCapable.GroupState.ESTABLISHED,
epoch = ULong.MIN_VALUE,
keyingMaterialLastUpdate = Instant.fromEpochMilliseconds(1648654560000),
cipherSuite = Conversation.CipherSuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
cipherSuite = CipherSuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
),
mlsVerificationStatus = Conversation.VerificationStatus.VERIFIED,
isUnderLegalHold = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fun ConversationProtocolDetails(
if (protocolInfo is Conversation.ProtocolInfo.MLS) {
ProtocolDetails(
label = UIText.StringResource(R.string.cipher_suite),
text = UIText.DynamicString(protocolInfo.cipherSuite.name)
text = UIText.DynamicString(protocolInfo.cipherSuite.toString())
)

if (BuildConfig.PRIVATE_BUILD) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ fun PreviewEndToEndIdentityCertificateItem() {
isE2eiCertificateActivated = true,
isCurrentDevice = false,
certificate = E2eiCertificate(
userHandle = "user_handle",
status = CertificateStatus.VALID,
serialNumber = "e5:d5:e6:75:7e:04:86:07:14:3c:a0:ed:9a:8d:e4:fd",
certificateDetail = "",
thumbprint = "thumbPrint",
endAt = Instant.DISTANT_FUTURE
),
isLoadingCertificate = false,
Expand All @@ -217,9 +219,11 @@ fun PreviewEndToEndIdentityCertificateSelfItem() {
isE2eiCertificateActivated = true,
isCurrentDevice = true,
certificate = E2eiCertificate(
userHandle = "user_handle",
status = CertificateStatus.VALID,
serialNumber = "e5:d5:e6:75:7e:04:86:07:14:3c:a0:ed:9a:8d:e4:fd",
certificateDetail = "",
thumbprint = "thumbPrint",
endAt = Instant.DISTANT_FUTURE
),
isLoadingCertificate = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ data class DeviceDetailsState(
val userName: String? = null,
val isE2eiCertificateActivated: Boolean = false,
val e2eiCertificate: E2eiCertificate = E2eiCertificate(
userHandle = "",
status = CertificateStatus.EXPIRED,
serialNumber = "",
certificateDetail = "",
thumbprint = "",
endAt = Instant.DISTANT_FUTURE
),
val canBeRemoved: Boolean = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import findVersion
import org.gradle.api.Project

internal fun Project.configureCompose(
commonExtension: CommonExtension<*, *, *, *, *>, // Add another `*` when upgrading AGP to 8.3
commonExtension: CommonExtension<*, *, *, *, *, *>,
): Unit = with(commonExtension) {
buildFeatures {
compose = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import versionCatalog
import findLibrary

internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, *, *>, // Add another `*` when upgrading AGP to 8.3
commonExtension: CommonExtension<*, *, *, *, *, *>,
): Unit = with(commonExtension) {
compileSdk = AndroidSdk.compile

Expand Down Expand Up @@ -76,7 +76,7 @@ private fun Project.configureKotlin() {
}
}

private fun CommonExtension<*, *, *, *, *>.configureLint(project: Project) {
private fun CommonExtension<*, *, *, *, *, *>.configureLint(project: Project) {
lint {
showAll = true
explainIssues = true
Expand All @@ -99,8 +99,7 @@ private fun CommonExtension<*, *, *, *, *>.configureLint(project: Project) {
}
}

// Add another `*` when upgrading AGP to 8.3
internal fun CommonExtension<*, *, *, *, *>.configureAndroidKotlinTests() {
internal fun CommonExtension<*, *, *, *, *, *>.configureAndroidKotlinTests() {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments.putAll(
Expand Down
35 changes: 1 addition & 34 deletions core/ui-common/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.2.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0)" variant="all" version="8.2.0">
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0)" variant="all" version="8.3.0">

<issue
id="ComposeComposableModifier"
Expand Down Expand Up @@ -67,17 +67,6 @@
column="9"/>
</issue>

<issue
id="ComposeModifierMissing"
message="This @Composable function emits content but doesn&apos;t have a modifier parameter.See https://slackhq.github.io/compose-lints/rules/#when-should-i-expose-modifier-parameters for more information."
errorLine1="fun MenuModalSheetContent("
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/kotlin/com/wire/android/ui/common/bottomsheet/WireModalSheetLayout.kt"
line="87"
column="5"/>
</issue>

<issue
id="ComposeModifierReused"
message="Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a capital &apos;M&apos;) to construct a new Modifier that you can pass to other composables.See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for more information."
Expand Down Expand Up @@ -254,28 +243,6 @@
column="32"/>
</issue>

<issue
id="ComposeParameterOrder"
message="Parameters in a composable function should be ordered following this pattern: params without defaults, modifiers, params with defaults and optionally, a trailing function that might not have a default param.&#xA;Current params are: [sheetState: WireModalSheetState, coroutineScope: CoroutineScope, header: MenuModalSheetHeader = MenuModalSheetHeader.Gone, menuItems: List&lt;@Composable () -> Unit>] but should be [sheetState: WireModalSheetState, coroutineScope: CoroutineScope, menuItems: List&lt;@Composable () -> Unit>, header: MenuModalSheetHeader = MenuModalSheetHeader.Gone].&#xA;See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly for more information."
errorLine1="fun MenuModalSheetLayout("
errorLine2=" ^">
<location
file="src/main/kotlin/com/wire/android/ui/common/bottomsheet/WireModalSheetLayout.kt"
line="73"
column="25"/>
</issue>

<issue
id="ComposeParameterOrder"
message="Parameters in a composable function should be ordered following this pattern: params without defaults, modifiers, params with defaults and optionally, a trailing function that might not have a default param.&#xA;Current params are: [header: MenuModalSheetHeader = MenuModalSheetHeader.Gone, menuItems: List&lt;@Composable () -> Unit>] but should be [menuItems: List&lt;@Composable () -> Unit>, header: MenuModalSheetHeader = MenuModalSheetHeader.Gone].&#xA;See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly for more information."
errorLine1="fun MenuModalSheetContent("
errorLine2=" ^">
<location
file="src/main/kotlin/com/wire/android/ui/common/bottomsheet/WireModalSheetLayout.kt"
line="87"
column="26"/>
</issue>

<issue
id="ComposeParameterOrder"
message=" Parameters in a composable function should be ordered following this pattern: params without defaults, modifiers, params with defaults and optionally, a trailing function that might not have a default param.&#xA; Current params are: [onClick: () -> Unit, loading: Boolean = false, leadingIcon: @Composable (() -> Unit)? = null, leadingIconAlignment: IconAlignment = IconAlignment.Center, trailingIcon: @Composable (() -> Unit)? = null, trailingIconAlignment: IconAlignment = IconAlignment.Border, text: String? = null, fillMaxWidth: Boolean = true, textStyle: TextStyle = if (fillMaxWidth) MaterialTheme.wireTypography.button02 else MaterialTheme.wireTypography.button03, state: WireButtonState = WireButtonState.Default, clickBlockParams: ClickBlockParams = ClickBlockParams(), minSize: DpSize = MaterialTheme.wireDimensions.buttonMinSize, minClickableSize: DpSize = MaterialTheme.wireDimensions.buttonMinClickableSize, shape: Shape = RoundedCornerShape(MaterialTheme.wireDimensions.buttonCornerSize), colors: WireButtonColors = wirePrimaryButtonColors(), elevation: ButtonElevation? = ButtonDefaults.buttonElevation(), borderWidth: Dp = 0.dp, contentPadding: PaddingValues = PaddingValues(&#xA; horizontal = MaterialTheme.wireDimensions.buttonHorizontalContentPadding,&#xA; vertical = MaterialTheme.wireDimensions.buttonVerticalContentPadding&#xA;), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, modifier: Modifier = Modifier] but should be [onClick: () -> Unit, modifier: Modifier = Modifier, loading: Boolean = false, leadingIcon: @Composable (() -> Unit)? = null, leadingIconAlignment: IconAlignment = IconAlignment.Center, trailingIcon: @Composable (() -> Unit)? = null, trailingIconAlignment: IconAlignment = IconAlignment.Border, text: String? = null, fillMaxWidth: Boolean = true, textStyle: TextStyle = if (fillMaxWidth) MaterialTheme.wireTypography.button02 else MaterialTheme.wireTypography.button03, state: WireButtonState = WireButtonState.Default, clickBlockParams: ClickBlockParams = ClickBlockParams(), minSize: DpSize = MaterialTheme.wireDimensions.buttonMinSize, minClickableSize: DpSize = MaterialTheme.wireDimensions.buttonMinClickableSize, shape: Shape = RoundedCornerShape(MaterialTheme.wireDimensions.buttonCornerSize), colors: WireButtonColors = wirePrimaryButtonColors(), elevation: ButtonElevation? = ButtonDefaults.buttonElevation(), borderWidth: Dp = 0.dp, contentPadding: PaddingValues = PaddingValues(&#xA; horizontal = MaterialTheme.wireDimensions.buttonHorizontalContentPadding,&#xA; vertical = MaterialTheme.wireDimensions.buttonVerticalContentPadding&#xA;), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }].&#xA; See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly for more information."
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
# Gradle - Remind to change in `gradle-wrapper.properties` file as well!
androidJunit5 = "1.10.0.0"
gradle = "8.5"
gradle = "8.8"

# Kotlin
grgitCore = "5.2.2"
Expand All @@ -17,7 +17,7 @@ ktx-serialization = "1.6.3"
detekt = "1.23.6"
google-gms = "4.4.1"
gms-location = "21.2.0"
android-gradlePlugin = "8.2.0"
android-gradlePlugin = "8.3.2"
desugaring = "2.0.4"
firebaseBOM = "32.8.1"
fragment = "1.5.6"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 393 files

0 comments on commit 1f8b72e

Please sign in to comment.