diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 45b565415..88ea3aa1e 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,8 +1,5 @@ - - diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 169fd0dd9..674414fca 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,8 +1,11 @@ + diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 000000000..a5f05cd8c --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 39c65f649..d5d35ec44 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/TODO.md b/TODO.md index e7369c7e1..bb7614f63 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,6 @@ +* assert() is apparently a noop - change to use my version of assert +* make frontend using https://developer.android.com/jetpack/compose/tutorial # Medium priority diff --git a/app/build.gradle b/app/build.gradle index 44b5570a1..ffaab4993 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,6 +21,22 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + buildFeatures { + // Enables Jetpack Compose for this module + compose true + } + + // Set both the Java and Kotlin compilers to target Java 8. + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } } dependencies { @@ -33,4 +49,9 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + + // You also need to include the following Compose toolkit dependencies. + implementation 'androidx.ui:ui-tooling:0.1.0-dev02' + implementation 'androidx.ui:ui-layout:0.1.0-dev02' + implementation 'androidx.ui:ui-material:0.1.0-dev02' } diff --git a/app/src/main/java/com/geeksville/meshutil/SoftwareUpdateService.kt b/app/src/main/java/com/geeksville/meshutil/SoftwareUpdateService.kt index 12f21e72e..4edd556b4 100644 --- a/app/src/main/java/com/geeksville/meshutil/SoftwareUpdateService.kt +++ b/app/src/main/java/com/geeksville/meshutil/SoftwareUpdateService.kt @@ -43,17 +43,15 @@ class SoftwareUpdateService : JobIntentService() { lateinit var firmwareStream: InputStream fun startUpdate() { - if (updateService != null) { totalSizeDesc = updateService.getCharacteristic(SW_UPDATE_TOTALSIZE_CHARACTER)!! - firmwareStream = assets.open("firmware.bin")!! + firmwareStream = assets.open("firmware.bin") // Start the update by writing the # of bytes in the image val numBytes = firmwareStream.available() assert(totalSizeDesc.setValue(numBytes, BluetoothGattCharacteristic.FORMAT_UINT32, 0)) assert(updateGatt.writeCharacteristic(totalSizeDesc)) assert(updateGatt.readCharacteristic(totalSizeDesc)) - } } // Send the next block of our file to the device diff --git a/build.gradle b/build.gradle index 819d034aa..ae5f18304 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.0.0-alpha09' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 11a39a9b2..569a73541 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jan 20 16:09:06 PST 2020 +#Tue Jan 21 19:05:09 PST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-rc-1-all.zip