{"id":15523128,"url":"https://github.com/xuwei-k/sbt-proguard","last_synced_at":"2025-04-23T04:16:34.836Z","repository":{"id":38417827,"uuid":"195620674","full_name":"xuwei-k/sbt-proguard","owner":"xuwei-k","description":"fork from https://github.com/sbt/sbt-proguard","archived":false,"fork":false,"pushed_at":"2025-03-24T21:08:14.000Z","size":161,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T04:16:29.949Z","etag":null,"topics":["proguard","sbt","sbt-plugin"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuwei-k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-07T07:02:57.000Z","updated_at":"2025-03-24T21:08:18.000Z","dependencies_parsed_at":"2024-05-06T23:24:30.562Z","dependency_job_id":"9e8c27f9-bbd6-4188-b9e9-51858e44e372","html_url":"https://github.com/xuwei-k/sbt-proguard","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fsbt-proguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fsbt-proguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fsbt-proguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fsbt-proguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuwei-k","download_url":"https://codeload.github.com/xuwei-k/sbt-proguard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366716,"owners_count":21418772,"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":["proguard","sbt","sbt-plugin"],"created_at":"2024-10-02T10:43:34.355Z","updated_at":"2025-04-23T04:16:34.819Z","avatar_url":"https://github.com/xuwei-k.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"sbt-proguard\n============\n\n[sbt] plugin for running [ProGuard]. This plugin requires sbt 1.4.x or later.\n\n\nAdd plugin\n----------\n\nAdd plugin to `project/plugins.sbt`. For example:\n\n```scala\naddSbtPlugin(\"com.github.xuwei-k\" % \"sbt-proguard\" % \"{version}\")\n```\n\nSee [released versions][releases].\n\nNote: earlier versions of sbt-proguard used the `\"com.lightbend.sbt\"` organization.\n\nExample\n-------\n\nA simple `build.sbt` with settings to configure sbt-proguard:\n\n```scala\nenablePlugins(SbtProguard)\n\nProguard / proguardOptions ++= Seq(\"-dontnote\", \"-dontwarn\", \"-ignorewarnings\")\n\nProguard / proguardOptions += ProguardOptions.keepMain(\"some.MainClass\")\n```\n\nRun proguard at the sbt shell with:\n\n```shell\nproguard:proguard\n```\n\n\nFilters\n-------\n\nProguard supports file filtering for inputs, libraries, and outputs. In\nsbt-proguard there are `File =\u003e Option[String]` settings for adding filters to\nfiles.\n\nFor example, to add a `!META-INF/**` filter to just the scala-library jar:\n\n```scala\nProguard / proguardInputFilter := { file =\u003e\n  file.name match {\n    case \"scala-library.jar\" =\u003e Some(\"!META-INF/**\")\n    case _                   =\u003e None\n  }\n}\n```\n\nwhich will create the following proguard configuration:\n\n```\n-injars \"/path/to/scala-library.jar\"(!META-INF/**)\n```\n\nThere are corresponding settings for libraries and outputs: `proguardLibraryFilter` and\n`proguardOutputFilter`.\n\nFor more advanced usage the `proguardFilteredInputs`, `proguardFilteredLibraries`, and\n`proguardFilteredOutputs` settings can be set directly.\n\n\nMerging\n-------\n\nIf the same path exists in multiple inputs then proguard will throw an error.\nThe conflicting paths can be resolved using file filters, as described above,\nbut this is not always the most useful approach. For example, `reference.conf`\nfiles for the Typesafe Config library need to be retained and not discarded.\n\nThe sbt-proguard plugin supports pre-merging inputs, similar to creating an\nassembly jar first. To enable this merging use:\n\n```scala\nProguard / proguardMerge := true\n```\n\nConflicting paths that are not identical will now fail at the merge stage. These\nconflicting paths can have merge strategies applied, similar to the [sbt-assembly]\nplugin.\n\nHelper methods for creating common merges are available. These are:\n\n  - `discard` -- discard all matching entries\n  - `first` -- only keep the first entry\n  - `last` -- only keep the last entry\n  - `rename` -- rename entries adding the name of the source\n  - `append` -- append entries together into one file\n\nThe paths matched against in these helpers are normalised to be separated by `/`\nregardless of platform. Paths can be matched exactly with a string or with a\nregular expression.\n\nThe default strategy is to only discard `META-INF/MANIFEST.MF`. This same\nstrategy could be added with:\n\n```scala\nProguard / proguardMergeStrategies += ProguardMerge.discard(\"META-INF/MANIFEST.MF\")\n```\n\nOr all `META-INF` contents could be discarded with a regular expression:\n\n```scala\nProguard / proguardMergeStrategies += ProguardMerge.discard(\"META-INF/.*\".r)\n```\n\nTo concatenate all `reference.conf` files together use:\n\n```scala\nProguard / proguardMergeStrategies += ProguardMerge.append(\"reference.conf\")\n```\n\nTo discard all `.html` and `.txt` files you may use two strategies together:\n\n```scala\nProguard / proguardMergeStrategies ++= Seq(\n  ProguardMerge.discard(\"\\\\.html$\".r),\n  ProguardMerge.discard(\"\\\\.txt$\".r) \n)\n```\n\nCompletely custom merge strategies can also be created. See the plugin source\ncode for how this could be done.\n\n\nSample projects\n---------------\n\nThere are some [runnable sample projects][samples] included as sbt scripted tests.\n\nLicense\n-------\n\n[ProGuard] is licensed under the [GNU General Public License][gpl]. sbt and sbt scripts\nare included in a [special exception][except] to the GPL licensing.\n\nThe code for this sbt plugin is licensed under the [Apache 2.0 License][apache].\n\n\n[sbt]: https://github.com/sbt/sbt\n[ProGuard]: https://www.guardsquare.com/en/proguard\n[releases]: https://github.com/xuwei-k/sbt-proguard/releases\n[sbt-assembly]: https://github.com/sbt/sbt-assembly\n[samples]: https://github.com/xuwei-k/sbt-proguard/tree/master/src/sbt-test/proguard\n[gpl]: http://www.gnu.org/licenses/gpl.html\n[except]: http://proguard.sourceforge.net/GPL_exception.html\n[apache]: http://www.apache.org/licenses/LICENSE-2.0.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuwei-k%2Fsbt-proguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuwei-k%2Fsbt-proguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuwei-k%2Fsbt-proguard/lists"}