Skip to content
  • MozLando's avatar
    Merge #6875 · 6719e010
    MozLando authored
    6875: Remove service-glean's hard-dependency on httpurlconnection r=Dexterp37 a=badboy
    
    Remove service-glean's hard-dependency on httpurlconnection
    
    We still test with it, so we keep it around.
    
    *BREAKING CHANGE*:
    
    Users will need to supply a configuration with a ping uploader to Glean
    now.
    A default lib-fetch-httpurlconnection implementation can be used like
    this:
    
    ```kotlin
    import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient;
    import mozilla.components.service.glean.config.Configuration;
    import mozilla.components.service.glean.net.ConceptFetchHttpUploader;
    
    val config = Configuration(httpClient = ConceptFetchHttpUploader(lazy { HttpURLConnectionClient() }))
    Glean.initialize(context, true, config)
    ```
    
    For Java this becomes:
    
    ```java
    import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient;
    import mozilla.components.service.glean.config.Configuration;
    import mozilla.components.service.glean.net.ConceptFetchHttpUploader;
    
    ConceptFetchHttpUploader httpClient = ConceptFetchHttpUploader.fromClient(new HttpURLConnectionClient());
    Configuration config = new Configuration(httpClient);
    Glean.INSTANCE.initialize(context, true, config);
    ```
    
    Fixes #6660 (at least partly)
    
    I'm not familiar enough with service-experiments, so @travis79
    
     would need to take a look.
    
    cc @pocmo for visibility.
    
    
    
    
    Co-authored-by: default avatarJan-Erik Rediger <janerik@fnordig.de>
    6719e010
To find the state of this project's repository at the time of any of these versions, check out the tags.