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
#!/bin/sh | |
# Temporary work-around script for uploading a proguard file. Based on a version | |
# found here: https://gist.github.com/jakeouellette/608d934efaaf50b3cb15886e66009664 | |
# | |
# NOTE - this file assumes you've already run the build, and that you are using | |
# Crashlytics via the Firebase plugin and Google Play Services. Your mileage may | |
# vary based on your needs. | |
# Copyright 2017 Google Inc. |
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
desc "Move the release notes to the correct location" | |
private_lane :prepare_release_notes do | |
versions = google_play_track_version_codes( | |
package_name: "com.blueapron.blueapron.release", | |
track: "rollout" | |
) | |
metadata_dir="blueapron-release/en-US/changelogs" | |
sh("cp #{metadata_dir}/CURRENT_VERSION.txt #{metadata_dir}/#{versions[0]}.txt") | |
# Create a new branch and upload a PR for it. |
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
/** | |
* Simple helper class which extends a TabLayout to allow us to customize the font of the tab. | |
*/ | |
public final class FontTabLayout extends TabLayout { | |
// TODO - support customizing via XML rather than hardcoding. | |
private static final String FONT_PATH = "fonts/Roboto.ttf"; | |
private Typeface mTypeface; | |
public FontTabLayout(Context context) { |
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
// In version.properties: | |
major=0 | |
minor=1 | |
// In root-level build.gradle: | |
def readVersion = { -> | |
def versionPropsFile = file('../version.properties') | |
def Properties versionProps = new Properties() | |
versionProps.load(new FileInputStream(versionPropsFile)) |
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
// In root-level build.gradle | |
def getBaseVersionCode = { -> | |
// Get the version code relative to the current branch. Will typically be slightly ahead of master. | |
def current = "git rev-parse --abbrev-ref HEAD".execute() | |
def cmd = "git rev-list " + current.text + " --first-parent --count" | |
def process = cmd.execute() | |
return process.text.toInteger() | |
} | |
def getBaseVersionName = { -> |
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.blueapron.service.cache; | |
import com.blueapron.service.models.NetworkModel; | |
import com.blueapron.service.models.network.JsonModelConverter; | |
import java.io.Closeable; | |
import java.util.Collection; | |
import java.util.List; | |
import io.realm.Realm; |
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
public class Recipe extends RealmObject { | |
// Recipe overview - sent from overview endpoint. | |
@PrimaryKey | |
public String id; | |
public boolean available; | |
public String description; | |
public String url; | |
// Recipe detail - sent from detail endpoint, along with the ID. | |
public int calories_per_serving; |
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.blueapron.service.cache; | |
import com.blueapron.service.models.NetworkModel; | |
import com.blueapron.service.models.network.JsonModelConverter; | |
import java.io.Closeable; | |
import java.util.Collection; | |
import java.util.List; | |
import io.realm.Realm; |
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
import android.content.Context; | |
import com.blueapron.service.dagger.scopes.AppContext; | |
import com.blueapron.service.models.NetworkModel; | |
import java.util.List; | |
import io.realm.Realm; | |
import io.realm.RealmConfiguration; | |
import io.realm.RealmObject; |