View build.gradle
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 { | |
signingConfigs { | |
release { | |
if (project.hasProperty('RELEASE_STORE_FILE')) { | |
storeFile file(RELEASE_STORE_FILE) | |
storePassword RELEASE_STORE_PASSWORD | |
keyAlias RELEASE_KEY_ALIAS | |
keyPassword RELEASE_KEY_PASSWORD | |
} |
View gradle.properties
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
# Global gradle properties | |
# CREDENTIALS | |
RELEASE_STORE_FILE=release.jks | |
RELEASE_KEY_ALIAS=umarproductionkey | |
RELEASE_STORE_PASSWORD=someComplexPassword | |
RELEASE_KEY_PASSWORD=someComplexPassword | |
# Project 2 jks | |
RELEASE_STORE_FILE=app2release.jks |
View build.gradle
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
//... | |
def keystorePropertiesFile = file("../keystore.properties"); | |
def keystoreProperties = new Properties() | |
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
android { | |
signingConfigs { | |
release { | |
storeFile = file(keystoreProperties['storeFile']) | |
storePassword = keystoreProperties['storePassword'] | |
keyAlias = keystoreProperties['keyAlias'] |
View build.gradle
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 { | |
signingConfigs { | |
release { | |
storeFile = file(System.getenv('KEYSTORE_FILE_NAME')) | |
storePassword = System.getenv('KEYSTORE_PASSWORD') | |
keyAlias = System.getenv('KEYSTORE_ALIAS_NAME') | |
keyPassword = System.getenv('KEYSTORE_KEY_PASSWORD') | |
} | |
debug { | |
storeFile = file(System.getenv('KEYSTORE_FILE_NAME')) |
View build.gradle
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 { | |
signingConfigs { | |
release { | |
storeFile = file('release.keystore') | |
storePassword = 'actualReleasePassword' | |
keyAlias = 'keyAliasName' | |
keyPassword = 'actualReleaseKeyPassword' | |
} | |
debug { | |
storeFile = file('debug.keystore') |
View build.gradle
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 { | |
signingConfigs { | |
release { | |
storeFile = file('release.keystore') | |
storePassword = 'actualReleasePassword' | |
keyAlias = 'keyAliasName' | |
keyPassword = 'actualReleaseKeyPassword' | |
} | |
debug { | |
storeFile = file('debug.keystore') |
View Connectivity.java
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 com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
View SquareRelativeLayoutByHeight.java
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 android.annotation.TargetApi; | |
import android.content.Context; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.widget.RelativeLayout; | |
/** | |
* A RelativeLayout that will always be square -- same width and height, | |
* where the width is based off the height. | |
*/ |
View SwipeDisabledViewPager.java
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 android.content.Context; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
public class SwipeDisabledViewPager extends ViewPager { | |
public SwipeDisabledViewPager(Context context) { | |
super(context); | |
} |