Skip to content

Commit 067f176

Browse files
committed
For #607. Upload Javadoc for Gradle
1 parent 5758cca commit 067f176

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Earthfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,38 @@ run-with-gradle:
1717
COPY run-with-gradle.sh .
1818
RUN ./run-with-gradle.sh
1919

20+
# For CI so that GitHub can copy artifacts
21+
# Javadocs and jars
22+
SAVE ARTIFACT --keep-ts build/libs/modern-java-practices-0-javadoc.jar
23+
SAVE ARTIFACT --keep-ts build/docs/javadoc/ AS LOCAL build/docs/javadoc/
24+
25+
# Test coverage and badge for Gradle:
26+
# You need to PICK ONE from Gradle or Maven for your build.
27+
# This project uses Maven (see below) to create the code coverage badge.
28+
# Commented is the minimum needed from the containerized build when using
29+
# Gradle.
30+
# After this enabling this, you still need to update the GitHub action steps
31+
# to generate the badge using a custom path to the CVS report.
32+
# SAVE ARTIFACT --save-ts build/reports/jacoco/test/jacocoTestReport.csv AS LOCAL build/reports/jacoco/test/jacocoTestReport.csv
33+
2034
build-with-maven:
2135
COPY mvnw .
2236
COPY .mvn .mvn
2337
COPY pom.xml .
2438
COPY config config
2539
COPY src src
2640
RUN --secret OWASP_NVD_API_KEY ./mvnw --no-transfer-progress clean verify
41+
2742
# For CI so that GitHub can copy artifacts
2843
# Javadocs and jars
29-
SAVE ARTIFACT --keep-ts target/apidocs/ AS LOCAL target/apidocs/
3044
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-javadoc.jar
31-
SAVE ARTIFACT --keep-ts target/testapidocs/ AS LOCAL target/testapidocs/
45+
SAVE ARTIFACT --keep-ts target/apidocs/ AS LOCAL target/apidocs/
3246
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar
47+
SAVE ARTIFACT --keep-ts target/testapidocs/ AS LOCAL target/testapidocs/
48+
3349
# Test coverage and badge
50+
# Note that ONLY the Maven containerized build updates the README frontpage
51+
# badge for coverage. This is to avoid multiple updating.
3452
SAVE ARTIFACT --keep-ts target/site/jacoco/jacoco.csv AS LOCAL target/site/jacoco/jacoco.csv
3553

3654
run-with-maven:

0 commit comments

Comments
 (0)