|
2 | 2 |
|
3 | 3 | Want to hack on Bnd/Bndtools? Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete. |
4 | 4 |
|
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Reporting Issues](#reporting-issues) |
| 8 | +- [Development Setups](#development-setups) |
| 9 | +- [Launching Bndtools from Eclipse](#launching-bndtools-from-eclipse) |
| 10 | +- [Manually Building Bndtools](#manually-building-bndtools) |
| 11 | + - [Checking Out from GitHub](#checking-out-from-github) |
| 12 | + - [Building from the command-line](#building-from-the-command-line) |
| 13 | + - [Importing Into Eclipse](#importing-into-eclipse) |
| 14 | +- [Running single tests](#running-single-tests) |
| 15 | +- [Build Environment](#build-environment) |
| 16 | + - [Gradle Wrapper](#gradle-wrapper) |
| 17 | +- [Running JUnit Tests](#running-junit-tests) |
| 18 | +- [Workflow](#workflow) |
| 19 | + - [Setting up the triangular workflow](#setting-up-the-triangular-workflow) |
| 20 | +- [Contribution guidelines](#contribution-guidelines) |
| 21 | + - [Pull requests are always welcome](#pull-requests-are-always-welcome) |
| 22 | + - [Create issues](#create-issues) |
| 23 | + - [But check for existing issues first](#but-check-for-existing-issues-first) |
| 24 | + - [Conventions](#conventions) |
| 25 | + - [Large changes/Work-In-Progress](#large-changeswork-in-progress) |
| 26 | + - [Sign your work](#sign-your-work) |
| 27 | + - [Merge approval](#merge-approval) |
| 28 | + - [How can I become a maintainer](#how-can-i-become-a-maintainer) |
| 29 | + |
5 | 30 | ## Reporting Issues |
6 | 31 |
|
7 | 32 | When reporting [issues](https://github.com/bndtools/bnd/issues) on GitHub please include the version of Bnd/Bndtools you are using, `bnd version`, as well as the version of Java, `java -version`, and your OS. |
@@ -87,21 +112,49 @@ You should now have all the bndtools projects in your workspace, ready to begin |
87 | 112 | ## Build Environment |
88 | 113 |
|
89 | 114 | The only thing you need to build Bnd/Bndtools is Java. |
90 | | -- We require at least Java 17. |
91 | | -- We use Gradle and Maven to build and the repo includes `gradlew` and `mvnw` at the necessary versions. |
92 | | - |
93 | | -- `./gradlew :build` (or `./gradlew build -x test -x testOSGi` to skip tests for faster local builds) - Assembles and tests the Bnd Workspace projects. This must be run before building the Bnd Maven and Gradle plugins. |
94 | | -- `./gradlew :gradle-plugins:build` - Assembles and tests the Bnd Gradle plugins. |
95 | | -- `./mvnw install` - Assembles and tests the Bnd Maven plugins. |
96 | | -- `./gradlew :publish` - Assembles and publishes the Bnd Workspace projects into `dist/bundles`. |
97 | | -- `./gradlew :gradle-plugins:publish` - Assembles and publishes the Bnd Gradle plugins into `dist/bundles`. |
98 | | -- `./mvnw -Pdist deploy` - Assembles and publishes the Bnd Maven plugins into `dist/bundles`. |
| 115 | +- We require at least Java 17 locally installed in path. |
| 116 | +- We use Gradle and Maven to build and the repo includes `gradlew` and `mvnw` wrappers with the necessary versions. |
| 117 | + |
| 118 | +- assembles and tests the Bnd Workspace projects |
| 119 | + ```bash |
| 120 | + ./gradlew build 2>&1 | tee "build_$(date +%Y%m%d_%H%M%S).log" |
| 121 | + ``` |
| 122 | +- alternative skip tests for faster local builds |
| 123 | + ```bash |
| 124 | + ./gradlew build -x test -x testOSGi 2>&1 | tee "build_skipTests_$(date +%Y%m%d_%H%M%S).log" |
| 125 | + ``` |
| 126 | +**MIND: Above step is pre-requisite for following build of Bnd Maven and Gradle plugin.** |
| 127 | +- assembles and tests the Bnd Gradle plugins |
| 128 | + ```bash |
| 129 | + ./gradlew :gradle-plugins:build 2>&1 | tee "build_gradle-plguns_$(date +%Y%m%d_%H%M%S).log" |
| 130 | + ``` |
| 131 | +- assembles and tests the Bnd Maven plugins |
| 132 | + ```bash |
| 133 | + ./mvnw install 2>&1 | tee "build_mvn_$(date +%Y%m%d_%H%M%S).log" |
| 134 | + ``` |
| 135 | +- assembles and publishes the Bnd Workspace projects into `dist/bundles` |
| 136 | + ```bash |
| 137 | + ./gradlew publish 2>&1 | tee "build_publish_$(date +%Y%m%d_%H%M%S).log" |
| 138 | + ``` |
| 139 | +- assembles and publishes the Bnd Gradle plugins into `dist/bundles` |
| 140 | + ```bash |
| 141 | + ./gradlew :gradle-plugins:publish 2>&1 | tee "build_gradle-plugins_publish_$(date +%Y%m%d_%H%M%S).log" |
| 142 | + ``` |
| 143 | +- assembles and publishes the Bnd Maven plugins into `dist/bundles` |
| 144 | + ```bash |
| 145 | + ./mvnw -Pdist deploy 2>&1 | tee "build_mvn_deploy_$(date +%Y%m%d_%H%M%S).log" |
| 146 | + ``` |
99 | 147 |
|
100 | 148 | Rebuilding: bnd is built with bnd. For that reason we rebuild and retest bnd with the build we just built. |
101 | 149 | To do a full build-rebuild cycle (like the github build), you can use the following command: |
102 | 150 |
|
103 | | -`.cd /gradlew :build ; ./gradlew :gradle-plugins:build ; ./.github/scripts/rebuild-build.sh ; ./.github/scripts/rebuild-test.sh` |
104 | | - |
| 151 | +``` |
| 152 | +./gradlew build \ |
| 153 | + && ./gradlew :gradle-plugins:build \ |
| 154 | + && ./.github/scripts/rebuild-build.sh \ |
| 155 | + && ./.github/scripts/rebuild-test.sh \ |
| 156 | + 2>&1 | tee "build_full_$(date +%Y%m%d_%H%M%S).log" |
| 157 | +``` |
105 | 158 |
|
106 | 159 | We use [GitHub Actions](https://github.com/bndtools/bnd/actions?query=workflow%3A%22CI%20Build%22) for continuous integration and the repo includes a `.github/workflows/cibuild.yml` file to build via GitHub Actions. |
107 | 160 |
|
@@ -305,4 +358,3 @@ If your pull request was originally a work-in-progress, don't forget to remove W |
305 | 358 | Don't forget: being a maintainer is a time investment. |
306 | 359 | Make sure you will have time to make yourself available. |
307 | 360 | You don't have to be a maintainer to make a difference on the project! |
308 | | - |
|
0 commit comments