File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,15 @@ if [ -n "$COVERAGE_EXEC" ] && [ -f "$COVERAGE_EXEC" ]; then
408408 COVERAGE_XML=" $COVERAGE_SITE_DIR /jacoco.xml"
409409 JACOCO_LOG=" $COVERAGE_ARTIFACT_DIR /jacoco-report.log"
410410 ra_log " Generating JaCoCo report for Android port sources"
411- if " $JAVA17_BIN " -jar " $JACOCO_CLI_JAR " report " $COVERAGE_EXEC " \
411+ JACOCO_CMD=(" $JAVA17_BIN " )
412+ JACOCO_MAIN_CLASS=" org.jacoco.cli.internal.Main"
413+ if unzip -p " $JACOCO_CLI_JAR " META-INF/MANIFEST.MF 2> /dev/null | grep -qi ' Main-Class:' ; then
414+ JACOCO_CMD+=(" -jar" " $JACOCO_CLI_JAR " )
415+ else
416+ ra_log " WARN: JaCoCo CLI jar missing Main-Class manifest; using explicit entry point"
417+ JACOCO_CMD+=(" -cp" " $JACOCO_CLI_JAR " " $JACOCO_MAIN_CLASS " )
418+ fi
419+ if " ${JACOCO_CMD[@]} " report " $COVERAGE_EXEC " \
412420 --name " CodenameOneAndroidPort" \
413421 " ${CLASSFILE_ARGS[@]} " \
414422 --sourcefiles " $REPO_ROOT /Ports/Android/src" \
You can’t perform that action at this time.
0 commit comments