What went wrong:
A problem occurred evaluating root project 'Semver'.
Failed to apply plugin [id 'net.vivin.gradle-semantic-build-versioning']
org.gradle.api.internal.project.DefaultProject_Decorated cannot be cast to org.gradle.api.initialization.Settings
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
@adhithyasrinivasan It looks like you're applying this to build.gradle. This is a settings plugin and so should be defined and applied inside settings.gradle.
Please find the gradle file.
buildscript { ext { springBootVersion = '1.4.1.RELEASE' } repositories { mavenCentral() jcenter()
maven { url "https://plugins.gradle.org/m2/" }} dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") classpath 'gradle.plugin.net.vivin:gradle-semantic-build-versioning:4.0.0'
}
group 'net.vivin' apply plugin: 'eclipse' apply plugin: 'spring-boot' apply plugin: 'application' apply plugin: 'net.vivin.gradle-semantic-build-versioning'
mainClassName = "sem.Semver"
jar { baseName = 'demo' //version = '0.0.1-SNAPSHOT' //version=versioning.info.full }
repositories { mavenCentral() }
configurations { providedRuntime } configurations.all{ exclude group:'javax.servlet', module :'servlet-api' }
task wrapper(type: Wrapper) { gradleVersion = '2.9' }
Getting the following error
FAILURE: Build failed with an exception.
Where: Build file '/home/user/testgit/Semver/build.gradle' line: 23
What went wrong: A problem occurred evaluating root project 'Semver'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.501 secs