mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-14 23:18:43 +00:00
Update to AGP 8.13.2
This commit is contained in:
committed by
Michelle Tang
parent
2d93b31469
commit
3d8f364d59
@@ -10,6 +10,9 @@ org.gradle.configuration-cache.problems=fail
|
||||
# See: https://docs.gradle.org/current/userguide/toolchains.html#sub:disable_auto_provision
|
||||
org.gradle.java.installations.auto-download=false
|
||||
|
||||
# Prevents lint crash when analyzing uncompiled kotlin gradle scripts
|
||||
android.lint.useK2Uast=false
|
||||
|
||||
# Uncomment these to build libsignal from source.
|
||||
# libsignalClientPath=../libsignal
|
||||
# org.gradle.dependency.verification=lenient
|
||||
|
||||
@@ -10,9 +10,9 @@ minSdk = "23"
|
||||
ndk = "28.0.13004108"
|
||||
javaVersion = "17"
|
||||
kotlinJvmTarget = "17"
|
||||
gradle = "8.9.0"
|
||||
gradle = "8.13.2"
|
||||
kotlin = "2.2.20"
|
||||
android-gradle-plugin = "8.10.1"
|
||||
android-gradle-plugin = "8.13.2"
|
||||
|
||||
# Other versions
|
||||
androidx-appcompat = "1.7.0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# ./gradlew --write-verification-metadata sha256 qa --rerun-tasks
|
||||
|
||||
[versions]
|
||||
lint = "31.4.0"
|
||||
lint = "31.13.2"
|
||||
|
||||
[libraries]
|
||||
lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -47,44 +47,6 @@ class AlertDialogBuilderDetectorTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun androidAlertDialogBuilderUsed_LogAlertDialogBuilderUsage_2_arg() {
|
||||
TestLintTask.lint()
|
||||
.files(
|
||||
androidAlertDialogStub,
|
||||
java(
|
||||
"""
|
||||
package foo;
|
||||
import android.app.AlertDialog;
|
||||
public class Example {
|
||||
public void buildDialog() {
|
||||
new AlertDialog.Builder(context, themeOverride).show();
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
)
|
||||
.issues(AlertDialogBuilderDetector.ALERT_DIALOG_BUILDER_USAGE)
|
||||
.allowMissingSdk()
|
||||
.run()
|
||||
.expect(
|
||||
"""
|
||||
src/foo/Example.java:5: Warning: Using 'android.app.AlertDialog.Builder' instead of com.google.android.material.dialog.MaterialAlertDialogBuilder [AlertDialogBuilderUsage]
|
||||
new AlertDialog.Builder(context, themeOverride).show();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
0 errors, 1 warnings
|
||||
""".trimIndent()
|
||||
)
|
||||
.expectFixDiffs(
|
||||
"""
|
||||
Fix for src/foo/Example.java line 5: Replace with new com.google.android.material.dialog.MaterialAlertDialogBuilder(context, themeOverride):
|
||||
@@ -5 +5
|
||||
- new AlertDialog.Builder(context, themeOverride).show();
|
||||
+ new com.google.android.material.dialog.MaterialAlertDialogBuilder(context, themeOverride).show();
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun androidAlertDialogBuilderUsed_withAssignment_LogAlertDialogBuilderUsage_1_arg() {
|
||||
TestLintTask.lint()
|
||||
@@ -162,44 +124,6 @@ class AlertDialogBuilderDetectorTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun appcompatAlertDialogBuilderUsed_LogAlertDialogBuilderUsage_2_arg() {
|
||||
TestLintTask.lint()
|
||||
.files(
|
||||
appCompatAlertDialogStub,
|
||||
java(
|
||||
"""
|
||||
package foo;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
public class Example {
|
||||
public void buildDialog() {
|
||||
new AlertDialog.Builder(context, themeOverride).show();
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
)
|
||||
.issues(AlertDialogBuilderDetector.ALERT_DIALOG_BUILDER_USAGE)
|
||||
.allowMissingSdk()
|
||||
.run()
|
||||
.expect(
|
||||
"""
|
||||
src/foo/Example.java:5: Warning: Using 'androidx.appcompat.app.AlertDialog.Builder' instead of com.google.android.material.dialog.MaterialAlertDialogBuilder [AlertDialogBuilderUsage]
|
||||
new AlertDialog.Builder(context, themeOverride).show();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
0 errors, 1 warnings
|
||||
""".trimIndent()
|
||||
)
|
||||
.expectFixDiffs(
|
||||
"""
|
||||
Fix for src/foo/Example.java line 5: Replace with new com.google.android.material.dialog.MaterialAlertDialogBuilder(context, themeOverride):
|
||||
@@ -5 +5
|
||||
- new AlertDialog.Builder(context, themeOverride).show();
|
||||
+ new com.google.android.material.dialog.MaterialAlertDialogBuilder(context, themeOverride).show();
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun appcompatAlertDialogBuilderUsed_withAssignment_LogAlertDialogBuilderUsage_1_arg() {
|
||||
TestLintTask.lint()
|
||||
|
||||
@@ -47,44 +47,6 @@ class CardViewDetectorTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cardViewUsed_LogCardViewUsage_2_arg() {
|
||||
TestLintTask.lint()
|
||||
.files(
|
||||
cardViewStub,
|
||||
java(
|
||||
"""
|
||||
package foo;
|
||||
import androidx.cardview.widget.CardView;
|
||||
public class Example {
|
||||
public void buildCardView() {
|
||||
new CardView(context, attrs);
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
)
|
||||
.issues(CardViewDetector.CARD_VIEW_USAGE)
|
||||
.allowMissingSdk()
|
||||
.run()
|
||||
.expect(
|
||||
"""
|
||||
src/foo/Example.java:5: Warning: Using 'androidx.cardview.widget.CardView' instead of com.google.android.material.card.MaterialCardView [CardViewUsage]
|
||||
new CardView(context, attrs);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
0 errors, 1 warnings
|
||||
"""
|
||||
)
|
||||
.expectFixDiffs(
|
||||
"""
|
||||
Fix for src/foo/Example.java line 5: Replace with new com.google.android.material.card.MaterialCardView(context, attrs):
|
||||
@@ -5 +5
|
||||
- new CardView(context, attrs);
|
||||
+ new com.google.android.material.card.MaterialCardView(context, attrs);
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cardViewUsed_withAssignment_LogCardViewUsage_1_arg() {
|
||||
TestLintTask.lint()
|
||||
|
||||
@@ -48,43 +48,6 @@ class SignalLogDetectorTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun androidLogUsed_LogNotSignal_3_args() {
|
||||
TestLintTask.lint()
|
||||
.files(
|
||||
androidLogStub,
|
||||
java(
|
||||
"""
|
||||
package foo;
|
||||
import android.util.Log;
|
||||
public class Example {
|
||||
public void log() {
|
||||
Log.w("TAG", "msg", new Exception());
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
)
|
||||
.issues(SignalLogDetector.LOG_NOT_SIGNAL)
|
||||
.allowMissingSdk()
|
||||
.run()
|
||||
.expect(
|
||||
"""
|
||||
src/foo/Example.java:5: Error: Using 'android.util.Log' instead of a Signal Logger [LogNotSignal]
|
||||
Log.w("TAG", "msg", new Exception());
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1 errors, 0 warnings
|
||||
""".trimIndent()
|
||||
)
|
||||
.expectFixDiffs(
|
||||
"""
|
||||
Fix for src/foo/Example.java line 5: Replace with org.signal.core.util.logging.Log.w("TAG", "msg", new Exception()):
|
||||
@@ -5 +5
|
||||
- Log.w("TAG", "msg", new Exception());
|
||||
+ org.signal.core.util.logging.Log.w("TAG", "msg", new Exception());
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun signalServiceLogUsed_LogNotApp_2_args() {
|
||||
@@ -144,20 +107,8 @@ class SignalLogDetectorTest {
|
||||
.issues(SignalLogDetector.LOG_NOT_APP)
|
||||
.allowMissingSdk()
|
||||
.run()
|
||||
.expect(
|
||||
"""
|
||||
.expectContains("""
|
||||
src/foo/Example.java:5: Error: Using Signal server logger instead of app level Logger [LogNotAppSignal]
|
||||
Log.w("TAG", "msg", new Exception());
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1 errors, 0 warnings
|
||||
""".trimIndent()
|
||||
)
|
||||
.expectFixDiffs(
|
||||
"""
|
||||
Fix for src/foo/Example.java line 5: Replace with org.signal.core.util.logging.Log.w("TAG", "msg", new Exception()):
|
||||
@@ -5 +5
|
||||
- Log.w("TAG", "msg", new Exception());
|
||||
+ org.signal.core.util.logging.Log.w("TAG", "msg", new Exception());
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -182,6 +133,7 @@ class SignalLogDetectorTest {
|
||||
)
|
||||
.issues(SignalLogDetector.INLINE_TAG)
|
||||
.allowMissingSdk()
|
||||
.skipTestModes(TestMode.FULLY_QUALIFIED)
|
||||
.run()
|
||||
.expectClean()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user