Hi,
I have a Gradle project with diferent 2 main build scripts. The idea is that one of it is to be used from the development team and the other from our Continuous Integration server (Hudson). Although they are similar in lots of aspects there are smal differences.
To do this I’ve decided that there’s a main gradle script (common.gradle) which as almost every configuration. This script is to be called from 2 other scripts build.gradle and hudson.gradle. Both script files start with apply from: ‘common.gradle’.
The Gradle project structure consists of several subprojects.
The problem I’m facing is that whenever I execute the script that isn’t called build.gradle the build fails. If I rename the script build.gradle, which works, to another name, it stops working.
Is there anything that should be done whenever the script is not called build.gradle? The error I’m facing is the following:
00:54:38.942 [ERROR] [org.gradle.BuildExceptionReporter] Script 'C:\dev\trikorasolns\gradle-project\common.gradle'
line: 46
00:54:38.948 [ERROR] [org.gradle.BuildExceptionReporter]
00:54:38.954 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
00:54:38.961 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating script.
00:54:38.966 [ERROR] [org.gradle.BuildExceptionReporter] > Project with path ':businessobjects' could not be found in root project
'gradle-project'.
...
00:54:39.265 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.UnknownProjectException: Project with path ':bu
sinessobjects' could not be found in root project 'gradle-project'.
Line 46 of the common.gradle is project(’:businessobjects’){ :
// ############# PROJECTS ##############
project(':businessobjects') {
// Reporting
apply plugin: 'project-report'
Thank you in advance for any help.
Best regards, António http://linkd.in/ajcin