{"id":23433913,"url":"https://github.com/ioki-mobility/sentryproguardgradleplugin","last_synced_at":"2025-04-13T01:20:50.018Z","repository":{"id":88647844,"uuid":"605926593","full_name":"ioki-mobility/SentryProguardGradlePlugin","owner":"ioki-mobility","description":"A Gradle plugin that generated UUIDs, add it to your AndroidManifest.xml and uploads the UUID together with the generated mapping file to Sentry.","archived":false,"fork":false,"pushed_at":"2025-04-09T15:45:33.000Z","size":512,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T16:48:46.642Z","etag":null,"topics":["android","gradle","gradle-plugin","hacktoberfest","proguard-android","r8","sentry"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ioki-mobility.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-24T07:47:14.000Z","updated_at":"2025-04-09T15:45:31.000Z","dependencies_parsed_at":"2023-10-02T17:22:51.996Z","dependency_job_id":"83994996-ebca-42ca-9339-695b8c93a21d","html_url":"https://github.com/ioki-mobility/SentryProguardGradlePlugin","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioki-mobility%2FSentryProguardGradlePlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioki-mobility%2FSentryProguardGradlePlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioki-mobility%2FSentryProguardGradlePlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioki-mobility%2FSentryProguardGradlePlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioki-mobility","download_url":"https://codeload.github.com/ioki-mobility/SentryProguardGradlePlugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248651096,"owners_count":21139744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","gradle","gradle-plugin","hacktoberfest","proguard-android","r8","sentry"],"created_at":"2024-12-23T11:35:33.973Z","updated_at":"2025-04-13T01:20:49.997Z","avatar_url":"https://github.com/ioki-mobility.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SentryProguardGradlePlugin\n\n[![CI](https://github.com/ioki-mobility/SentryProguardGradlePlugin/actions/workflows/test-plugin.yml/badge.svg)](https://github.com/ioki-mobility/SentryProguardGradlePlugin/actions/workflows/test-plugin.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E\u0026color=%233246c8)](https://central.sonatype.com/namespace/com.ioki.sentry.proguard)\n[![Snapshot](https://img.shields.io/nexus/s/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E\u0026color=%234f78ff\u0026server=https://s01.oss.sonatype.org)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/ioki/sentry/proguard)\n[![MIT](https://img.shields.io/badge/license-MIT-blue.svg?labelColor=%2324292E\u0026color=%23d11064)](https://github.com/ioki-mobility/SentryProguardGradlePlugin/blob/main/LICENSE.md)\n\nA Gradle plugin that generated `UUIDs`, adds it to your `AndroidManifest.xml` \nand uploads the `UUID` together with the generated `mapping` file to Sentry.     \n\n## Usage\n\n### Apply the plugin\n\nAdd the plugin to the **Android application** `build.gradle[.kts]` file and configure it:\n\n```groovy\nplugins {\n    id \"com.ioki.sentry.proguard\" version \"[CURRENT_VERSION]\"\n}\n\nsentryProguard {\n    organization.set(\"SENTRY_ORG\")\n    project.set(\"SENTRY_PROJECT\")\n    authToken.set(\"SENTRY_AUTH_TOKEN\")\n    noUpload.set(false)\n}\n```\n\nThe `sentryProguard.noUpload` function is useful for development purposes.\nNormally, you don't want to upload the mapping file to Sentry while creating a minified version on developer machines.\nInstead, you just want to upload the mapping file on your CI. In case you do a \"real release\".\nSo something like the following can be implemented:\n\n```groovy\ndef sentryUpload = hasProperty(\"SENTRY_UPLOAD\")\nsentryProguard {\n    noUpload.set(!sentryUpload)\n}\n```\n\nBy default, you don't set the [Gradle property](https://docs.gradle.org/8.0.2/userguide/build_environment.html#sec:gradle_configuration_properties).\nIn this case the plugin won't upload the mapping files.\nOn your CI, however, you set the property and therefore the mapping file will be uploaded.\n\n## How it works under the hood\n\nIf you run \"any\" task on a [`minifiedEnabled`](https://developer.android.com/reference/tools/gradle-api/8.0/com/android/build/api/variant/CanMinifyCode) [build type](https://developer.android.com/studio/build/build-variants#build-types), the Plugin will:\n* Generate a `UUID`\n* Place a `\u003cmeta-data\u003e` attribute to the `AndroidManifest.xml` (see also this [sentry-android-gradle-plugin code](https://github.com/getsentry/sentry-android-gradle-plugin/blob/fa322a5060fb29073006d4e0d2cb2c2b4eb39aaf/plugin-build/src/main/kotlin/io/sentry/android/gradle/ManifestWriter.kt#L11))\n* Create a task to download the Sentry CLI\n* Create a task for each build variant that uploads the `UUID` along with the `mapping` file via the [Sentry CLI](https://docs.sentry.io/product/cli/)\n* Hook the created tasks into the task graph (adds a `finalizedBy(uploadUuidTask)` to the `minify[BuildVariant]WithR8` task)\n\n# Testing\n\nTo run the tests you either have to provide the `ANDROID_HOME` environment variable (pointing to the Android SDK path) \nor adding a `local.properties` file to the `androidTestProject`:\n```\n// on macOS mostly at: ~/Library/Android/sdk\nsdk.dir=[path/to/the/android/sdk]\n```\n\n# Release\n\n## Snapshot release\n\nBy default, each merge to the `main` branch will create a new SNAPSHOT release.\nIf you want to use the latest and greatest use the SNAPSHOT version of the plugin.\nBut please be aware that they might contain bugs or behaviour changes.\n\nTo use the SNAPSHOT version you have to include the sonatype snapshot repository to your `settings.gradle[.kts]`\n```kotlin\npluginManagement {\n    repositories {\n        maven(url = \"https://s01.oss.sonatype.org/content/repositories/snapshots/\")\n    }\n}\n```\n\n## Proper release\n\n* Checkout `main` branch\n* Update the `version` in [`build.gradle.kts`](build.gradle.kts)\n* Update the version for the `consuming of plugin marker publication via mavenLocal works` test\n* Commit \n  * `git commit -m \"Prepare next relaese\"`\n* Tag the version with the same version and push it to origin\n  * `git tag [VERSION]`\n  * `git push origin [VERSION]`\n* Update the version to the \"next **minor** version\" (including `-SNAPSHOT`)\n* Update the version for the `consuming of plugin marker publication via mavenLocal works` test\n* Commit and push\n* Create a new [GitHub release](https://github.com/ioki-mobility/SentryProguardGradlePlugin/releases/new)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioki-mobility%2Fsentryproguardgradleplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioki-mobility%2Fsentryproguardgradleplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioki-mobility%2Fsentryproguardgradleplugin/lists"}