diff --git a/.travis.yml b/.travis.yml index 3f60aef..d2add35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: java jdk: - - oraclejdk8 + - oraclejdk7 script: ./gradlew --info build diff --git a/build.gradle b/build.gradle index 5f8c8d3..4caabc7 100644 --- a/build.gradle +++ b/build.gradle @@ -5,13 +5,14 @@ plugins { id "maven-publish" id 'net.saliman.cobertura' version '2.2.6' id "com.jfrog.bintray" version "1.4" + id 'co.riiid.gradle' version '0.3.1' } group = 'synapticloop' archivesBaseName = 'backblaze-b2-java-api' description = """An api for backblaze b2 storage in java""" -version = 'v1.1.1' +version = 'v1.1.2' description = """backblaze-b2-java-api""" @@ -130,3 +131,16 @@ bintray { } } + +github { + owner = group + repo = archivesBaseName + if(System.getenv('GITHUB_TOKEN')) { + token = System.getenv('GITHUB_TOKEN') + } + tagName = version + name = version + assets = [ + 'build/libs/' + archivesBaseName + '-' + version + '-all.jar' + ] +} diff --git a/src/main/java/synapticloop/b2/request/B2AuthorizeAccountRequest.java b/src/main/java/synapticloop/b2/request/B2AuthorizeAccountRequest.java index 9b13247..d54ccd2 100644 --- a/src/main/java/synapticloop/b2/request/B2AuthorizeAccountRequest.java +++ b/src/main/java/synapticloop/b2/request/B2AuthorizeAccountRequest.java @@ -1,7 +1,7 @@ package synapticloop.b2.request; -import java.util.Base64; +import org.apache.commons.codec.binary.Base64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +35,7 @@ public class B2AuthorizeAccountRequest extends BaseB2Request { public B2AuthorizeAccountRequest(String accountId, String applicationKey) { super(null); url = B2_AUTHORIZE_ACCOUNT; - unencodedHeaders.put(REQUEST_PROPERTY_AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString((accountId + ":" + applicationKey).getBytes())); + unencodedHeaders.put(REQUEST_PROPERTY_AUTHORIZATION, "Basic " + Base64.encodeBase64String((accountId + ":" + applicationKey).getBytes())); } /**