Skip to content

Commit 8a131c4

Browse files
authored
Enhance CONTRIBUTING.md with toc and update build steps
Added TOC for navigation updated build instructions and added log creation Signed-off-by: Peter Kirschner <peter@klib.io>
1 parent 898d071 commit 8a131c4

File tree

1 file changed

+64
-12
lines changed

1 file changed

+64
-12
lines changed

CONTRIBUTING.md

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
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.
44

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+
530
## Reporting Issues
631

732
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
87112
## Build Environment
88113

89114
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+
```
99147

100148
Rebuilding: bnd is built with bnd. For that reason we rebuild and retest bnd with the build we just built.
101149
To do a full build-rebuild cycle (like the github build), you can use the following command:
102150

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+
```
105158

106159
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.
107160

@@ -305,4 +358,3 @@ If your pull request was originally a work-in-progress, don't forget to remove W
305358
Don't forget: being a maintainer is a time investment.
306359
Make sure you will have time to make yourself available.
307360
You don't have to be a maintainer to make a difference on the project!
308-

0 commit comments

Comments
 (0)