This file contains hidden or 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
| package com.example; | |
| import javax.inject.Scope; | |
| import javax.inject.Singleton; | |
| import dagger.Component; | |
| import dagger.Module; | |
| import dagger.Provides; | |
| import dagger.Subcomponent; |
This file contains hidden or 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
| //You can create src/main/groovy, put your script called 'myscript.groovy' in there: | |
| apply plugin: 'groovy' | |
| apply plugin: 'java' | |
| apply plugin: 'application' | |
| configurations { | |
| excludeFromJar | |
| compile.extendsFrom excludeFromJar | |
| } |
This file contains hidden or 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
| private static OkHttpClient getUnsafeOkHttpClient() { | |
| try { | |
| // Create a trust manager that does not validate certificate chains | |
| final TrustManager[] trustAllCerts = new TrustManager[] { | |
| new X509TrustManager() { | |
| @Override | |
| public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { | |
| } | |
| @Override |