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
Changes from 1 commit
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
@@ -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()
}