Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test with other plugins that resolve dependency tree #442

Merged
merged 4 commits into from Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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()
}