mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2024-12-21 20:44:36 +01:00
change the way we sign the app
This commit is contained in:
parent
46fbd21f60
commit
22a9e52ba7
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/build
|
||||
/captures
|
||||
release.keystore
|
||||
signing.properties
|
||||
|
BIN
app/app-release.apk
Normal file
BIN
app/app-release.apk
Normal file
Binary file not shown.
@ -1,14 +1,6 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
/*signingConfigs {
|
||||
config {
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
keyPassword RELEASE_KEY_PASSWORD
|
||||
storeFile file('../release.keystore')
|
||||
storePassword RELEASE_STORE_PASSWORD
|
||||
}
|
||||
}*/
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "22.0.1"
|
||||
defaultConfig {
|
||||
@ -20,11 +12,14 @@ android {
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
signingConfigs {
|
||||
release
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//signingConfig signingConfigs.config
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -44,3 +39,23 @@ dependencies {
|
||||
androidTestCompile 'com.android.support.test:rules:0.4.1'
|
||||
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
|
||||
}
|
||||
|
||||
def Properties props = new Properties()
|
||||
def propFile = new File('signing.properties')
|
||||
if (propFile.canRead()) {
|
||||
props.load(new FileInputStream(propFile))
|
||||
|
||||
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
|
||||
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
|
||||
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
||||
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
|
||||
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
||||
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
|
||||
} else {
|
||||
println 'signing.properties found but some entries are missing'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
} else {
|
||||
println 'signing.properties not found'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
# 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.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
RELEASE_KEY_ALIAS=myalias
|
||||
RELEASE_KEY_PASSWORD=123456789
|
||||
RELEASE_STORE_PASSWORD=987654321
|
4
signing.properties_sample
Normal file
4
signing.properties_sample
Normal file
@ -0,0 +1,4 @@
|
||||
STORE_FILE=/path/to/your.keystore
|
||||
STORE_PASSWORD=yourkeypass
|
||||
KEY_ALIAS=projectkeyalias
|
||||
KEY_PASSWORD=yourkeypass
|
Loading…
Reference in New Issue
Block a user