{"action":"created","issue":{"url":"https://api.github.com/repos/gradle/gradle/issues/6632","repository_url":"https://api.github.com/repos/gradle/gradle","labels_url":"https://api.github.com/repos/gradle/gradle/issues/6632/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/6632/comments","events_url":"https://api.github.com/repos/gradle/gradle/issues/6632/events","html_url":"https://github.com/gradle/gradle/issues/6632","id":356929710,"node_id":"MDU6SXNzdWUzNTY5Mjk3MTA=","number":6632,"title":"Only produce new gradle-wrapper.jar when classes changed","user":{"login":"sghill","id":230004,"node_id":"MDQ6VXNlcjIzMDAwNA==","avatar_url":"https://avatars3.githubusercontent.com/u/230004?v=4","gravatar_id":"","url":"https://api.github.com/users/sghill","html_url":"https://github.com/sghill","followers_url":"https://api.github.com/users/sghill/followers","following_url":"https://api.github.com/users/sghill/following{/other_user}","gists_url":"https://api.github.com/users/sghill/gists{/gist_id}","starred_url":"https://api.github.com/users/sghill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghill/subscriptions","organizations_url":"https://api.github.com/users/sghill/orgs","repos_url":"https://api.github.com/users/sghill/repos","events_url":"https://api.github.com/users/sghill/events{/privacy}","received_events_url":"https://api.github.com/users/sghill/received_events","type":"User","site_admin":false},"labels":[{"id":460356753,"node_id":"MDU6TGFiZWw0NjAzNTY3NTM=","url":"https://api.github.com/repos/gradle/gradle/labels/a:feature","name":"a:feature","color":"0e8a16","default":false},{"id":478384995,"node_id":"MDU6TGFiZWw0NzgzODQ5OTU=","url":"https://api.github.com/repos/gradle/gradle/labels/from:contributor","name":"from:contributor","color":"0052cc","default":false},{"id":285765301,"node_id":"MDU6TGFiZWwyODU3NjUzMDE=","url":"https://api.github.com/repos/gradle/gradle/labels/in:wrapper","name":"in:wrapper","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-04T18:41:23Z","updated_at":"2018-10-31T15:22:04Z","closed_at":null,"author_association":"NONE","body":"<!--- \r\nPlease follow the instructions below. We receive dozens of issues every week, so to stay productive, we will close issues that don't provide enough information. \r\n\r\nPlease open Android-related issues on the Android Issue Tracker at https://source.android.com/source/report-bugs\r\nPlease open Kotlin DSL-related issues at https://github.com/gradle/kotlin-dsl/issues\r\nPlease open Gradle Native-related issues at https://github.com/gradle/gradle-native/issues\r\n-->\r\n\r\n<!--- Provide a brief summary of the issue in the title above -->\r\nIt'd be helpful if upgrading the gradle wrapper through the recommended approach only resulted in a new `gradle-wrapper.jar` if its classes had changed.\r\n\r\nFrom the [Upgrading the Gradle Wrapper docs](https://docs.gradle.org/4.10/userguide/gradle_wrapper.html#sec:upgrading_wrapper):\r\n\r\n> The better and recommended option is to run the wrapper task and provide the target Gradle version as described in Adding the Gradle Wrapper.\r\n\r\nRunning `./gradlew wrapper --gradle-version <new-version>` always results in a new `gradle/wrapper/gradle-wrapper.jar`, which results in source control repositories growing faster than necessary.\r\n\r\n### Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\nIf there haven't been any changes to the classes included in `gradle/wrapper/gradle-wrapper.jar`, the jar should not be different.\r\n\r\n### Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\nThe embedded `build-receipt.properties` is always different between versions, requiring a new binary to be checked in to source control with each version update.\r\n\r\nHere is a diff of the unzipped jar contents from a 4.9 and 4.10 gradle-wrapper.jar:\r\n\r\n```\r\n$ diff 49/gradle/wrapper/jar-contents/ 410/gradle/wrapper/jar-contents/\r\nCommon subdirectories: 49/gradle/wrapper/jar-contents/META-INF and 410/gradle/wrapper/jar-contents/META-INF\r\ndiff 49/gradle/wrapper/jar-contents/build-receipt.properties 410/gradle/wrapper/jar-contents/build-receipt.properties\r\n1c1\r\n< versionNumber=4.9\r\n\\ No newline at end of file\r\n---\r\n> versionNumber=4.10\r\n\\ No newline at end of file\r\nCommon subdirectories: 49/gradle/wrapper/jar-contents/org and 410/gradle/wrapper/jar-contents/org\r\n```\r\n\r\n### Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\nAttempting to stay up-to-date with the latest wrapper through the recommended approach leads to unnecessary repository growth. See also https://github.com/gretty-gradle-plugin/gretty/pull/74.\r\n\r\n### Steps to Reproduce (for bugs)\r\n<!--- Provide a self-contained example project (as an attached archive or a Github project). -->\r\n<!--- In the rare cases where this is infeasible, we will also accept a detailed set of instructions. -->\r\nRun `./gradlew wrapper --gradle-version <new-version> && git diff` from an existing git repository with an older version of the gradle wrapper checked in.\r\n\r\n### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n<!--- A build scan `https://scans.gradle.com/get-started` is ideal -->\r\n * Build scan URL: \r\nN/A\r\n"},"comment":{"url":"https://api.github.com/repos/gradle/gradle/issues/comments/434729246","html_url":"https://github.com/gradle/gradle/issues/6632#issuecomment-434729246","issue_url":"https://api.github.com/repos/gradle/gradle/issues/6632","id":434729246,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDcyOTI0Ng==","user":{"login":"marcphilipp","id":214207,"node_id":"MDQ6VXNlcjIxNDIwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/214207?v=4","gravatar_id":"","url":"https://api.github.com/users/marcphilipp","html_url":"https://github.com/marcphilipp","followers_url":"https://api.github.com/users/marcphilipp/followers","following_url":"https://api.github.com/users/marcphilipp/following{/other_user}","gists_url":"https://api.github.com/users/marcphilipp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcphilipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcphilipp/subscriptions","organizations_url":"https://api.github.com/users/marcphilipp/orgs","repos_url":"https://api.github.com/users/marcphilipp/repos","events_url":"https://api.github.com/users/marcphilipp/events{/privacy}","received_events_url":"https://api.github.com/users/marcphilipp/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T15:22:04Z","updated_at":"2018-10-31T15:22:04Z","author_association":"MEMBER","body":"@eriwen Do we parse the User-Agent for download statistics? Could we remove the version from it?"}}
{"actor":{"display_login":"marcphilipp"}}