This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in your root gradle file: | |
buildscript { | |
repositories { | |
jcenter() | |
google() | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RxAccountBus { | |
private final static RxAccountBus INSTANCE = new RxAccountBus(); | |
public final static int ACCOUNT_LOGGED_IN = 0; | |
public final static int ACCOUNT_LOGGED_OUT = 1; | |
public final static int ACCOUNT_DATA_UPDATED = 2; | |
@Retention(SOURCE) | |
@IntDef({ACCOUNT_LOGGED_IN, ACCOUNT_LOGGED_OUT, ACCOUNT_DATA_UPDATED}) | |
public @interface Account { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(); | |
interceptor.setLevel(HttpLoggingInterceptor.Level.BASIC); | |
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build(); | |
Retrofit retrofit = new Retrofit.Builder() | |
.baseUrl(BuildConfig.API_BITCOIN_BASE_URL) | |
.client(client) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.addCallAdapterFactory(RxJavaCallAdapterFactory.create()) | |
.build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project.afterEvaluate { | |
project.("connectedDebugAndroidTest").doFirst { | |
def originalProvider = deviceProvider | |
deviceProvider = [ | |
getName : { originalProvider.getName() }, | |
init : { originalProvider.init() }, | |
terminate : { originalProvider.terminate() }, | |
getDevices : { filterDevices(originalProvider.getDevices()) }, | |
getTimeoutInMs: { originalProvider.getTimeoutInMs() }, | |
isConfigured : { originalProvider.isConfigured() }, |