Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ apks
# Gradle
build
.gradle
sample/signing.properties

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you use gradle to build your Android project you can simply add a dependency

dependencies {
mavenCentral()
compile 'com.github.manuelpeinado.imagelayout:imagelayout:+'
compile 'com.github.manuelpeinado.imagelayout:imagelayout:1.1.0'
}

```
Expand Down
26 changes: 26 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ android {
versionCode Integer.parseInt(project.VERSION_CODE)
}

signingConfigs { release }

buildTypes {
release {
signingConfig signingConfigs.release
}
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand All @@ -28,3 +36,21 @@ android {
}
}


File propFile = file('signing.properties');
if (propFile.exists()) {
def Properties props = new Properties()
props.load(new FileInputStream(propFile))

if (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 {
android.buildTypes.release.signingConfig = null
}
} else {
android.buildTypes.release.signingConfig = null
}