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
12 changes: 5 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.2.51"
ext.kotlin_version = "1.3.10"
repositories {
google()
jcenter()
Expand All @@ -11,7 +11,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'io.fabric.tools:gradle:1.+'
classpath 'io.fabric.tools:gradle:1.26.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down Expand Up @@ -62,9 +62,7 @@ subprojects {
ext {
minSdkVersion = 19
targetSdkVersion = 27
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
kotlinVersion = "1.2.51"
supportVersion = "27.0.1"

compileSdkVersion = 28
buildToolsVersion = "28.0.3"
supportVersion = "28.0.0"
}
51 changes: 25 additions & 26 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ android {
dataBinding {
enabled=true
}

testOptions {
unitTests.returnDefaultValues = true
}
}

repositories {
Expand All @@ -54,41 +58,36 @@ repositories {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$rootProject.supportVersion"
implementation "com.android.support:design:$rootProject.supportVersion"

implementation "com.android.support:support-v4:$rootProject.supportVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$rootProject.kotlin_version"

// layout deps
// Support Libraries and Google Play Services
implementation "com.android.support:appcompat-v7:$rootProject.supportVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportVersion"
implementation "com.android.support:design:$rootProject.supportVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportVersion"
implementation "com.android.support:support-core-utils:$rootProject.supportVersion"
implementation 'com.google.android.gms:play-services-wearable:16.0.1'

implementation "com.android.support:palette-v7:$rootProject.supportVersion"
implementation 'org.java-websocket:Java-WebSocket:1.3.0'

// Unit test dependencies
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.powermock:powermock-api-mockito:1.6.4'
testImplementation 'org.powermock:powermock-module-junit4-rule-agent:1.6.4'
testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.4'
testImplementation 'org.powermock:powermock-module-junit4:1.6.4'
testImplementation 'junit:junit:4.12'
// Instrumentation dependencies
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation "com.android.support:support-annotations:$rootProject.supportVersion"
implementation('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'

implementation('com.crashlytics.sdk.android:crashlytics:2.9.6@aar') {
transitive = true
}
implementation 'com.google.android.gms:play-services-wearable:9.4.0'
wearApp project(':wear')

implementation project(':shared')
//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//rxjava,rxandroid
implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
wearApp project(':wear')

implementation 'org.java-websocket:Java-WebSocket:1.3.0'
// Unit test dependencies
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testImplementation 'io.mockk:mockk:1.8.13.kotlin13'

implementation "com.android.support:support-core-utils:$rootProject.supportVersion"
// Instrumentation dependencies
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation "com.android.support:support-annotations:$rootProject.supportVersion"
}
2 changes: 0 additions & 2 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

<application
android:allowBackup="true"
Expand Down Expand Up @@ -60,7 +59,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="mycroft.ai.MainActivity" />
</activity>
<activity android:name=".DiscoveryActivity" />

<meta-data
android:name="com.google.android.gms.version"
Expand Down
124 changes: 0 additions & 124 deletions mobile/src/main/java/mycroft/ai/DiscoveryActivity.kt

This file was deleted.

3 changes: 0 additions & 3 deletions mobile/src/main/java/mycroft/ai/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ class MainActivity : AppCompatActivity() {
}

registerReceivers()

// start the discovery activity (testing only)
// startActivity(new Intent(this, DiscoveryActivity.class));
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
Expand Down
9 changes: 6 additions & 3 deletions mobile/src/main/java/mycroft/ai/TTSManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ import java.util.Locale
*/

class TTSManager {
val notInitializedErrorMessage = "TTS Not Initialized"
val initializationFailedErrorMessage = "Initialization Failed!"

/**
* Backing TTS for this instance. Should not (ever) be null.
*/
private lateinit var mTts: TextToSpeech

/**
* Whether the TTS is available for use (i.e. loaded into memory)
*/
Expand All @@ -71,7 +74,7 @@ class TTSManager {
logError("This Language is not supported")
}
} else {
logError("Initialization Failed!")
logError(initializationFailedErrorMessage)
}
}

Expand Down Expand Up @@ -108,7 +111,7 @@ class TTSManager {
if (isLoaded)
mTts.speak(text, TextToSpeech.QUEUE_ADD, null)
else {
logError("TTS Not Initialized")
logError(notInitializedErrorMessage)
}
}

Expand All @@ -117,7 +120,7 @@ class TTSManager {
if (isLoaded)
mTts.speak(text, TextToSpeech.QUEUE_FLUSH, null)
else
logError("TTS Not Initialized")
logError(notInitializedErrorMessage)
}

/**
Expand Down
Loading