66 no-build-cache :
77 type : boolean
88 required : false
9-
9+
1010env :
1111 EXPORTER_VERSION : 1.0.0-beta.28 # to be updated with the latest version
1212
@@ -22,10 +22,11 @@ jobs:
2222 distribution : temurin
2323 java-version : 17
2424
25+ - name : Setup Gradle
26+ uses : gradle/actions/setup-gradle@v4
27+
2528 - name : Spotless
26- uses : gradle/gradle-build-action@v3
27- with :
28- arguments : spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
29+ run : ./gradlew spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
2930
3031 gradle-wrapper-validation :
3132 runs-on : ubuntu-latest
@@ -52,12 +53,11 @@ jobs:
5253 mvn -version
5354 mvn install:install-file -Dfile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.jar" -DpomFile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.pom" -DgroupId="com.azure" -DartifactId="azure-monitor-opentelemetry-exporter" -Dversion="${{ env.EXPORTER_VERSION }}"
5455
56+ - name : Setup Gradle
57+ uses : gradle/actions/setup-gradle@v4
58+
5559 - name : Generate license report
56- uses : gradle/gradle-build-action@v3
57- with :
58- # ignore inputs.no-build-cache and always run with --no-build-cache
59- # see https://github.com/jk1/Gradle-License-Report/issues/231
60- arguments : generateLicenseReport --no-build-cache
60+ run : ./gradlew generateLicenseReport ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
6161
6262 - name : Check licenses
6363 run : |
@@ -98,11 +98,16 @@ jobs:
9898 mvn -version
9999 mvn install:install-file -Dfile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.jar" -DpomFile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.pom" -DgroupId="com.azure" -DartifactId="azure-monitor-opentelemetry-exporter" -Dversion="${{ env.EXPORTER_VERSION }}"
100100
101+ - name : Setup Gradle
102+ uses : gradle/actions/setup-gradle@v4
103+
101104 - name : Assemble
102- uses : gradle/gradle-build-action@v3
103- with :
104- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
105- arguments : assemble -Dai.etw.native.build=release -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
105+ # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
106+ run : >
107+ ./gradlew assemble
108+ "-Dai.etw.native.build=release"
109+ -x javadoc
110+ ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
106111
107112 - name : Upload snapshot
108113 uses : actions/upload-artifact@v4
@@ -154,17 +159,20 @@ jobs:
154159 mvn -version
155160 mvn install:install-file -Dfile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.jar" -DpomFile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.pom" -DgroupId="com.azure" -DartifactId="azure-monitor-opentelemetry-exporter" -Dversion="${{ env.EXPORTER_VERSION }}"
156161
162+ - name : Setup Gradle
163+ uses : gradle/actions/setup-gradle@v4
164+
157165 - name : Test
158- uses : gradle/gradle-build-action@v3
159- with :
160- # spotless is checked separately since it's a common source of failure
161- arguments : >
162- check
163- -x spotlessCheck
164- -PtestJavaVersion =${{ matrix.test-java-version }}
165- -PtestJavaVM =${{ matrix.vm }}
166- -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }}
167- -Porg.gradle.java.installations.auto-download=false ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
166+ # spotless is checked separately since it's a common source of failure
167+ run : >
168+ ./gradlew
169+ check
170+ -x spotlessCheck
171+ -PtestJavaVersion=${{ matrix.test-java-version }}
172+ -PtestJavaVM =${{ matrix.vm }}
173+ "-Porg.gradle.java.installations.paths =${{ steps.setup-test-java.outputs.path }}"
174+ " -Porg.gradle.java.installations.auto-download=false"
175+ ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
168176
169177 setup-smoke-test-matrix :
170178 runs-on : ubuntu-latest
@@ -201,7 +209,8 @@ jobs:
201209 mvn -version
202210 mvn install:install-file -Dfile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.jar" -DpomFile="azure-monitor-opentelemetry-exporter-${{ env.EXPORTER_VERSION }}.pom" -DgroupId="com.azure" -DartifactId="azure-monitor-opentelemetry-exporter" -Dversion="${{ env.EXPORTER_VERSION }}"
203211
212+ - name : Setup Gradle
213+ uses : gradle/actions/setup-gradle@v4
214+
204215 - name : Test
205- uses : gradle/gradle-build-action@v3
206- with :
207- arguments : ${{ matrix.module }}:smokeTest
216+ run : ./gradlew ${{ matrix.module }}:smokeTest
0 commit comments