diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83b3f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,73 @@ +# Created by .ignore support plugin (hsz.mobi) +### Android template +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/caches + +# Keystore files +# Uncomment the following line if you do not want to check your keystore files in. +#*.jks + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +.idea/encodings.xml +.idea/misc.xml +.idea/modules.xml +.idea/runConfigurations.xml +.idea/vcs.xml diff --git a/1-base/build.gradle b/1-base/build.gradle index d8b4e81..1206342 100644 --- a/1-base/build.gradle +++ b/1-base/build.gradle @@ -16,15 +16,13 @@ apply plugin: 'com.android.application' - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' + compileSdkVersion 28 defaultConfig { applicationId "com.android.example.watchface" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -37,7 +35,18 @@ android { } dependencies { - provided 'com.google.android.wearable:wearable:2.0.0' - compile 'com.google.android.support:wearable:2.0.0' - compile 'com.google.android.gms:play-services-wearable:10.2.1' + compileOnly 'com.google.android.wearable:wearable:2.4.0' + implementation 'com.google.android.support:wearable:2.4.0' + implementation 'com.google.android.gms:play-services-wearable:16.0.1' +} + +configurations.all { + resolutionStrategy.eachDependency { DependencyResolveDetails details -> + def requested = details.requested + if (requested.group == 'com.android.support') { + if (!requested.name.startsWith("multidex")) { + details.useVersion '25.3.0' + } + } + } } diff --git a/1-base/src/main/AndroidManifest.xml b/1-base/src/main/AndroidManifest.xml index d537b45..92d1618 100644 --- a/1-base/src/main/AndroidManifest.xml +++ b/1-base/src/main/AndroidManifest.xml @@ -14,15 +14,15 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + - + - - + + + android:permission="android.permission.BIND_WALLPAPER"> + android:resource="@xml/watch_face"/> + android:resource="@drawable/preview_analog"/> + android:resource="@drawable/preview_analog"/> - + - + + android:value="@integer/google_play_services_version"/> diff --git a/1-base/src/main/java/com/android/example/watchface/MyWatchFaceService.java b/1-base/src/main/java/com/android/example/watchface/MyWatchFaceService.java index 447e61a..ad57785 100644 --- a/1-base/src/main/java/com/android/example/watchface/MyWatchFaceService.java +++ b/1-base/src/main/java/com/android/example/watchface/MyWatchFaceService.java @@ -218,10 +218,10 @@ public void onVisibilityChanged(boolean visible) { } /* - * Whether the timer should be running depends on whether we're visible - * (as well as whether we're in ambient mode), - * so we may need to start or stop the timer. - */ + * Whether the timer should be running depends on whether we're visible + * (as well as whether we're in ambient mode), + * so we may need to start or stop the timer. + */ updateTimer(); } diff --git a/2-background/build.gradle b/2-background/build.gradle index d8b4e81..9210160 100644 --- a/2-background/build.gradle +++ b/2-background/build.gradle @@ -16,15 +16,13 @@ apply plugin: 'com.android.application' - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' + compileSdkVersion 28 defaultConfig { applicationId "com.android.example.watchface" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -37,7 +35,7 @@ android { } dependencies { - provided 'com.google.android.wearable:wearable:2.0.0' - compile 'com.google.android.support:wearable:2.0.0' - compile 'com.google.android.gms:play-services-wearable:10.2.1' + compileOnly 'com.google.android.wearable:wearable:2.4.0' + implementation 'com.google.android.support:wearable:2.4.0' + implementation 'com.google.android.gms:play-services-wearable:16.0.1' } diff --git a/2-background/src/main/AndroidManifest.xml b/2-background/src/main/AndroidManifest.xml index 26151a2..271f91b 100644 --- a/2-background/src/main/AndroidManifest.xml +++ b/2-background/src/main/AndroidManifest.xml @@ -15,15 +15,15 @@ ~ limitations under the License. --> - + - + - - + + + android:permission="android.permission.BIND_WALLPAPER"> + android:resource="@xml/watch_face"/> + android:resource="@drawable/preview_analog"/> + android:resource="@drawable/preview_analog"/> - + - + + android:value="@integer/google_play_services_version"/> diff --git a/3-hands/build.gradle b/3-hands/build.gradle index ecb03f6..7de5350 100644 --- a/3-hands/build.gradle +++ b/3-hands/build.gradle @@ -16,15 +16,13 @@ apply plugin: 'com.android.application' - android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 28 defaultConfig { applicationId "com.android.example.watchface" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -37,7 +35,7 @@ android { } dependencies { - provided 'com.google.android.wearable:wearable:2.0.0' - compile 'com.google.android.support:wearable:2.0.0' - compile 'com.google.android.gms:play-services-wearable:10.2.1' -} + compileOnly 'com.google.android.wearable:wearable:2.4.0' + implementation 'com.google.android.support:wearable:2.4.0' + implementation 'com.google.android.gms:play-services-wearable:16.0.1' +} \ No newline at end of file diff --git a/3-hands/src/main/AndroidManifest.xml b/3-hands/src/main/AndroidManifest.xml index 26151a2..271f91b 100644 --- a/3-hands/src/main/AndroidManifest.xml +++ b/3-hands/src/main/AndroidManifest.xml @@ -15,15 +15,15 @@ ~ limitations under the License. --> - + - + - - + + + android:permission="android.permission.BIND_WALLPAPER"> + android:resource="@xml/watch_face"/> + android:resource="@drawable/preview_analog"/> + android:resource="@drawable/preview_analog"/> - + - + + android:value="@integer/google_play_services_version"/> diff --git a/4-ambient/build.gradle b/4-ambient/build.gradle index ecb03f6..7de5350 100644 --- a/4-ambient/build.gradle +++ b/4-ambient/build.gradle @@ -16,15 +16,13 @@ apply plugin: 'com.android.application' - android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 28 defaultConfig { applicationId "com.android.example.watchface" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -37,7 +35,7 @@ android { } dependencies { - provided 'com.google.android.wearable:wearable:2.0.0' - compile 'com.google.android.support:wearable:2.0.0' - compile 'com.google.android.gms:play-services-wearable:10.2.1' -} + compileOnly 'com.google.android.wearable:wearable:2.4.0' + implementation 'com.google.android.support:wearable:2.4.0' + implementation 'com.google.android.gms:play-services-wearable:16.0.1' +} \ No newline at end of file diff --git a/4-ambient/src/main/AndroidManifest.xml b/4-ambient/src/main/AndroidManifest.xml index 26151a2..271f91b 100644 --- a/4-ambient/src/main/AndroidManifest.xml +++ b/4-ambient/src/main/AndroidManifest.xml @@ -15,15 +15,15 @@ ~ limitations under the License. --> - + - + - - + + + android:permission="android.permission.BIND_WALLPAPER"> + android:resource="@xml/watch_face"/> + android:resource="@drawable/preview_analog"/> + android:resource="@drawable/preview_analog"/> - + - + + android:value="@integer/google_play_services_version"/> diff --git a/5-palette/build.gradle b/5-palette/build.gradle index 52ea128..78140ba 100644 --- a/5-palette/build.gradle +++ b/5-palette/build.gradle @@ -16,15 +16,13 @@ apply plugin: 'com.android.application' - android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 28 defaultConfig { applicationId "com.android.example.watchface" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -37,8 +35,8 @@ android { } dependencies { - compile 'com.android.support:palette-v7:23.3.0' - provided 'com.google.android.wearable:wearable:2.0.0' - compile 'com.google.android.support:wearable:2.0.0' - compile 'com.google.android.gms:play-services-wearable:10.2.1' + compileOnly 'com.google.android.wearable:wearable:2.4.0' + implementation 'com.android.support:palette-v7:28.0.0' + implementation 'com.google.android.support:wearable:2.4.0' + implementation 'com.google.android.gms:play-services-wearable:16.0.1' } diff --git a/5-palette/src/main/AndroidManifest.xml b/5-palette/src/main/AndroidManifest.xml index 26151a2..271f91b 100644 --- a/5-palette/src/main/AndroidManifest.xml +++ b/5-palette/src/main/AndroidManifest.xml @@ -15,15 +15,15 @@ ~ limitations under the License. --> - + - + - - + + + android:permission="android.permission.BIND_WALLPAPER"> + android:resource="@xml/watch_face"/> + android:resource="@drawable/preview_analog"/> + android:resource="@drawable/preview_analog"/> - + - + + android:value="@integer/google_play_services_version"/> diff --git a/build.gradle b/build.gradle index 2b7b6d1..63e01e2 100644 --- a/build.gradle +++ b/build.gradle @@ -19,9 +19,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:3.4.0-alpha03' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -30,6 +31,7 @@ buildscript { allprojects { repositories { + google() jcenter() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f0cee46..1d70373 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Mar 27 14:13:32 PDT 2017 +#Fri Nov 09 10:23:05 EST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-milestone-1-all.zip