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
#!/usr/bin/env bash | |
# | |
# Download all artitacts for given build, mimicing structure locally. | |
# | |
# Batch size is slighly misleading, as it;s only how many URLs to attempt before momentary pause | |
# | |
# Can be used on CCI builds with parallelism and will only download the files for matcing index. | |
# | |
# | |
USAGE="$0 username/repo 123 [bitbucket] [batch_size]" |
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
data class SimpleDemoState(val listing: Async<Listing> = Uninitialized) | |
class SimpleDemoViewModel(override val initialState: SimpleDemoState) : MvRxViewModel<SimpleDemoState>() { | |
init { | |
fetchListing() | |
} | |
private fun fetchListing() { | |
// This automatically fires off a request and maps its response to Async<Listing> | |
// which is a sealed class and can be: Unitialized, Loading, Success, and Fail. |
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
android { | |
… | |
defaultConfig { | |
… | |
} | |
… | |
signingConfigs { | |
release { | |
val signing = project.rootProject.properties("signing.properties") | |
if (signing != null) { |
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
// Gradle Plugin to publish APK to Google PlayStore right from the Gradle Task. | |
// https://github.com/Triple-T/gradle-play-publisher | |
apply plugin: 'com.github.triplet.play' | |
// Fabric.io Plugin | |
apply plugin: 'io.fabric' | |
// Slack Plugin For Gradle. https://github.com/Mindera/gradle-slack-plugin | |
apply plugin: 'com.mindera.gradle.slack' |
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
PATH_TO_APK=$1 | |
APK_THRESHOLD=$2 | |
echo "Analyze APK size command" | |
NEW_APK_SIZE=`expr $(stat -c%s PATH_TO_APK) / 1024` | |
echo "APK size is now "$NEW_APK_SIZE" KB" | |
if [[ $NEW_APK_SIZE -lt $APK_THRESHOLD ]]; then | |
echo "APK file is less than "$APK_THRESHOLD" KB. OK" |
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
@Override | |
public void onStart() { | |
setJsBridgeClassName("android.support.test.espresso.web.bridge.JavaScriptBridge"); | |
super.onStart(); | |
/* | |
* The orchestrator cannot collect the list of tests as it is running in a different process | |
* than the test app. On first run, the Orchestrator will ask AJUR to list the tests | |
* out that would be run for a given class parameter. AJUR will then be successively | |
* called with whatever it passes back to the orchestratorListener. |
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 void singleTextView(TextView textView, final String userName, String status, final String songName) { | |
SpannableStringBuilder spanText = new SpannableStringBuilder(); | |
spanText.append(userName); | |
spanText.setSpan(new ClickableSpan() { | |
@Override | |
public void onClick(View widget) { | |
// On Click Action |
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"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.vacuum.app.cinema.MainActivity"> | |
<!--SOME CODE FOR MY AppBarLayout--> | |
<!--SOME CODE FOR MY ToolBar--> |