Skip to content

Instantly share code, notes, and snippets.

@GuilhE
GuilhE / build.gradle
Last active Mar 3, 2018
Library module - Gradle settings
View build.gradle
apply plugin: 'com.android.library'
android {
...
}
dependencies {
...
}
@GuilhE
GuilhE / travis.yml
Created Oct 31, 2018
Travis CI configurations for testing without emulator
View travis.yml
language: android
dist: trusty
notifications:
email: false
jdk:
- oraclejdk8
env:
@GuilhE
GuilhE / gradle.properties
Last active Dec 12, 2018
Library module - Gradle properties
View gradle.properties
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
@GuilhE
GuilhE / local.properties
Last active Dec 12, 2018
bintray configurations (note: don't push this to your repo!)
View local.properties
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
ndk.dir=
@GuilhE
GuilhE / EndlessRecyclerOnScrollListener.java
Last active Dec 12, 2018
Helper listener class to implement pagination
View EndlessRecyclerOnScrollListener.java
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
/**
* @author gdelgado
* @see <a href="https://gist.github.com/GuilhE/cb2284d65d9ac9f1fd07bd5723b55924">EndlessRecyclerOnScrollListener</a>
*/
@SuppressWarnings({"unused", "WeakerAccess"})
@GuilhE
GuilhE / .gitattributes
Created Feb 1, 2019
GitAttributes to use with git-lfs
View .gitattributes
# Collapse Unity-generated files on GitHub
*.asset linguist-generated
*.mat linguist-generated
*.meta linguist-generated
*.prefab linguist-generated
*.unity linguist-generated
# 3D models
*.3dm filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
@GuilhE
GuilhE / deploy.gradle
Last active Jan 21, 2020
Library module - Gradle settings for bintray (using dcendents.android-maven)
View deploy.gradle
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
group = publishedGroupId // Maven Group ID for the artifact
version = libraryVersion
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
@GuilhE
GuilhE / build.gradle
Last active Jan 21, 2020
Project gradle settings (using dcendents.android-maven)
View build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
@GuilhE
GuilhE / OperatorExtensionsTest.kt
Last active Feb 19, 2020
OperatorExtensions tests with MockK
View OperatorExtensionsTest.kt
import io.mockk.clearAllMocks
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.runBlockingTest
import kotlinx.coroutines.test.setMain
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.*
@GuilhE
GuilhE / RxExtensions.kt
Created Mar 4, 2020
Helper compose functions for RxKotlin
View RxExtensions.kt
import android.annotation.SuppressLint
import com.blissapplications.kotlin.core.common.threads.ReactivexThreadSchedulerProvider
import io.reactivex.Completable
import io.reactivex.Single
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable
/**
* Examples of usage of this extensions functions:
*