I have a gradle project in intelliJ using the Java 8 JDK. The project runs fine until I try to add a spring dependency (I've tried spring boot starter and spring context).
build.gradle
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'closet.java-application-conventions'
}
dependencies {
implementation 'org.apache.commons:commons-text'
implementation project(':utilities')
implementation 'com.jfoenix:jfoenix:8.0.9'
implementation 'org.springframework:spring-context:5.3.2'
}
application {
// Define the main class for the application.
mainClass = 'closet.app.App'
}
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
When I try to build I get the error Task 'wrapper' not found in project ':app' where app is the name of my module.
If I change https\://services.gradle.org/distributions/gradle-6.8-all.zip to https\://services.gradle.org/distributions/gradle-6.8-bin.zip then it builds successfully, but it doesn't seem to add spring to the classpath as I can't access annotations like @Component or others.
What's the problem here?