Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test with other plugins that resolve dependency tree (#…
…442)
- Loading branch information
Showing
3 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...uild/src/test/kotlin/io/sentry/android/gradle/SentryPluginWithDependencyCollectorsTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package io.sentry.android.gradle | ||
|
||
import org.junit.Test | ||
import kotlin.test.assertTrue | ||
|
||
class SentryPluginWithDependencyCollectorsTest : | ||
BaseSentryPluginTest(androidGradlePluginVersion = "7.3.0", gradleVersion = "7.6") { | ||
|
||
@Test | ||
fun `does not break when there are plugins that collect dependencies applied`() { | ||
appBuildFile.writeText( | ||
// language=Groovy | ||
""" | ||
plugins { | ||
id "com.android.application" | ||
id "io.sentry.android.gradle" | ||
id "com.mikepenz.aboutlibraries.plugin" | ||
id "com.google.android.gms.oss-licenses-plugin" | ||
} | ||
android { | ||
namespace 'com.example' | ||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
} | ||
} | ||
} | ||
dependencies { | ||
implementation 'androidx.compose.runtime:runtime:1.3.0' | ||
implementation 'androidx.compose.ui:ui:1.3.0' | ||
} | ||
sentry { | ||
autoUploadProguardMapping = false | ||
} | ||
""".trimIndent() | ||
) | ||
|
||
val result = runner | ||
.appendArguments("app:assembleRelease") | ||
.appendArguments("--console=plain") | ||
.forwardOutput() | ||
.build() | ||
|
||
assertTrue { "BUILD SUCCESSFUL" in result.output } | ||
} | ||
|
||
override val additionalBuildClasspath: String = | ||
""" | ||
classpath 'com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:10.6.1' | ||
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5' | ||
""".trimIndent() | ||
} |