From 035c83463256dcd428f07cc03c3979a0045f0862 Mon Sep 17 00:00:00 2001 From: Jantz Date: Sun, 3 Jun 2018 04:49:14 -0500 Subject: [PATCH 1/7] Update gradle distribution from 3.3 to 4.4 --- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties b/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties index 00ae10288..619ded4d6 100644 --- a/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties +++ b/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip From 2ddb56726acbe19c503fddbfa72691dcf1b8c47e Mon Sep 17 00:00:00 2001 From: Jantz Date: Sun, 3 Jun 2018 06:26:59 -0500 Subject: [PATCH 2/7] Change gradle version to latest 4.7 --- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties b/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties index 619ded4d6..d0284d3be 100644 --- a/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties +++ b/1.01-Exercise-RunYourFirstTask/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip From 18114224d14efaf697112711b555288d1780b5ea Mon Sep 17 00:00:00 2001 From: Jantz Date: Sun, 3 Jun 2018 06:55:57 -0500 Subject: [PATCH 3/7] Update gradle version references and add "java version may be different" above version references. --- 1.02-Exercise-InstallGradle/build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100755 => 100644 1.02-Exercise-InstallGradle/build.gradle diff --git a/1.02-Exercise-InstallGradle/build.gradle b/1.02-Exercise-InstallGradle/build.gradle old mode 100755 new mode 100644 index 3d5eed6e3..e249ae7d3 --- a/1.02-Exercise-InstallGradle/build.gradle +++ b/1.02-Exercise-InstallGradle/build.gradle @@ -11,6 +11,8 @@ installation of Gradle. First make sure you have an installation of by running The output should be something like: +(java version may be different) + java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode) @@ -48,9 +50,9 @@ terminal. Note that you may need to change the version number on the first and third lines. Note that you may need to run the following command with `sudo` out in front. -unzip ~/Downloads/gradle-3.3-all.zip -d /usr/local/gradle/ &&\ +unzip ~/Downloads/gradle-4.7-all.zip -d /usr/local/gradle/ &&\ echo '# Adding Gradle to system path -export GRADLE_HOME=/usr/local/gradle/gradle-3.3 +export GRADLE_HOME=/usr/local/gradle/gradle-4.7 PATH=$GRADLE_HOME/bin:$PATH export PATH' >> ~/.bash_profile &&\ source ~/.bash_profile @@ -60,14 +62,14 @@ source ~/.bash_profile First, head over to https://gradle.org/gradle-download/, and download the latest version of Gradle. Note that we want the complete distribution. Next, we'll unzip Gradle and move it to where we want it to live. Our recommendation is in -`C:\gradle-3.3`. +`C:\gradle-4.7`. To tell Windows where to find Gradle, we need to add an environment variable. Navigate to the Control Panel > System > Advanced system settings > Advanced > Environment Variables... > System variables > New... Set the variable name to: GRADLE_HOME Set the variable value to the location -you unzipped Gradle if you followed our suggestion it should be: C:\gradle-3.3 +you unzipped Gradle if you followed our suggestion it should be: C:\gradle-4.7 Then edit the PATH user variable by appending: ;%GRADLE_HOME%\bin\ @@ -118,6 +120,8 @@ Before following these instructions, check to make sure you haven't already installed Java by running `java -version`. If the output is something like the following: +(java version may be different) + java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode) From b45eaaf0b13b399df0826e3b7e7cf988fd0bc151 Mon Sep 17 00:00:00 2001 From: Jantz Date: Sun, 3 Jun 2018 09:27:19 -0500 Subject: [PATCH 4/7] Remove solution.gradle heading from build.gradle --- 1.05-Exercise-ExperimentWithGroovy/build.gradle | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) mode change 100755 => 100644 1.05-Exercise-ExperimentWithGroovy/build.gradle diff --git a/1.05-Exercise-ExperimentWithGroovy/build.gradle b/1.05-Exercise-ExperimentWithGroovy/build.gradle old mode 100755 new mode 100644 index 4afae6612..ccb6f4081 --- a/1.05-Exercise-ExperimentWithGroovy/build.gradle +++ b/1.05-Exercise-ExperimentWithGroovy/build.gradle @@ -1,14 +1,6 @@ /* -Welcome to the solutions to the Groovy Playground exercise! You can run these -tasks by telling Gradle to use this build script, instead of the default -build.gradle. To run the task below, use: - - $ gradle -b solution.gradle stringsAndTypes - -or, more compactly - - $ gradle -b solution.gradle sAT +Welcome to the to the Groovy Playground exercise! Complete the TODOs below. */ From 84a68e163bd56a14983a6bb22b6cf5764a91a8da Mon Sep 17 00:00:00 2001 From: Jantz Date: Tue, 5 Jun 2018 12:48:12 -0500 Subject: [PATCH 5/7] Change method references from getJoke() to tellAHandCraftedJoke() and tellAWizardJoke() to match solution code. Mention that class must be in package to allow for later import. --- 4.02-Exercise-CreateAJavaLibrary/exercise.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/4.02-Exercise-CreateAJavaLibrary/exercise.txt b/4.02-Exercise-CreateAJavaLibrary/exercise.txt index 96a965d52..65bf80cf2 100644 --- a/4.02-Exercise-CreateAJavaLibrary/exercise.txt +++ b/4.02-Exercise-CreateAJavaLibrary/exercise.txt @@ -3,9 +3,10 @@ app, and not one, but two Java libraries! 1. Create a new project in Android Studio, using all the defaults. -2. Manually add a Java module with a class called JokeSmith with a getJoke() -method. Feel free to supply a funny joke, or just a debug method, if -you're no fun. Remember to set sourceCompatibility = 1.7, so your library is +2. Manually add a Java module with a class called JokeSmith with a tellAHandCraftedJoke() +method inside a package so that the class can be imported in your MainActivityFragment. +Feel free to supply a funny joke, or just a debug method, if you're no fun. +Remember to set sourceCompatibility = 1.7, so your library is usable on Android. This line should be added to the build.gradle file of the module. @@ -25,7 +26,7 @@ Note that the wizard adds JokeWizard to your settings.gradle 7. Declare a project dependency between JokeWizard and JokeSmith -8. Implement a getJoke() method on JokeWizard that uses the getJoke() method +8. Implement a tellAWizardJoke() method on JokeWizard that uses the tellAHandCraftedJoke() method on JokeSmith. 9. Add a project dependence between your app and JokeWizard From be3a981cb530e9de12910ce74556a66d450dd09a Mon Sep 17 00:00:00 2001 From: Jantz Date: Tue, 5 Jun 2018 12:54:23 -0500 Subject: [PATCH 6/7] Fix spelling of dependency --- 4.02-Exercise-CreateAJavaLibrary/exercise.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4.02-Exercise-CreateAJavaLibrary/exercise.txt b/4.02-Exercise-CreateAJavaLibrary/exercise.txt index 65bf80cf2..29252ffaa 100644 --- a/4.02-Exercise-CreateAJavaLibrary/exercise.txt +++ b/4.02-Exercise-CreateAJavaLibrary/exercise.txt @@ -29,7 +29,7 @@ Note that the wizard adds JokeWizard to your settings.gradle 8. Implement a tellAWizardJoke() method on JokeWizard that uses the tellAHandCraftedJoke() method on JokeSmith. -9. Add a project dependence between your app and JokeWizard +9. Add a project dependency between your app and JokeWizard 9. Add another text view to MainActivityFragment and populate it with a joke from JokeWizard. From 7b06d0d1609449253c8b134a90507c16e2aaec0b Mon Sep 17 00:00:00 2001 From: Jantz Date: Tue, 5 Jun 2018 17:50:57 -0500 Subject: [PATCH 7/7] Correct spelling and finish cut-off sentence referring to config block inside app/build.gradle. --- 4.06-Exercise-ConfigureSigning/app/build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/4.06-Exercise-ConfigureSigning/app/build.gradle b/4.06-Exercise-ConfigureSigning/app/build.gradle index 9198164a1..a78fa71aa 100644 --- a/4.06-Exercise-ConfigureSigning/app/build.gradle +++ b/4.06-Exercise-ConfigureSigning/app/build.gradle @@ -1,10 +1,12 @@ /* -In this exercise you'll configure signing and deploy a release build. +In this exercise you'll configure signing and deploying a release build. 1. Use the Build > Generate Signed APK dialog to create a new keystore (or you can use a previously generated keystore). -2. Create a signing configuration using your keystore. You can either use the Module Settings dialog (which you can access by right clicking on the app folder), or by manually configuring the signingConfigs block. Make sure the keystore is included in your project directory and is referenced via a +2. Create a signing configuration using your keystore. You can either use the Module Settings dialog (which you can access by right clicking on the app folder), +or by manually configuring the signingConfigs block. Make sure the keystore is included in your project directory and is referenced via a config block +in your app's build.gradle. http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-Configurations