Skip to content

Commit

Permalink
update kotlin version + app signing. Almost ready for deploy!
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellone committed Jan 23, 2016
1 parent 354be6f commit c0a1a47
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
signing_config
17 changes: 15 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.0.0-beta-3594'
ext.kotlin_version = '1.0.0-beta-4589'
repositories {
mavenCentral()
}
Expand All @@ -11,7 +11,7 @@ buildscript {

plugins {
id 'com.github.hierynomus.license' version '0.12.1'
id 'net.researchgate.release' version '2.3.0'
id 'net.researchgate.release' version '2.3.5'
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -42,6 +42,19 @@ android {
warning 'InvalidPackage'
abortOnError false
}
signingConfigs {
release {
def propertiesFile = new File("./signing_config")
final properties = new Properties();
if(propertiesFile.exists()) {
propertiesFile.withReader { properties.load( it ) }
storeFile properties['ALFIO_KEYSTORE_PATH']
storePassword properties['ALFIO_KEYSTORE_PWD']
keyAlias "alf.io"
keyPassword properties['ALFIO_KEY_PWD']
}
}
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/alfio/backoffice/BaseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ abstract class BaseActivity: AppCompatActivity() {
//@TargetApi(Build.VERSION_CODES.M) //FIXME: why this annotation is not recognized during build?
@SuppressLint("NewApi")
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
val action = pendingActions.getOrElse(requestCode, {Pair(false, {super.onRequestPermissionsResult(requestCode, permissions, grantResults)})});
val action = pendingActions[requestCode] ?: Pair(false, {super.onRequestPermissionsResult(requestCode, permissions, grantResults)});
if(grantResults.any { !it.equals(PackageManager.PERMISSION_GRANTED) } && action.first) {
Log.d(this.javaClass.canonicalName, "The user didn't grant all the permissions");
Snackbar.make(findViewById(android.R.id.content), R.string.message_accept_permissions, Snackbar.LENGTH_LONG).show();
Expand Down

0 comments on commit c0a1a47

Please sign in to comment.