From 9bd0c91eee46a194389002a15a8dfe678754bb0d Mon Sep 17 00:00:00 2001 From: Volkmar Vogel Date: Thu, 12 Sep 2019 15:04:11 +0200 Subject: [PATCH 1/3] update dependencies --- alexa-plugin/build.gradle | 2 +- alexa-spring-plugin/build.gradle | 4 ++-- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- konversation-plugin/build.gradle | 2 +- spring-plugin/build.gradle | 2 +- spring-sample/build.gradle | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/alexa-plugin/build.gradle b/alexa-plugin/build.gradle index 865f077..750fc17 100644 --- a/alexa-plugin/build.gradle +++ b/alexa-plugin/build.gradle @@ -8,7 +8,7 @@ description 'The Alexa plugin for Dialog to write voice applications for Dialogf dependencies { implementation project(":core") implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation "com.amazon.alexa:ask-sdk-core:2.19.0" + implementation "com.amazon.alexa:ask-sdk-core:2.21.0" } dokka { diff --git a/alexa-spring-plugin/build.gradle b/alexa-spring-plugin/build.gradle index db17552..024b155 100644 --- a/alexa-spring-plugin/build.gradle +++ b/alexa-spring-plugin/build.gradle @@ -22,8 +22,8 @@ dependencies { implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' implementation 'org.jetbrains.kotlin:kotlin-reflect' - implementation 'org.springframework:spring-context:5.1.8.RELEASE' - implementation 'com.amazon.alexa:ask-sdk-core:2.19.0' + implementation 'org.springframework:spring-context:5.1.9.RELEASE' + implementation 'com.amazon.alexa:ask-sdk-core:2.21.0' } task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { diff --git a/build.gradle b/build.gradle index b093a8a..c109bff 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.github.ben-manes.versions' buildscript { ext.versions = [:] - ext.versions.kotlin = '1.3.41' + ext.versions.kotlin = '1.3.50' ext.versions.dokka = '0.9.18' ext.versions.core = '1.0.3' ext.versions.alexa = '1.0.1' @@ -19,7 +19,7 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" - classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.25.0' classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" classpath 'com.novoda:bintray-release:SNAPSHOT-13' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ba125a3..ef829ac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/konversation-plugin/build.gradle b/konversation-plugin/build.gradle index 9588c72..5fc0ccf 100644 --- a/konversation-plugin/build.gradle +++ b/konversation-plugin/build.gradle @@ -9,7 +9,7 @@ dependencies { implementation project(":core") implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - compile 'org.rewedigital.voice:konversation:1.0-rc1' + compile 'org.rewedigital.voice:konversation:1.0.1' } task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { diff --git a/spring-plugin/build.gradle b/spring-plugin/build.gradle index f9266e4..390c01f 100644 --- a/spring-plugin/build.gradle +++ b/spring-plugin/build.gradle @@ -20,7 +20,7 @@ dependencies { implementation 'org.jetbrains.kotlin:kotlin-reflect' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' - implementation 'org.springframework:spring-context:5.1.8.RELEASE' + implementation 'org.springframework:spring-context:5.1.9.RELEASE' } dokka { diff --git a/spring-sample/build.gradle b/spring-sample/build.gradle index 95f7145..59bfc2f 100644 --- a/spring-sample/build.gradle +++ b/spring-sample/build.gradle @@ -3,7 +3,7 @@ version '1.0.0-SNAPSHOT' buildscript { ext { - springBootVersion = '2.1.6.RELEASE' + springBootVersion = '2.1.8.RELEASE' } repositories { jcenter() @@ -35,7 +35,7 @@ compileTestKotlin { } dependencies { - def askSdkVersion = '2.19.0' + def askSdkVersion = '2.21.0' implementation project(':core') implementation project(':ssml-builder') From 13ebf2a72572c63c4621bdbf9573df50ec2312b8 Mon Sep 17 00:00:00 2001 From: Volkmar Vogel Date: Thu, 12 Sep 2019 15:18:17 +0200 Subject: [PATCH 2/3] add userVerificationStatus --- .../rewedigital/dialog/handler/DialogflowHandler.kt | 10 +++++++++- .../kotlin/org/rewedigital/dialog/model/google/User.kt | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/org/rewedigital/dialog/handler/DialogflowHandler.kt b/core/src/main/kotlin/org/rewedigital/dialog/handler/DialogflowHandler.kt index 077a955..d1f33fc 100644 --- a/core/src/main/kotlin/org/rewedigital/dialog/handler/DialogflowHandler.kt +++ b/core/src/main/kotlin/org/rewedigital/dialog/handler/DialogflowHandler.kt @@ -28,7 +28,7 @@ class DialogflowHandler(private val webhookRequest: WebhookRequest) { /** * The stored user data aka user storage. - * @see https://developers.google.com/actions/assistant/save-data#json + * @see Assistant documentation */ val userData: MutableMap = run { val userData = webhookRequest.originalDetectIntentRequest?.payload?.user?.userStorage @@ -97,6 +97,14 @@ class DialogflowHandler(private val webhookRequest: WebhookRequest) { val accessToken: String? get() = webhookRequest.originalDetectIntentRequest?.payload?.user?.accessToken + /** + * True if the userVerificationStatus is VERIFIED + * False if the userVerificationStatus is GUEST or null + * @see Assistant documentation + */ + val isUserVerified: Boolean + get() = webhookRequest.originalDetectIntentRequest?.payload?.user?.userVerificationStatus == "VERIFIED" + /** * Returns an [DialogflowResponseBuilder] which can be used to construct a complete webhook response * containing speech and visual components. diff --git a/core/src/main/kotlin/org/rewedigital/dialog/model/google/User.kt b/core/src/main/kotlin/org/rewedigital/dialog/model/google/User.kt index 0d838e1..59a5583 100644 --- a/core/src/main/kotlin/org/rewedigital/dialog/model/google/User.kt +++ b/core/src/main/kotlin/org/rewedigital/dialog/model/google/User.kt @@ -9,7 +9,8 @@ data class User( val permissions: List?, val locale: String?, val lastSeen: String?, - var userStorage: String? + var userStorage: String?, + val userVerificationStatus: String? ) { data class Profile( val displayName: String?, From 2da48196b34d8106fe479e055722244108250883 Mon Sep 17 00:00:00 2001 From: Volkmar Vogel Date: Thu, 12 Sep 2019 16:38:33 +0200 Subject: [PATCH 3/3] try to fix travis build error --- alexa-plugin/build.gradle | 2 +- alexa-spring-plugin/build.gradle | 6 +++--- konversation-plugin/build.gradle | 2 +- spring-plugin/build.gradle | 2 +- spring-sample/build.gradle | 14 +++++++------- ssml-plugin/build.gradle | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/alexa-plugin/build.gradle b/alexa-plugin/build.gradle index 750fc17..5518570 100644 --- a/alexa-plugin/build.gradle +++ b/alexa-plugin/build.gradle @@ -6,7 +6,7 @@ version rootProject.ext.versions.alexa description 'The Alexa plugin for Dialog to write voice applications for Dialogflow and Alexa.' dependencies { - implementation project(":core") + implementation project(path: ":core", configuration: 'default') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" implementation "com.amazon.alexa:ask-sdk-core:2.21.0" } diff --git a/alexa-spring-plugin/build.gradle b/alexa-spring-plugin/build.gradle index 024b155..a8194f5 100644 --- a/alexa-spring-plugin/build.gradle +++ b/alexa-spring-plugin/build.gradle @@ -16,9 +16,9 @@ buildscript { } dependencies { - implementation project(':core') - implementation project(':alexa-plugin') - implementation project(':spring-plugin') + implementation project(path: ':core', configuration: 'default') + implementation project(path: ':alexa-plugin', configuration: 'default') + implementation project(path: ':spring-plugin', configuration: 'default') implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' implementation 'org.jetbrains.kotlin:kotlin-reflect' diff --git a/konversation-plugin/build.gradle b/konversation-plugin/build.gradle index 5fc0ccf..b39c891 100644 --- a/konversation-plugin/build.gradle +++ b/konversation-plugin/build.gradle @@ -6,7 +6,7 @@ version rootProject.ext.versions.konversation_plugin description 'This is the Konversation plugin for Dialog to write voice applications fast.' dependencies { - implementation project(":core") + implementation project(path: ":core", configuration: 'default') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" compile 'org.rewedigital.voice:konversation:1.0.1' diff --git a/spring-plugin/build.gradle b/spring-plugin/build.gradle index 390c01f..7fe18f4 100644 --- a/spring-plugin/build.gradle +++ b/spring-plugin/build.gradle @@ -16,7 +16,7 @@ version rootProject.ext.versions.spring_plugin description 'This is the Spring plugin from Dialog to write voice applications fast.' dependencies { - implementation project(':core') + implementation project(path: ':core', configuration: 'default') implementation 'org.jetbrains.kotlin:kotlin-reflect' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' diff --git a/spring-sample/build.gradle b/spring-sample/build.gradle index 59bfc2f..4bc0df0 100644 --- a/spring-sample/build.gradle +++ b/spring-sample/build.gradle @@ -37,13 +37,13 @@ compileTestKotlin { dependencies { def askSdkVersion = '2.21.0' - implementation project(':core') - implementation project(':ssml-builder') - implementation project(':ssml-plugin') - implementation project(':spring-plugin') - implementation project(':konversation-plugin') - implementation project(':alexa-plugin') - implementation project(':alexa-spring-plugin') + implementation project(path: ':core', configuration: 'default') + implementation project(path: ':ssml-builder', configuration: 'default') + implementation project(path: ':ssml-plugin', configuration: 'default') + implementation project(path: ':spring-plugin', configuration: 'default') + implementation project(path: ':konversation-plugin', configuration: 'default') + implementation project(path: ':alexa-plugin', configuration: 'default') + implementation project(path: ':alexa-spring-plugin', configuration: 'default') implementation('org.springframework.boot:spring-boot-starter-web') implementation('com.fasterxml.jackson.module:jackson-module-kotlin') diff --git a/ssml-plugin/build.gradle b/ssml-plugin/build.gradle index dad1188..64216ed 100644 --- a/ssml-plugin/build.gradle +++ b/ssml-plugin/build.gradle @@ -9,8 +9,8 @@ apply from: '../docu.gradle' dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation project(':core') - implementation project(':ssml-builder') + implementation project(path: ':core', configuration: 'default') + implementation project(path: ':ssml-builder', configuration: 'default') } dokka {