Table of Contents
Table of Contents | ||
---|---|---|
|
Structure
First decide between type 1 and type 2.
For type 1, the repository is a single project with source sets.
Type 2 is a repository containing 2 or more subprojects. Common properties are contained in product.properties.
Repository as a single project
gradle.properties
extraSourceSets = [] - Extra source sets. Will create multiproject build with seperate dependency tree for each. (ex. ["test", "visualizers"])
publishMode = SNAPSHOT - Publish mode. SNAPSHOT or STABLE
STABLE results in publish version exactly as declared (ex. 0.1.0)
SNAPSHOT creates version of form 0.1.0-SNAPSHOT-5 where 5 is bambooBuildNumber
groupDependencyVersion = SNAPSHOT-LATEST - This variable gets placed as the version of many IHMC dependencies. On Bamboo, this gets overridden to SNAPSHOT-BAMBOO, which snaps the dependencies to specific build numbers and branches. SNAPSHOT-LATEST will pull the latest snapshots from Artifactory. You can pin a version too, like 0.9.1, or 0.10.0-SNAPSHOT-branch-name-1-5.
depthFromWorkspaceDirectory = 1 - Depth from repository group folder. This will always be 1 for type 1 repositories.
excludeFromCompositeBuild = false - Whether to exclude this project from being built from source # when building other projects in your repository group folder.
includeBuildsFromWorkspace = true - When building this project, whether to initiate a composite build on everything in the same repository folder. e.g. Build dependencies from source if they are found on disk.
Code Block | ||
---|---|---|
| ||
hyphenatedName = your-project-hyphenated pascalCasedName = YourProjectPascalCased extraSourceSets = [] publishMode = SNAPSHOT groupDependencyVersion = SNAPSHOT-LATEST depthFromWorkspaceDirectory = 1 excludeFromCompositeBuild = false includeBuildsFromWorkspace = true |
settings.gradle
Code Block | ||
---|---|---|
| ||
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() } dependencies { classpath "gradle.plugin.us.ihmc:ihmc-build:0.10.2" } } import us.ihmc.build.IHMCSettingsConfigurator /** Browse source at https://github.com/ihmcrobotics/ihmc-build */ def ihmcSettingsConfigurator = new IHMCSettingsConfigurator(settings, logger, ext) ihmcSettingsConfigurator.checkRequiredPropertiesAreSet() // Give friendly errors for unset properties ihmcSettingsConfigurator.configureProjectName(hyphenatedName) // rootProject.name = hyphenatedName ihmcSettingsConfigurator.configureExtraSourceSets(extraSourceSets) // Setup source sets to be multi-project subprojects if (Boolean.valueOf(includeBuildsFromWorkspace)) { ihmcSettingsConfigurator.findAndIncludeCompositeBuilds() // Search workspace and `includeBuild` matches } |
build.gradle
Code Block | ||
---|---|---|
| ||
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() } dependencies { classpath "gradle.plugin.us.ihmc:ihmc-build:0.10.2" } } apply plugin: "us.ihmc.ihmc-build" ihmc { group = "us.ihmc" version = "0.0.1" vcsUrl = "https://github.com/ihmcrobotics/test-project" openSource = true configureDependencyResolution() configurePublications() } mainDependencies { compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4' compile group: 'commons-io', name: 'commons-io', version: '2.4' compile group: 'us.ihmc', name: 'ihmc-commons', version: '0.11.2' } testDependencies { compile group: 'junit', name: 'junit', version: '4.11' compile group: 'us.ihmc', name: 'ihmc-continuous-integration-framework', version: '0.9.4' compile group: 'org.pitest', name: 'pitest-command-line', version: '1.1.9' compile group: 'us.ihmc', name: 'ihmc-commons-testing', version: '0.11.2' } |
Repository as a group of projects
root gradle.properties
Code Block | ||
---|---|---|
| ||
# This variable declares the root of a type 2 repository isProjectGroup = true hyphenatedName = repository-product-name pascalCasedName = RepositoryProductName extraSourceSets = [] publishMode = SNAPSHOT groupDependencyVersion = SNAPSHOT-LATEST depthFromWorkspaceDirectory = 1 excludeFromCompositeBuild = false includeBuildsFromWorkspace = true artifactoryUsername = unset_username artifactoryPassword = unset_password bintray_user = unset_user bintray_key = unset_key |
root product.properties
Code Block |
---|
group = us.ihmc version = 0.0.1 vcsUrl = https://github.com/your-org/your-repository-group # Setting this to false disables Apache 2.0 license, # declares "Proprietary" license in POMs, switches # stable publish target from Bintray to Artifactory # proprietary repository, and declares proprietary # repository for dependency resolution. openSource = true |
subproject gradle.properties
Code Block | ||
---|---|---|
| ||
hyphenatedName = your-project-hyphenated pascalCasedName = YourProjectPascalCased extraSourceSets = [] publishMode = SNAPSHOT groupDependencyVersion = SNAPSHOT-LATEST depthFromWorkspaceDirectory = 2 excludeFromCompositeBuild = false includeBuildsFromWorkspace = true |
root settings.gradle
Code Block | ||
---|---|---|
| ||
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() } dependencies { classpath "gradle.plugin.us.ihmc:ihmc-build:0.10.2" } } import us.ihmc.build.IHMCSettingsConfigurator def ihmcSettingsConfigurator = new IHMCSettingsConfigurator(settings, logger, ext) ihmcSettingsConfigurator.configureProjectName(hyphenatedName) // rootProject.name = hyphenatedName ihmcSettingsConfigurator.configureAsGroupOfProjects() // isProjectGroup = true if (Boolean.valueOf(includeBuildsFromWorkspace)) { ihmcSettingsConfigurator.findAndIncludeCompositeBuilds() // Search workspace and `includeBuild` matches } |
root build.gradle
Code Block | ||
---|---|---|
| ||
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() jcenter() } dependencies { classpath "gradle.plugin.us.ihmc:ihmc-build:0.10.2" } } apply plugin: "us.ihmc.ihmc-build" |
subproject build.gradle
Code Block | ||
---|---|---|
| ||
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() } dependencies { classpath "gradle.plugin.us.ihmc:ihmc-build:0.10.2" } } apply plugin: "us.ihmc.ihmc-build" ihmc { loadProductProperties("../product.properties") configureDependencyResolution() configurePublications() } testSuites { def prefix = "LIBS-IHMCOPENROBOTICSSOFTWARE" bambooPlanKeys = [prefix + "FAST", prefix + "INDEVELOPMENT", prefix + "UI", prefix + "FLAKY", prefix + "VIDEO"] disableBambooConfigurationCheck = true } mainDependencies { compile group: 'us.ihmc', name: 'euclid-core', version: '0.4.6' compile group: 'us.ihmc', name: 'ihmc-yovariables', version: '0.2.2' compile group: 'gov.nist.math', name: 'jama', version: '1.0.3' compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4' compile group: 'com.google.guava', name: 'guava', version: '18.0' compile group: 'us.ihmc', name: 'IHMCRealtime', version: '1.1.8' compile group: 'org.ejml', name: 'dense64', version: '0.30' compile group: 'org.ejml', name: 'core', version: '0.30' compile group: 'us.ihmc', name: 'IHMCNativeLibraryLoader', version: '1.0' compile group: 'net.java.dev.jna', name: 'jna', version: '4.1.0' compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3' compile group: 'us.ihmc', name: 'ihmc-commons', version: '0.11.2' compile group: "us.ihmc", name: "ihmc-robot-models", version: groupDependencyVersion compile group: "us.ihmc", name: "sensor-processing", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-communication", version: groupDependencyVersion compile group: "us.ihmc", name: "convex-optimization-adapter", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-robotics-toolkit", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-java-toolkit", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-java-extensions", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-humanoid-robotics", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-graphics-description", version: groupDependencyVersion } testDependencies { compile group: 'junit', name: 'junit', version: '4.11' compile group: 'us.ihmc', name: 'ihmc-continuous-integration-framework', version: '0.9.4' compile group: 'us.ihmc', name: 'ihmc-commons-testing', version: '0.11.2' compile group: "us.ihmc", name: "simulation-construction-set-test", version: groupDependencyVersion compile group: "us.ihmc", name: "simulation-construction-set-tools-test", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-robotics-toolkit-test", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-robotics-toolkit-test", version: groupDependencyVersion compile group: "us.ihmc", name: "ihmc-java-extensions-test", version: groupDependencyVersion compile group: "us.ihmc", name: "convex-optimization-adapter-test", version: groupDependencyVersion } visualizersDependencies { compile rootProject compile group: "us.ihmc", name: "simulation-construction-set", version: groupDependencyVersion } |
Groups of Repositories
Clone this repo and clone repositories you want to work on together inside of it. https://stash.ihmc.us/projects/ROB/repos/repository-group/browse