Skip to content

Convert Gradle example projects to DGPv2, and test them #67

Convert Gradle example projects to DGPv2, and test them

Convert Gradle example projects to DGPv2, and test them #67

Workflow file for this run

name: Build examples
on:
pull_request:
paths:
- 'examples/**'
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
projects: [
examples/gradle/dokka-gradle-example,
examples/gradle/dokka-kotlinAsJava-example,
examples/gradle/dokka-library-publishing-example,
examples/gradle/dokka-multimodule-example,
examples/gradle/dokka-multiplatform-example,
examples/gradle/dokka-customFormat-example
examples/plugin/hide-internal-api
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.projects }}/**'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- run: ./gradlew build --no-daemon --stacktrace
working-directory: ${{ matrix.projects }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-html:
strategy:
matrix:
projects: [
examples/gradle/dokka-gradle-example,
examples/gradle/dokka-kotlinAsJava-example,
examples/gradle/dokka-library-publishing-example,
examples/gradle/dokka-multiplatform-example,
examples/gradle/dokka-customFormat-example
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.projects }}/**'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- run: ./gradlew dokkaHtml --no-daemon --stacktrace
working-directory: ${{ matrix.projects }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-publishing:
strategy:
matrix:
tasks: [ dokkaJavadocJar, dokkaHtmlJar ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
examples_changed:
- 'examples/gradle/dokka-library-publishing-example/**'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- run: ./gradlew ${{ matrix.tasks }} --no-daemon --stacktrace
working-directory: examples/gradle/dokka-library-publishing-example
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-gradle-tasks:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- task: "dokkaHtmlMultiModule"
dir: "examples/gradle/dokka-multimodule-example"
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.dir }}/**'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- run: ./gradlew ${{ matrix.task }} --no-daemon --stacktrace
working-directory: ${{ matrix.dir }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-maven-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
examples_changed:
- 'examples/maven/**'
working-directory: examples/maven
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- run: mvn compile dokka:dokka
working-directory: examples/maven
if: steps.filter.outputs.examples_changed == 'true'