{"action":"created","issue":{"url":"https://api.github.com/repos/gradle/gradle/issues/7537","repository_url":"https://api.github.com/repos/gradle/gradle","labels_url":"https://api.github.com/repos/gradle/gradle/issues/7537/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/7537/comments","events_url":"https://api.github.com/repos/gradle/gradle/issues/7537/events","html_url":"https://github.com/gradle/gradle/pull/7537","id":374351767,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MDcyNzA0","number":7537,"title":"Add support for skipping repositories for some dependencies","user":{"login":"melix","id":316357,"node_id":"MDQ6VXNlcjMxNjM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/316357?v=4","gravatar_id":"","url":"https://api.github.com/users/melix","html_url":"https://github.com/melix","followers_url":"https://api.github.com/users/melix/followers","following_url":"https://api.github.com/users/melix/following{/other_user}","gists_url":"https://api.github.com/users/melix/gists{/gist_id}","starred_url":"https://api.github.com/users/melix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melix/subscriptions","organizations_url":"https://api.github.com/users/melix/orgs","repos_url":"https://api.github.com/users/melix/repos","events_url":"https://api.github.com/users/melix/events{/privacy}","received_events_url":"https://api.github.com/users/melix/received_events","type":"User","site_admin":false},"labels":[{"id":289469033,"node_id":"MDU6TGFiZWwyODk0NjkwMzM=","url":"https://api.github.com/repos/gradle/gradle/labels/from:member","name":"from:member","color":"0052cc","default":false},{"id":281294573,"node_id":"MDU6TGFiZWwyODEyOTQ1NzM=","url":"https://api.github.com/repos/gradle/gradle/labels/in:dependency-management","name":"in:dependency-management","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"melix","id":316357,"node_id":"MDQ6VXNlcjMxNjM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/316357?v=4","gravatar_id":"","url":"https://api.github.com/users/melix","html_url":"https://github.com/melix","followers_url":"https://api.github.com/users/melix/followers","following_url":"https://api.github.com/users/melix/following{/other_user}","gists_url":"https://api.github.com/users/melix/gists{/gist_id}","starred_url":"https://api.github.com/users/melix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melix/subscriptions","organizations_url":"https://api.github.com/users/melix/orgs","repos_url":"https://api.github.com/users/melix/repos","events_url":"https://api.github.com/users/melix/events{/privacy}","received_events_url":"https://api.github.com/users/melix/received_events","type":"User","site_admin":false},"assignees":[{"login":"melix","id":316357,"node_id":"MDQ6VXNlcjMxNjM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/316357?v=4","gravatar_id":"","url":"https://api.github.com/users/melix","html_url":"https://github.com/melix","followers_url":"https://api.github.com/users/melix/followers","following_url":"https://api.github.com/users/melix/following{/other_user}","gists_url":"https://api.github.com/users/melix/gists{/gist_id}","starred_url":"https://api.github.com/users/melix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melix/subscriptions","organizations_url":"https://api.github.com/users/melix/orgs","repos_url":"https://api.github.com/users/melix/repos","events_url":"https://api.github.com/users/melix/events{/privacy}","received_events_url":"https://api.github.com/users/melix/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/gradle/gradle/milestones/81","html_url":"https://github.com/gradle/gradle/milestone/81","labels_url":"https://api.github.com/repos/gradle/gradle/milestones/81/labels","id":3690665,"node_id":"MDk6TWlsZXN0b25lMzY5MDY2NQ==","number":81,"title":"5.1 RC1","description":"","creator":{"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},"open_issues":35,"closed_issues":56,"state":"open","created_at":"2018-09-26T15:10:32Z","updated_at":"2018-11-29T07:54:22Z","due_on":"2018-12-10T08:00:00Z","closed_at":null},"comments":15,"created_at":"2018-10-26T11:58:21Z","updated_at":"2018-11-29T07:54:46Z","closed_at":"2018-11-29T07:52:11Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/7537","html_url":"https://github.com/gradle/gradle/pull/7537","diff_url":"https://github.com/gradle/gradle/pull/7537.diff","patch_url":"https://github.com/gradle/gradle/pull/7537.patch"},"body":"### Context\r\n\r\nThis pull requests adds support for [matching dependencies to repositories](https://github.com/gradle/gradle/issues/1369), enabling a variety of different use cases:\r\n\r\n1. categorize Maven repositories (snapshots only, releases only, mixed)\r\n2. avoid a repository when bad metadata is published. This happened recently with JCenter getting a malformed Android artifact (without this, today the only solution is to switch the order of repositories, which may have consequences on both performance and resolution result)\r\n3. avoid reaching to a repository when we know dependencies will never be found there\r\n4. avoid reaching to a repository when _some versions_ of a dependency will not be found there (case in point: newer versions of a module are published to a new repository)\r\n5. support filtering based on the configuration being resolved (for example, `testRuntimeClasspath` can be more lenient than a distribution classpath)\r\n6. avoid exposing internal dependencies to public repositories (repositories being \"pinged\" with sensitive data)\r\n\r\nTo do this, a new API is available on `ArtifactRepository`. The `contentFilter` method allows configuring the filtering, like in the example above:\r\n\r\n```\r\nrepositories {\r\n   maven {\r\n      url \"...\"\r\n      contentFilter { details ->\r\n         if (!details.moduleId.module.startsWith(\"org.mycompany\")) {\r\n            details.notFound() // explain that this repository only hosts modules from my company\r\n         }\r\n      }\r\n   }\r\n}\r\n```\r\n\r\nFor Maven snapshot/release repositories, a new, dedicated method can be found on `MavenArtifactRepository`:\r\n\r\n```\r\nrepositories {\r\n    maven {\r\n       url \"...\"\r\n       // do not look for snapshots\r\n       kind = MavenArtifactRepository.RepositoryKind.RELEASES_ONLY\r\n       // or... only used for snapshots\r\n       // kind = MavenArtifactRepository.RepositoryKind.SNAPSHOTS_ONLY\r\n    }\r\n}\r\n```\r\n\r\nIt would be nice to check if we can safely activate `RELEASES_ONLY` for `mavenCentral()`, `jcenter()` and `google()` repositories."},"comment":{"url":"https://api.github.com/repos/gradle/gradle/issues/comments/442739261","html_url":"https://github.com/gradle/gradle/pull/7537#issuecomment-442739261","issue_url":"https://api.github.com/repos/gradle/gradle/issues/7537","id":442739261,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjczOTI2MQ==","user":{"login":"melix","id":316357,"node_id":"MDQ6VXNlcjMxNjM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/316357?v=4","gravatar_id":"","url":"https://api.github.com/users/melix","html_url":"https://github.com/melix","followers_url":"https://api.github.com/users/melix/followers","following_url":"https://api.github.com/users/melix/following{/other_user}","gists_url":"https://api.github.com/users/melix/gists{/gist_id}","starred_url":"https://api.github.com/users/melix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melix/subscriptions","organizations_url":"https://api.github.com/users/melix/orgs","repos_url":"https://api.github.com/users/melix/repos","events_url":"https://api.github.com/users/melix/events{/privacy}","received_events_url":"https://api.github.com/users/melix/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T07:54:46Z","updated_at":"2018-11-29T07:54:46Z","author_association":"MEMBER","body":"PR has been merged following feedback from the team. Still need to add release notes and documentation, tracked in #7858."}}
{"actor":{"display_login":"melix"}}