Skip to content

Commit

Permalink
Merge pull request #36 from thegrizzlylabs/remove_support_library
Browse files Browse the repository at this point in the history
fix(*) Remove Android support library
  • Loading branch information
guillaume-tgl authored Feb 4, 2020
2 parents 1219107 + 644b25a commit 61b4720
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ android {

defaultConfig {
minSdkVersion 15
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard-rules.pro'
}
}

dependencies {
api 'com.squareup.okhttp3:okhttp:4.1.1'

implementation 'com.android.support:support-annotations:28.0.0'
implementation ('org.simpleframework:simple-xml:2.7.1') {
exclude module: 'stax'
exclude module: 'stax-api'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.thegrizzlylabs.sardineandroid.impl;

import android.support.annotation.NonNull;

import java.io.IOException;

import okhttp3.Authenticator;
import okhttp3.Credentials;
import okhttp3.Request;
Expand All @@ -18,13 +14,13 @@ class BasicAuthenticator implements Authenticator {
private String userName;
private String password;

public BasicAuthenticator(@NonNull String userName, @NonNull String password) {
public BasicAuthenticator(String userName, String password) {
this.userName = userName;
this.password = password;
}

@Override
public Request authenticate(Route route, Response response) throws IOException {
public Request authenticate(Route route, Response response) {
if (response.request().header("Authorization") != null) {
return null; // Give up, we've already attempted to authenticate.
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.thegrizzlylabs.sardineandroid.impl;

import android.support.annotation.NonNull;

import com.thegrizzlylabs.sardineandroid.DavAce;
import com.thegrizzlylabs.sardineandroid.DavAcl;
import com.thegrizzlylabs.sardineandroid.DavPrincipal;
Expand Down Expand Up @@ -98,13 +96,13 @@ private class AuthenticationInterceptor implements Interceptor {
private String userName;
private String password;

public AuthenticationInterceptor(@NonNull String userName, @NonNull String password) {
public AuthenticationInterceptor(String userName, String password) {
this.userName = userName;
this.password = password;
}

@Override
public Response intercept(@NonNull Chain chain) throws IOException {
public Response intercept(Chain chain) throws IOException {
Request request = chain.request().newBuilder().addHeader("Authorization", Credentials.basic(userName, password)).build();
return chain.proceed(request);
}
Expand Down Expand Up @@ -317,7 +315,7 @@ private void put(String url, RequestBody requestBody) throws IOException {
put(url, requestBody, new Headers.Builder().build());
}

private void put(String url, RequestBody requestBody, @NonNull Headers headers) throws IOException {
private void put(String url, RequestBody requestBody, Headers headers) throws IOException {
Request request = new Request.Builder()
.url(url)
.put(requestBody)
Expand Down

0 comments on commit 61b4720

Please sign in to comment.