Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Carl-Wilhelm Igelström
Carl-Wilhelm Igelström
3,724 Points

Configuring Gradle for Spring Development

I just wanted to say if someone is planning to follow along with the Configuring Gradle for Spring Development Video: and wanting to follow the rest of the series

https://teamtreehouse.com/library/configuring-gradle-for-spring-development.

First off if you are trying to use the newest JDK10 from oracle you have to have gradle 4.7 and higher. current 4.8 is the most recent. Since by default the gradle version in IntelliJ is older you will get an error that gradle cannot find the SDK even though the path settings are correct.

You can go to gradle website (See the guide here: https://gradle.org/install/) and follow their installation instructions, they recommend using scoop for windows who in turn will install in c:\user{user}\scoop\app

You can also "install" it manually by unzipping the files to anywhere on your machine. The installation guide will recommend you to install it in c:\gradle\gradle-4.8

go to ItelliJ and in the menu to the left go to "gradle" and set the path accordingly.

The build.gradle syntax also have changed and for spring-boot framework gradle dependency installation I found this guide, and it actually works. https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/

it will generate the following build.gradle file.

plugins { id 'java' id 'idea' id 'eclipse' id 'org.springframework.boot' version '2.0.3.RELEASE' }

apply plugin: 'idea' apply plugin: 'java' apply plugin: 'io.spring.dependency-management'

group 'com.teamtreehouse' version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories { mavenCentral() }

dependencies { compile 'org.springframework.boot:spring-boot-starter-web' compile 'org.springframework.boot:spring-boot-starter-data-jpa' }

That took me a few hours, hope it helps others trying to follow the course!