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
# For more informations, please read official documentation -> https://docs.travis-ci.com/user/languages/android/ | |
sudo: false | |
language: android | |
jdk: oraclejdk8 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/ |
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
sudo: required | |
language: android | |
jdk: oraclejdk8 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/ | |
cache: |
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
// Add the following to your build.gradle file | |
// implementation "android.arch.lifecycle:reactivestreams:1.0.0-beta1" | |
import android.arch.lifecycle.LifecycleOwner | |
import android.arch.lifecycle.LiveData | |
import android.arch.lifecycle.LiveDataReactiveStreams | |
import io.reactivex.Flowable | |
/** |
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
query IntrospectionQuery { | |
__schema { | |
queryType { name } | |
mutationType { name } | |
subscriptionType { name } | |
types { | |
...FullType | |
} | |
directives { |
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 String loadFile(final String pathResource) { | |
try (final InputStream is = new ClassPathResource(pathResource).getInputStream()) { | |
// To be customized | |
return IOUtils.toString(is, "UTF-8"); | |
} catch (final Exception e) { | |
final String errorMessage = "Error loading file "; | |
// Could be more specific | |
throw new RuntimeException(errorMessage + e); | |
} | |
} |
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
@Configuration | |
public class DataLoaderConfig { | |
@Autowired | |
private RedisCacheRepository<String, ObjectId, Home> homeByObjectIdCacheMapRepository; | |
@Autowired | |
private RedisCacheRepository<String, String, Home> homeByStringCacheMapRepository; | |
@Bean | |
public DataLoaderRegistry dataLoaderRegistry() { |
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
... | |
<properties> | |
... | |
<sonar.scanner.maven.version>3.6.0.1398</sonar.scanner.maven.version> | |
<sonar.host.url>http://localhost:9000</sonar.host.url> | |
<sonar.projectName>lahzouz</sonar.projectName> | |
<sonar.language>java</sonar.language> | |
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> |
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
@Component | |
public class CacheProvider implements PreparsedDocumentProvider { | |
@Autowired | |
private AppProperties appProps; | |
@Override | |
public PreparsedDocumentEntry getDocument(ExecutionInput executionInput, Function<ExecutionInput, PreparsedDocumentEntry> computeFunction) { | |
final Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder() | |
.maximumSize(appProps.getCache() |
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
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) { | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<property name="APPLICATION_NAME" value="lahzouz"/> | |
<property name="LOG_PATH" value="/var/log/lahzouz/${APPLICATION_NAME}"/> | |
<property name="FILE_PREFIX" value="${APPLICATION_NAME}"/> | |
<property name="PATTERN" | |
value="%d{yyyy-MM-dd HH:mm:ss.SSS} %magenta([%thread]) %highlight(%level) %cyan(%logger{36}) - %message%n%xException"/> | |
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
<withJansi>true</withJansi> | |
<encoder> |
OlderNewer