I'm trying to build a library. I have Spring Boot Gradle Plugin in my build.gradle file:
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
}
My library without the main class. To prevent 'Main class not configured ...' error I add to build.gradle:
bootRepackage {
enabled = false
}
but got an error:
A problem occurred evaluating root project 'mysuperlibrary'.
Could not find method bootRepackage() for arguments [build_3886uiniuyuorta9lpa9n4f5c$_run_closure3@1975ec48] on root project 'mysuperlibrary' of type org.gradle.api.Project.
All works fine with Spring boot Gradle Plugin 1.5.16 but don't works with 2.1.3.
UPDATE: This plugin I use because without it I can`t resolve testCompile 'org.springframework.boot:spring-boot-starter-test' . When I delete the plugin I can build project bit dependency for test disappears.
apply plugin: 'java-library'
. Spring Boot Plugin automatically will not create start up class for output jar. Also, plugin will still control dependencies from this sub-project. – Mister_Jesus