Skip to content

Commit

Permalink
Fixed signing of sample app.
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed Mar 21, 2015
1 parent 2161a5a commit 2519c1a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ target/
.idea
.DS_Store
*.iml
signing.properties
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ allprojects {
repositories {
jcenter()
}
}
}

ext.signingProperties = new Properties()
signingProperties.load(new FileInputStream(file('signing.properties')))
4 changes: 1 addition & 3 deletions sample/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.jraf.android.backport.switchwidget.sample"
android:versionCode="2"
android:versionName="2.0.0">
package="org.jraf.android.backport.switchwidget.sample">

<application
android:allowBackup="true"
Expand Down
24 changes: 21 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
compileSdkVersion 22
buildToolsVersion '22.0.0'

defaultConfig {
applicationId 'org.jraf.android.backport.switchwidget.sample'
versionCode 2
versionName '2.0.0'
minSdkVersion 7
targetSdkVersion 21
targetSdkVersion 22
}

signingConfigs {
release {
storeFile file(signingProperties['key-store'])
storePassword signingProperties['key-store-password']
keyAlias signingProperties['key-alias']
keyPassword signingProperties['key-alias-password']
}
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-rules.txt', getDefaultProguardFile('proguard-android-optimize.txt')
signingConfig signingConfigs.release
}
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand All @@ -22,6 +38,8 @@ android {
res.srcDirs = ['res']
}
}


}

dependencies {
Expand Down
5 changes: 5 additions & 0 deletions signing.properties.SAMPLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Edit and save this file to a file named signing.properties.
key-store=/home/scott/devkeys/android_release_key.keystore
key-store-password=P4ssw0Rd
key-alias=android_release_key
key-alias-password=P4ssw0Rd

0 comments on commit 2519c1a

Please sign in to comment.