Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ jobs:
path: scripts/update-android.sh
name: Android SDK
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}

composable-preview-scanner:
runs-on: ubuntu-latest
steps:
- uses: getsentry/github-workflows/updater@26f565c05d0dd49f703d238706b775883037d76b # v3
with:
path: plugin-build/composable-preview-scanner.properties
name: ComposablePreviewScanner
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}
15 changes: 8 additions & 7 deletions plugin-build/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io.sentry.android.gradle.internal.ASMifyTask
import io.sentry.android.gradle.internal.BootstrapAndroidSdk
import java.io.FileInputStream
import java.util.Properties
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.config.KotlinCompilerVersion
Expand Down Expand Up @@ -312,17 +311,19 @@ buildConfig {
buildConfigField("String", "Version", provider { "\"${project.version}\"" })
buildConfigField("String", "SdkVersion", provider { "\"${project.property("sdk_version")}\"" })
buildConfigField("String", "AgpVersion", provider { "\"${BuildPluginsVersion.AGP}\"" })
buildConfigField("String", "CliVersion", propertyVersionProvider("sentry-cli.properties"))
buildConfigField(
"String",
"CliVersion",
provider {
"\"${Properties().apply {
load(FileInputStream(File("$projectDir/sentry-cli.properties")))
}.getProperty("version")}\""
},
"ComposablePreviewScannerVersion",
propertyVersionProvider("composable-preview-scanner.properties"),
)
}

fun propertyVersionProvider(fileName: String): Provider<String> =
providers.fileContents(layout.projectDirectory.file(fileName)).asText.map { content ->
"\"${Properties().apply { load(content.reader()) }.getProperty("version")}\""
}

tasks.register<ASMifyTask>("asmify")

tasks.named("check").configure { dependsOn(tasks.named("validatePlugins")) }
Expand Down
2 changes: 2 additions & 0 deletions plugin-build/composable-preview-scanner.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = 0.8.1
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest version is 0.8.2. Intentionally set to 0.8.1 to test that the updater works.

repo = https://github.com/sergio-sastre/ComposablePreviewScanner
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.android.build.api.variant.HostTestBuilder.Companion.UNIT_TEST_TYPE
import com.android.build.api.variant.Variant
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.internal.utils.setDisallowChanges
import io.sentry.BuildConfig
import io.sentry.android.gradle.SentryPlugin.Companion.sep
import io.sentry.android.gradle.SentryPropertiesFileProvider.getPropertiesFilePath
import io.sentry.android.gradle.SentryTasksProvider.capitalized
Expand Down Expand Up @@ -493,7 +494,7 @@ private fun ApplicationVariant.configureSnapshotsTasks(

project.dependencies.add(
"testImplementation",
"io.github.sergio-sastre.ComposablePreviewScanner:android:0.8.1",
"io.github.sergio-sastre.ComposablePreviewScanner:android:${BuildConfig.ComposablePreviewScannerVersion}",
)

val paparazziMajorVersion =
Expand Down
Loading