Skip to content

Commit

Permalink
Add integration test with other plugins that resolve dependency tree (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn committed Mar 2, 2023
1 parent 1afd54f commit 1fdafc9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Expand Up @@ -4,9 +4,9 @@

### Dependencies

- Bump Android SDK from v6.13.0 to v6.13.1 ([#437](https://github.com/getsentry/sentry-android-gradle-plugin/pull/437))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6131)
- [diff](https://github.com/getsentry/sentry-java/compare/6.13.0...6.13.1)
- Bump Android SDK from v6.13.0 to v6.15.0 ([#442](https://github.com/getsentry/sentry-android-gradle-plugin/pull/442))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6150)
- [diff](https://github.com/getsentry/sentry-java/compare/6.13.0...6.15.0)
- Bump CLI from v2.12.0 to v2.13.0 ([#439](https://github.com/getsentry/sentry-android-gradle-plugin/pull/439))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2130)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.12.0...2.13.0)
Expand Down
Expand Up @@ -119,7 +119,7 @@ class SentryPlugin : Plugin<Project> {
companion object {
const val SENTRY_ORG_PARAMETER = "sentryOrg"
const val SENTRY_PROJECT_PARAMETER = "sentryProject"
internal const val SENTRY_SDK_VERSION = "6.13.1"
internal const val SENTRY_SDK_VERSION = "6.15.0"

internal val sep = File.separator

Expand Down
@@ -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()
}

0 comments on commit 1fdafc9

Please sign in to comment.