Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
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
6 changes: 5 additions & 1 deletion src/android/CommandSystem/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ plugins {
id 'maven-publish'
}
// So far I'm unable to get this to be set dynamically ...
project.ext.GRADLE_DOTNET_VERSION = "7.0.10"
//project.ext.GRADLE_DOTNET_VERSION = "7.0.9"
def localProperties = new Properties()
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
project.ext.GRADLE_DOTNET_VERSION = localProperties.getProperty("dotnet.version")

apply from: 'copyDependentBinaries.gradle'

android {
Expand Down
12 changes: 12 additions & 0 deletions src/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ plugins {
id 'org.jetbrains.kotlin.android'
}

def localProperties = new Properties()
localProperties.load(new FileInputStream(rootProject.file("local.properties")))

android {
namespace 'com.microsoft.commandsystemsample'
compileSdk 33
Expand All @@ -18,6 +21,15 @@ android {
}

buildTypes {
// TODO: there has to be a way to be dry with these settings see https://developer.android.com/build/gradle-tips#share-properties-with-the-manifest
debug {
buildConfigField("String", "SPEECH_KEY", "\"" + localProperties['speech.key'] + "\"")
buildConfigField("String", "SPEECH_REGION", "\"" + localProperties['speech.region'] + "\"")
buildConfigField("String", "CLU_KEY", "\"" + localProperties['clu.key'] + "\"")
buildConfigField("String", "CLU_ENDPOINT", "\"" + localProperties['clu.endpoint'] + "\"")
buildConfigField("String", "CLU_PROJECT_NAME", "\"" + localProperties['clu.project.name'] + "\"")
buildConfigField("String", "CLU_DEPLOYMENT_NAME", "\"" + localProperties['clu.deployment.name'] + "\"")
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ class MainActivity : AppCompatActivity() {
}
.configureSecrets { secrets: ConfigureSecretBuilder ->
secrets
.addSecret("SPEECH_KEY","YOUR_KEY")
.addSecret("SPEECH_REGION","westus")
.addSecret("SPEECH_KEY", BuildConfig.SPEECH_KEY)
.addSecret("SPEECH_REGION", BuildConfig.SPEECH_REGION)
.addSecret("SPEECH_DEFAULT_LANGUAGE","en-us")
.addSecret("SPEECH_CUSTOM_RECOGNITION_ENDPOINT_ID","")
.addSecret("SPEECH_CUSTOM_SYNTHESIS_ENDPOINT_ID","")
.addSecret("CLU_KEY","YOUR_KEY")
.addSecret("CLU_ENDPOINT","https://internal-gm-dev.cognitiveservices.azure.com")
.addSecret("CLU_PROJECT_NAME","GM-Orchestrator")
.addSecret("CLU_DEPLOYMENT_NAME","2023-02-06")
.addSecret("CLU_KEY", BuildConfig.CLU_KEY)
.addSecret("CLU_ENDPOINT", BuildConfig.CLU_ENDPOINT)
.addSecret("CLU_PROJECT_NAME", BuildConfig.CLU_PROJECT_NAME)
.addSecret("CLU_DEPLOYMENT_NAME", BuildConfig.CLU_DEPLOYMENT_NAME)
.addSecret("OPEN_AI_DEPLOYMENT","robch-southcentral-oai-txtdav002")
.addSecret("OPEN_AI_ENDPOINT","https://robch-openai.openai.azure.com/")
.addSecret("OPEN_AI_KEY","YOUR_KEY")
Expand Down
19 changes: 19 additions & 0 deletions src/android/local.properties.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Aug 21 05:54:26 EDT 2023

# the line sdk.dir should ALREADY be in your local.properties file...
sdk.dir=C\:\\Users\\scicoria\\AppData\\Local\\Android\\Sdk
# this needs to be set to the version present in C:\Program Files\dotnet\templates\7.????
dotnet.version=7.0.10
# this is the Language Service Speech Key and region
speech.key=??????????
speech.region=westus3
clu.key=????
clu.endpoint=https://???.cognitiveservices.azure.com
clu.project.name=????
clu.deployment.name=2023-02-06