In a project with lombok. It works on the command line when run with intellij idea
./gradlew bootRun
Then
error:Can't find symbol
When you are told
buildscript {
ext {
springBootVersion = '2.0.1.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" } //add to
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "net.ltgt.gradle:gradle-apt-plugin:0.15" //add to
}
}
...
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'
apply plugin: 'net.ltgt.apt' //add to
dependencies {
compile('org.springframework.boot:spring-boot-starter')
...
compileOnly('org.projectlombok:lombok:1.16.20')
apt "org.projectlombok:lombok:1.16.20" //add to
}
compileJava.dependsOn(processResources)
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}
Add the above additions.
I couldn't use the # plugins syntax. I gave up quickly
Recommended Posts