6. Libraries, Packages, and Modules
Activity 1: Tracking Summer High Temperatures
Solution
- Create an IntelliJ Gradle project. Modify
settings.gradle
as follows:rootProject.name = 'temps'
- Modify
build.gradle
as follows:build.gradle
1 buildscript { 2 repositories { 3 jcenter() 4 } 5 dependencies { 6 classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1' 7 } 8 }
- Create a
class
namedCity
. Add the following fields and constructor:package com.packtpub.temps; public class City { private String name; private String country; double summertimeHigh; ...