Skip to content

Commit 440d049

Browse files
Optimize setup-workspace.sh and trigger CI on changes
1. Optimize `scripts/setup-workspace.sh` build time by enabling parallel builds (`-T 1C`) and skipping unnecessary Javadoc/Source generation. 2. Fix "Result: 128" git errors by explicitly disabling the `download-cn1-binaries` profile (`-P !download-cn1-binaries`). 3. Fix "Stubber.jar not found" build failure by explicitly passing `-Dcn1.binaries="$CN1_BINARIES"` to Maven commands, ensuring the external binaries are located. 4. Update `.github/workflows/pr.yml` to trigger the PR CI workflow when `scripts/setup-workspace.sh` is modified, enabling validation of these changes.
1 parent e8df7fb commit 440d049

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/setup-workspace.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,14 @@ log "Building Codename One Maven plugin"
233233
-pl codenameone-maven-plugin -am \
234234
-T 1C -Dmaven.javadoc.skip=true -Dmaven.source.skip=true \
235235
-DskipTests -Djava.awt.headless=true \
236+
-Dcn1.binaries="$CN1_BINARIES" \
236237
-P !download-cn1-binaries \
237238
install "$@"
238239

239240
BUILD_CLIENT="$HOME/.codenameone/CodeNameOneBuildClient.jar"
240241
log "Ensuring CodeNameOneBuildClient.jar is installed"
241242
if [ ! -f "$BUILD_CLIENT" ]; then
242-
if ! "$MAVEN_HOME/bin/mvn" -f maven/pom.xml -P !download-cn1-binaries cn1:install-codenameone "$@"; then
243+
if ! "$MAVEN_HOME/bin/mvn" -f maven/pom.xml -Dcn1.binaries="$CN1_BINARIES" -P !download-cn1-binaries cn1:install-codenameone "$@"; then
243244
log "Falling back to copying CodeNameOneBuildClient.jar"
244245
mkdir -p "$(dirname "$BUILD_CLIENT")"
245246
cp maven/CodeNameOneBuildClient.jar "$BUILD_CLIENT" || true

0 commit comments

Comments
 (0)