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
#!/bin/sh | |
CMD="./gradlew clean testDebugUnitTest" | |
# Check if we actually have commits to push | |
commits=`git log @{u}..` | |
if [ -z “$commits” ]; then | |
exit 0 | |
fi | |
$CMD | |
RESULT=$? | |
if [ $RESULT -ne 0 ]; then |
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
#!/bin/sh | |
msg=`head -n 1 $1` | |
if echo $msg | egrep -qv '(Android-\d{3,4}.{20,})'; then | |
echo "[Message Format] Your message is not formatted correctly. Correct message format\n | |
#Ticket Number - Minimum 20 or more Character \n | |
like #Android-123 Bug fixed for login issue" | |
exit 1; | |
fi |
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
package async.waleed.rx; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import io.reactivex.Observable; | |
public class MainActivity extends AppCompatActivity { |
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
apply plugin: 'com.android.application' | |
apply plugin: 'me.tatarka.retrolambda' | |
android { | |
compileSdkVersion 25 | |
buildToolsVersion "25.0.1" | |
defaultConfig { | |
applicationId "async.waleed.rx" | |
minSdkVersion 15 | |
targetSdkVersion 25 | |
versionCode 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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.3.0' | |
classpath 'me.tatarka:gradle-retrolambda:3.4.0' |
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
package async.waleed.rx; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import java.util.ArrayList; | |
import java.util.List; | |
import io.reactivex.Observable; |
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
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Created by waleed on 12/03/2017. | |
*/ | |
public class HelloWorldStream { | |
public static void main(String [] args){ |
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
import java.util.ArrayList; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
/** | |
* Created by waleed on 12/03/2017. | |
*/ | |
public class WaterStream { |