mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
change the way we sign the app
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@
|
|||||||
/build
|
/build
|
||||||
/captures
|
/captures
|
||||||
release.keystore
|
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'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
/*signingConfigs {
|
|
||||||
config {
|
|
||||||
keyAlias RELEASE_KEY_ALIAS
|
|
||||||
keyPassword RELEASE_KEY_PASSWORD
|
|
||||||
storeFile file('../release.keystore')
|
|
||||||
storePassword RELEASE_STORE_PASSWORD
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "22.0.1"
|
buildToolsVersion "22.0.1"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@@ -20,11 +12,14 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
release
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
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:rules:0.4.1'
|
||||||
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.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
|
Reference in New Issue
Block a user