Skip to content

Commit

Permalink
feat(build): adds project properties for composite builds. (#3648)
Browse files Browse the repository at this point in the history
This adds flags for the related projects that we bring in
as dependencies, to enable referencing the related project
as a composite build via gradle.

This method of enabling composite builds seems to work
significantly better with IntelliJ. (As opposed to
importing multiple projects into the IDE and configuring
the composite relationship after the fact)

This holds the opinion that all the projects are checked
out in the same parent directory, and can be found at
`'../<projectName>'` relative to this project.

To enable a composite reference to a project, set the
project property `'<projectName>Composite=true'`.

This can be done either as
* a command line flag, e.g. `-PkorkComposite=true`
* a project property via gradle.properties
* a global project property via ~/.gradle/gradle.properties
  • Loading branch information
cfieber committed May 5, 2020
1 parent ee99ba1 commit 92b1c2c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,19 @@ korkVersion=7.41.3
kotlinVersion=1.3.71
org.gradle.parallel=true
spinnakerGradleVersion=8.0.6

# To enable a composite reference to a project, set the
# project property `'<projectName>Composite=true'`.
#
# This can be done either as
# * a command line flag, e.g. `-PkorkComposite=true`
# * a project property via gradle.properties
# * a global project property via ~/.gradle/gradle.properties
#
# The composite project must checked out in a sibling directory
# to this project, matching the name of the project
# e.g. '../kork'
#
#fiatComposite=true
#keikoComposite=true
#korkComposite=true
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
* limitations under the License.
*/

['fiat', 'keiko', 'kork'].each { prj ->
String propName = "${prj}Composite"
String projectPath = "../$prj"
if (settings.ext.has(propName) && Boolean.parseBoolean(settings.ext.get(propName) as String)) {
includeBuild projectPath
}
}

include "orca-api",
"orca-api-tck",
"orca-applications",
Expand Down

0 comments on commit 92b1c2c

Please sign in to comment.