Skip to content

Commit 2725661

Browse files
committed
updated build instructions and added log creation
Signed-off-by: Peter Kirschner <peter@klib.io>
1 parent d1a3422 commit 2725661

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,49 @@ You should now have all the bndtools projects in your workspace, ready to begin
8787
## Build Environment
8888

8989
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`.
90+
- We require at least Java 17 locally installed in path.
91+
- We use Gradle and Maven to build and the repo includes `gradlew` and `mvnw` wrappers with the necessary versions.
92+
93+
- assembles and tests the Bnd Workspace projects
94+
```bash
95+
./gradlew build 2>&1 | tee "build_$(date +%Y%m%d_%H%M%S).log"
96+
```
97+
- alternative skip tests for faster local builds
98+
```bash
99+
./gradlew build -x test -x testOSGi 2>&1 | tee "build_skipTests_$(date +%Y%m%d_%H%M%S).log"
100+
```
101+
**MIND: Above step is pre-requisite for following build of Bnd Maven and Gradle plugin.**
102+
- assembles and tests the Bnd Gradle plugins
103+
```bash
104+
./gradlew :gradle-plugins:build 2>&1 | tee "build_gradle-plguns_$(date +%Y%m%d_%H%M%S).log"
105+
```
106+
- assembles and tests the Bnd Maven plugins
107+
```bash
108+
./mvnw install 2>&1 | tee "build_mvn_$(date +%Y%m%d_%H%M%S).log"
109+
```
110+
- assembles and publishes the Bnd Workspace projects into `dist/bundles`
111+
```bash
112+
./gradlew publish 2>&1 | tee "build_publish_$(date +%Y%m%d_%H%M%S).log"
113+
```
114+
- assembles and publishes the Bnd Gradle plugins into `dist/bundles`
115+
```bash
116+
./gradlew :gradle-plugins:publish 2>&1 | tee "build_gradle-plugins_publish_$(date +%Y%m%d_%H%M%S).log"
117+
```
118+
- assembles and publishes the Bnd Maven plugins into `dist/bundles`
119+
```bash
120+
./mvnw -Pdist deploy 2>&1 | tee "build_mvn_deploy_$(date +%Y%m%d_%H%M%S).log"
121+
```
99122

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

103-
`.cd /gradlew :build ; ./gradlew :gradle-plugins:build ; ./.github/scripts/rebuild-build.sh ; ./.github/scripts/rebuild-test.sh`
104-
126+
```
127+
./gradlew build \
128+
&& ./gradlew :gradle-plugins:build \
129+
&& ./.github/scripts/rebuild-build.sh \
130+
&& ./.github/scripts/rebuild-test.sh \
131+
2>&1 | tee "build_full_$(date +%Y%m%d_%H%M%S).log"
132+
```
105133

106134
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.
107135

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

0 commit comments

Comments
 (0)