3434import org .gradle .api .artifacts .dsl .DependencyHandler ;
3535import org .gradle .api .artifacts .repositories .IvyArtifactRepository ;
3636import org .gradle .api .artifacts .type .ArtifactTypeDefinition ;
37- import org .gradle .api .credentials .HttpHeaderCredentials ;
3837import org .gradle .api .internal .artifacts .ArtifactAttributes ;
3938import org .gradle .api .provider .Provider ;
40- import org .gradle .authentication .http .HttpHeaderAuthentication ;
4139
4240import java .util .Comparator ;
4341
@@ -146,12 +144,6 @@ private static void addIvyRepo(Project project, String name, String url, String
146144 repo .setName (name );
147145 repo .setUrl (url );
148146 repo .metadataSources (IvyArtifactRepository .MetadataSources ::artifact );
149- // this header is not a credential but we hack the capability to send this header to avoid polluting our download stats
150- repo .credentials (HttpHeaderCredentials .class , creds -> {
151- creds .setName ("X-Elastic-No-KPI" );
152- creds .setValue ("1" );
153- });
154- repo .getAuthentication ().create ("header" , HttpHeaderAuthentication .class );
155147 repo .patternLayout (layout -> layout .artifact ("/downloads/elasticsearch/[module]-[revision](-[classifier]).[ext]" ));
156148 });
157149 project .getRepositories ().exclusiveContent (exclusiveContentRepository -> {
@@ -164,8 +156,8 @@ private static void setupDownloadServiceRepo(Project project) {
164156 if (project .getRepositories ().findByName (DOWNLOAD_REPO_NAME ) != null ) {
165157 return ;
166158 }
167- addIvyRepo (project , DOWNLOAD_REPO_NAME , "https://artifacts.elastic.co" , FAKE_IVY_GROUP );
168- addIvyRepo (project , SNAPSHOT_REPO_NAME , "https://snapshots.elastic.co" , FAKE_SNAPSHOT_IVY_GROUP );
159+ addIvyRepo (project , DOWNLOAD_REPO_NAME , "https://artifacts-no-kpi .elastic.co" , FAKE_IVY_GROUP );
160+ addIvyRepo (project , SNAPSHOT_REPO_NAME , "https://snapshots-no-kpi .elastic.co" , FAKE_SNAPSHOT_IVY_GROUP );
169161 }
170162
171163 /**
0 commit comments