Skip to content

Commit

Permalink
For #607. Upload Javadoc for Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
binkley committed Aug 8, 2024
1 parent 5758cca commit 067f176
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,38 @@ run-with-gradle:
COPY run-with-gradle.sh .
RUN ./run-with-gradle.sh

# For CI so that GitHub can copy artifacts
# Javadocs and jars
SAVE ARTIFACT --keep-ts build/libs/modern-java-practices-0-javadoc.jar
SAVE ARTIFACT --keep-ts build/docs/javadoc/ AS LOCAL build/docs/javadoc/

# Test coverage and badge for Gradle:
# You need to PICK ONE from Gradle or Maven for your build.
# This project uses Maven (see below) to create the code coverage badge.
# Commented is the minimum needed from the containerized build when using
# Gradle.
# After this enabling this, you still need to update the GitHub action steps
# to generate the badge using a custom path to the CVS report.
# SAVE ARTIFACT --save-ts build/reports/jacoco/test/jacocoTestReport.csv AS LOCAL build/reports/jacoco/test/jacocoTestReport.csv

build-with-maven:
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY config config
COPY src src
RUN --secret OWASP_NVD_API_KEY ./mvnw --no-transfer-progress clean verify

# For CI so that GitHub can copy artifacts
# Javadocs and jars
SAVE ARTIFACT --keep-ts target/apidocs/ AS LOCAL target/apidocs/
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-javadoc.jar
SAVE ARTIFACT --keep-ts target/testapidocs/ AS LOCAL target/testapidocs/
SAVE ARTIFACT --keep-ts target/apidocs/ AS LOCAL target/apidocs/
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar
SAVE ARTIFACT --keep-ts target/testapidocs/ AS LOCAL target/testapidocs/

# Test coverage and badge
# Note that ONLY the Maven containerized build updates the README frontpage
# badge for coverage. This is to avoid multiple updating.
SAVE ARTIFACT --keep-ts target/site/jacoco/jacoco.csv AS LOCAL target/site/jacoco/jacoco.csv

run-with-maven:
Expand Down

0 comments on commit 067f176

Please sign in to comment.