Skip to content

Commit 90a8cdb

Browse files
authored
Include version in dependency auto install messages (#979)
1 parent e59b582 commit 90a8cdb

16 files changed

+24
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Add upload functionality for size analysis ([#915](https://github.com/getsentry/sentry-android-gradle-plugin/pull/915))
88
- Add VCS info extension for build uploads with customizable version control metadata ([#969](https://github.com/getsentry/sentry-android-gradle-plugin/pull/969))
9+
- Include version in logs if auto install refuses to install a dependency ([#979](https://github.com/getsentry/sentry-android-gradle-plugin/pull/979))
910

1011
### Fixes
1112

plugin-build/src/main/kotlin/io/sentry/android/gradle/autoinstall/AbstractInstallStrategy.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class AbstractInstallStrategy : ComponentMetadataRule {
3232
parseVersion(context.details.id.version)?.let { thirdPartySemVersion ->
3333
if (thirdPartySemVersion < it) {
3434
logger.info {
35-
"$sentryModuleId won't be installed because the current version is " +
35+
"$sentryModuleId won't be installed because the current version ($thirdPartySemVersion) is " +
3636
"lower than the minimum supported version ($it)"
3737
}
3838
return
@@ -43,8 +43,8 @@ abstract class AbstractInstallStrategy : ComponentMetadataRule {
4343
parseVersion(context.details.id.version)?.let { thirdPartySemVersion ->
4444
if (thirdPartySemVersion > it) {
4545
logger.info {
46-
"$sentryModuleId won't be installed because the current version is " +
47-
"higher than the maximum supported version ($it)"
46+
"$sentryModuleId won't be installed because the current version ($thirdPartySemVersion) " +
47+
"is higher than the maximum supported version ($it)"
4848
}
4949
return
5050
}
@@ -57,7 +57,7 @@ abstract class AbstractInstallStrategy : ComponentMetadataRule {
5757
if (sentrySemVersion < minSupportedSentryVersion) {
5858
logger.warn {
5959
"$sentryModuleId won't be installed because the current sentry version " +
60-
"is lower than the minimum supported sentry version " +
60+
"($sentrySemVersion) is lower than the minimum supported sentry version " +
6161
"($minSupportedSentryVersion)"
6262
}
6363
return
@@ -78,7 +78,7 @@ abstract class AbstractInstallStrategy : ComponentMetadataRule {
7878
if (sentrySemVersion > maxSupportedSentryVersion) {
7979
logger.debug {
8080
"$sentryModuleId won't be installed because the current sentry version " +
81-
"is higher than the maximum supported sentry version " +
81+
"($sentrySemVersion) is higher than the maximum supported sentry version " +
8282
"($maxSupportedSentryVersion)"
8383
}
8484
return

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/compose/ComposeInstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ComposeInstallStrategyTest {
6464
assertTrue {
6565
fixture.logger.capturedMessage ==
6666
"[sentry] sentry-compose-android won't be installed because the current " +
67-
"version is lower than the minimum supported version (1.0.0)"
67+
"version (0.9.0) is lower than the minimum supported version (1.0.0)"
6868
}
6969
verify(fixture.metadataDetails, never()).allVariants(any())
7070
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/graphql/Graphql22InstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Graphql22InstallStrategyTest {
8080
assertTrue {
8181
fixture.logger.capturedMessage ==
8282
"[sentry] sentry-graphql-22 won't be installed because the current " +
83-
"version is lower than the minimum supported version (22.0.0)"
83+
"version (21.9.0) is lower than the minimum supported version (22.0.0)"
8484
}
8585
verify(fixture.metadataDetails, never()).allVariants(any())
8686
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/graphql/GraphqlInstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class GraphqlInstallStrategyTest {
8080
assertTrue {
8181
fixture.logger.capturedMessage ==
8282
"[sentry] sentry-graphql won't be installed because the current " +
83-
"version is higher than the maximum supported version (21.9999.9999)"
83+
"version (22.1.0) is higher than the maximum supported version (21.9999.9999)"
8484
}
8585
verify(fixture.metadataDetails, never()).allVariants(any())
8686
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/kotlin/KotlinExtensionsInstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class KotlinExtensionsInstallStrategyTest {
6464
assertTrue {
6565
fixture.logger.capturedMessage ==
6666
"[sentry] sentry-kotlin-extensions won't be installed because the current " +
67-
"version is lower than the minimum supported version (1.6.1)"
67+
"version (1.6.0) is lower than the minimum supported version (1.6.1)"
6868
}
6969
verify(fixture.metadataDetails, never()).allVariants(any())
7070
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/log4j2/Log4j2InstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Log4j2InstallStrategyTest {
6363
assertTrue {
6464
fixture.logger.capturedMessage ==
6565
"[sentry] sentry-log4j2 won't be installed because the current " +
66-
"version is lower than the minimum supported version (2.0.0)"
66+
"version (1.0.0) is lower than the minimum supported version (2.0.0)"
6767
}
6868
verify(fixture.metadataDetails, never()).allVariants(any())
6969
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/logback/LogbackInstallStrategyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class LogbackInstallStrategyTest {
6363
assertTrue {
6464
fixture.logger.capturedMessage ==
6565
"[sentry] sentry-logback won't be installed because the current " +
66-
"version is lower than the minimum supported version (1.0.0)"
66+
"version (0.0.1) is lower than the minimum supported version (1.0.0)"
6767
}
6868
verify(fixture.metadataDetails, never()).allVariants(any())
6969
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/okhttp/AndroidOkHttpInstallStrategyTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AndroidOkHttpInstallStrategyTest {
6767
assertTrue {
6868
fixture.logger.capturedMessage ==
6969
"[sentry] sentry-android-okhttp won't be installed because the current " +
70-
"version is lower than the minimum supported version (3.13.0)"
70+
"version (3.11.0) is lower than the minimum supported version (3.13.0)"
7171
}
7272
verify(fixture.metadataDetails, never()).allVariants(any())
7373
}
@@ -80,7 +80,7 @@ class AndroidOkHttpInstallStrategyTest {
8080
assertTrue {
8181
fixture.logger.capturedMessage ==
8282
"[sentry] sentry-android-okhttp won't be installed because the current " +
83-
"sentry version is higher than the maximum supported sentry version (6.9999.9999)"
83+
"sentry version (7.0.0) is higher than the maximum supported sentry version (6.9999.9999)"
8484
}
8585
verify(fixture.metadataDetails, never()).allVariants(any())
8686
}

plugin-build/src/test/kotlin/io/sentry/android/gradle/autoinstall/okhttp/OkHttpInstallStrategyTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class OkHttpInstallStrategyTest {
6767
assertTrue {
6868
fixture.logger.capturedMessage ==
6969
"[sentry] sentry-okhttp won't be installed because the current " +
70-
"version is lower than the minimum supported version (3.13.0)"
70+
"version (3.11.0) is lower than the minimum supported version (3.13.0)"
7171
}
7272
verify(fixture.metadataDetails, never()).allVariants(any())
7373
}
@@ -80,7 +80,7 @@ class OkHttpInstallStrategyTest {
8080
assertTrue {
8181
fixture.logger.capturedMessage ==
8282
"[sentry] sentry-okhttp won't be installed because the current sentry " +
83-
"version is lower than the minimum supported sentry version (7.0.0)"
83+
"version (6.33.0) is lower than the minimum supported sentry version (7.0.0)"
8484
}
8585
verify(fixture.metadataDetails, never()).allVariants(any())
8686
}

0 commit comments

Comments
 (0)