-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
SentryPluginMRJarTest.kt
65 lines (50 loc) · 1.7 KB
/
SentryPluginMRJarTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package io.sentry.android.gradle
import kotlin.test.assertTrue
import org.junit.Test
class SentryPluginMRJarTest :
BaseSentryPluginTest(androidGradlePluginVersion = "7.0.4", gradleVersion = "7.1.1") {
@Test
fun `does not break when there is a MR-JAR dependency with unsupported java version`() {
appBuildFile.writeText(
// language=Groovy
"""
plugins {
id "com.android.application"
id "io.sentry.android.gradle"
}
dependencies {
implementation("com.squareup.moshi:moshi-kotlin:1.13.0")
}
sentry.tracingInstrumentation.enabled = true
""".trimIndent()
)
val result = runner
.appendArguments("app:assembleDebug")
.build()
print(result.output)
assertTrue { "BUILD SUCCESSFUL" in result.output }
}
@Test
fun `shows a warning when there is a signed MR-JAR dependency`() {
appBuildFile.writeText(
// language=Groovy
"""
plugins {
id "com.android.application"
id "io.sentry.android.gradle"
}
dependencies {
implementation("org.bouncycastle:bcprov-jdk15on:1.63")
}
sentry.tracingInstrumentation.enabled = true
""".trimIndent()
)
val result = runner
.appendArguments("app:assembleDebug")
.build()
print(result.output)
assertTrue { "Please update to AGP >= 7.1.2" in result.output }
assertTrue { "BUILD SUCCESSFUL" in result.output }
}
override val additionalRootProjectConfig: String = ""
}