Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Resolves 'Build failed - Dependencies #17' #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Application/release
build
local.properties
*.iml
*.jks
*.keyring
.DS_Store
.gradle
.idea/*
.idea
72 changes: 29 additions & 43 deletions Application/build.gradle
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@

buildscript {
repositories {
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

apply plugin: 'com.android.application'

repositories {
jcenter()
google()
}

dependencies {
compile "com.android.support:support-v4:27.1.0"
compile "com.android.support:support-v13:27.1.0"
compile "com.android.support:cardview-v7:27.1.0"
compile "com.android.support:appcompat-v7:27.1.0"
compile 'com.google.android.support:wearable:2.3.0'
compile 'com.google.android.gms:play-services-wearable:11.8.0'
compile 'com.android.support:support-v13:27.1.0'
wearApp project(':Wearable')
buildscript {
ext.vSupport = '27.1.0' // todo: breaks everything if not 27.1.0
}

// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
List<String> dirs = [
'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process

'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process
android {
compileSdkVersion 27

buildToolsVersion "27.0.3"

compileSdkVersion 27
defaultConfig {
minSdkVersion 18
targetSdkVersion 27
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

sourceSets {
main {
dirs.each { dir ->
Expand All @@ -60,7 +25,28 @@ android {
}
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']

}

configurations.all {
resolutionStrategy.force "com.android.support:animated-vector-drawable:$vSupport"
resolutionStrategy.force "com.android.support:customtabs:$vSupport"
resolutionStrategy.force "com.android.support:percent:$vSupport"
resolutionStrategy.force "com.android.support:recyclerview-v7:$vSupport"
}
}
dependencies {
compile "com.android.support:support-v4:$vSupport"
compile "com.android.support:support-v13:$vSupport"
compile "com.android.support:cardview-v7:$vSupport"
compile "com.android.support:appcompat-v7:$vSupport"
compile 'com.google.android.gms:play-services-wearable:15.0.1'
compile "com.google.android.support:wearable:$vWearable"
provided "com.google.android.wearable:wearable:$vWearable"
wearApp project(':Wearable')
}
repositories {
jcenter()
google()
}



5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ Configurations to "Do not launch Activity" for both the Wear and Application mod
unsure how to do this, please review the "Run Starter project" section in the
[Google Watch Face Code Lab][1].

Steps to build in Android Studio 3.1.3
------------
Once the project is open, edit run configurations -> General -> Launch Options -> Launch: Nothing
this will allow runs.

[1]: https://codelabs.developers.google.com/codelabs/watchface/index.html

Pre-requisites
Expand Down
78 changes: 25 additions & 53 deletions Wearable/build.gradle
Original file line number Diff line number Diff line change
@@ -1,70 +1,23 @@

buildscript {
repositories {
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

apply plugin: 'com.android.application'

repositories {
jcenter()
google()
}



dependencies {

compile 'com.android.support:palette-v7:27.1.0'
compile 'com.android.support:wear:27.1.0'


compile 'com.google.android.gms:play-services-wearable:11.8.0'
compile 'com.android.support:support-v13:27.1.0'

provided 'com.google.android.wearable:wearable:2.3.0'

compile 'com.google.android.support:wearable:2.3.0'

buildscript {
ext.vSupport = '26.1.0' // todo: breaks everything if not 26.1.0
}

// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
List<String> dirs = [
'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process

'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process
android {

compileSdkVersion 26

buildToolsVersion "27.0.3"

defaultConfig {
versionCode 1
versionName "1.0"

minSdkVersion 24

targetSdkVersion 26

multiDexEnabled true

}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

sourceSets {
main {
dirs.each { dir ->
Expand All @@ -74,6 +27,25 @@ android {
}
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']

}
configurations.all {
resolutionStrategy.force "com.android.support:animated-vector-drawable:$vSupport"
resolutionStrategy.force "com.android.support:customtabs:$vSupport"
resolutionStrategy.force "com.android.support:palette-v7:$vSupport"
resolutionStrategy.force "com.android.support:percent:$vSupport"
}
}
dependencies {
compile "com.android.support:palette-v7:$vSupport"
compile "com.android.support:support-v13:$vSupport"
compile "com.android.support:wear:$vSupport"
compile 'com.google.android.gms:play-services-wearable:15.0.1'
compile "com.google.android.support:wearable:$vWearable"
provided "com.google.android.wearable:wearable:$vWearable"
}
repositories {
jcenter()
google()
}


17 changes: 11 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@






buildscript {
ext.vGradle = '3.0.1' // todo: breaks everything if not 3.0.1
ext.vWearable = '2.3.0'
repositories {
jcenter()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$vGradle"
}
}



Expand Down