buildscript { repositories { mavenLocal() mavenCentral() jcenter() maven { url "https://plugins.gradle.org/m2/" } maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/milestone" } maven { url "https://repo.spring.io/release" } } // dependencies { // classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") // } } plugins { id 'java' id 'idea' id 'eclipse' id 'org.springframework.boot' version "${springBoot}" apply false id 'io.spring.dependency-management' version "${dependencyManagement}" } // also https://stackoverflow.com/questions/28404149/how-to-download-javadocs-and-sources-for-jar-using-gradle-2-0 eclipse { classpath { downloadSources = true } } // read more about idea plugin in https://docs.gradle.org/current/userguide/idea_plugin.html idea { module { downloadJavadoc = true downloadSources = true // isDownloadJavadoc(true) // isDownloadSources(true) } } allprojects { group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' targetCompatibility = '1.8' } subprojects { apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' apply plugin: 'java-library' apply plugin: 'java' repositories { mavenLocal() mavenCentral() jcenter() maven { url "https://plugins.gradle.org/m2/" } maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/milestone" } maven { url "https://repo.spring.io/release" } } test { useJUnitPlatform() } dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-log4j2' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' // developmentOnly 'org.springframework.boot:spring-boot-devtools' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } } configurations { all { // https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-configure-log4j-for-logging // https://stackoverflow.com/questions/59629214/caused-by-org-apache-logging-log4j-loggingexception-log4j-slf4j-impl-cannot-be exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' } compileOnly { extendsFrom annotationProcessor } } bootJar { enabled = false mainClass = '' } // Skips tests if you do not provide prod project property from command line test.onlyIf { project.hasProperty('prod') } } test { exclude 'com/javatmp/**/*' } test { exclude '**/*' } test.onlyIf { false == true }