|
| 1 | +# Gradle |
| 2 | +# Build your Java project and run tests with Gradle using a Gradle wrapper script. |
| 3 | +# Add steps that analyze code, save build artifacts, deploy, and more: |
| 4 | +# https://docs.microsoft.com/azure/devops/pipelines/languages/java |
| 5 | + |
| 6 | +trigger: |
| 7 | +- outsystems |
| 8 | + |
| 9 | +pool: |
| 10 | + vmImage: ubuntu-latest |
| 11 | + |
| 12 | +steps: |
| 13 | + |
| 14 | +- task: Gradle@2 |
| 15 | + displayName: Build Project |
| 16 | + inputs: |
| 17 | + workingDirectory: './OneSignalSDK' |
| 18 | + gradleWrapperFile: './OneSignalSDK/gradlew' |
| 19 | + gradleOptions: '-Xmx4096M' |
| 20 | + javaHomeOption: 'JDKVersion' |
| 21 | + jdkVersionOption: '1.8' |
| 22 | + jdkArchitectureOption: 'x64' |
| 23 | + publishJUnitResults: false |
| 24 | + testResultsFiles: '**/TEST-*.xml' |
| 25 | + tasks: 'clean build -x :unittest:check' |
| 26 | +- task: CmdLine@2 |
| 27 | + displayName: Validate pom.xml |
| 28 | + inputs: |
| 29 | + script: | |
| 30 | + /usr/bin/mvn -version |
| 31 | + /usr/bin/mvn -f /home/vsts/work/1/s/pom.xml help:effective-pom |
| 32 | +- task: MavenAuthenticate@0 |
| 33 | + displayName: Authenticate in public repo |
| 34 | + condition: eq(variables['Build.SourceBranch'], 'refs/heads/outsystems') |
| 35 | + inputs: |
| 36 | + artifactsFeeds: 'PublicArtifactRepository' |
| 37 | +- task: Bash@3 |
| 38 | + displayName: Deploy file |
| 39 | + condition: eq(variables['Build.SourceBranch'], 'refs/heads/outsystems') |
| 40 | + inputs: |
| 41 | + targetType: 'inline' |
| 42 | + script: | |
| 43 | + /usr/bin/mvn deploy:deploy-file \ |
| 44 | + -DpomFile=/home/vsts/work/1/s/pom.xml \ |
| 45 | + -DgeneratePom=true \ |
| 46 | + -Dfile=./OneSignalSDK/onesignal/build/outputs/aar/onesignal-release.aar \ |
| 47 | + -Dpackaging=aar \ |
| 48 | + -DrepositoryId=PublicArtifactRepository \ |
| 49 | + -Durl=https://pkgs.dev.azure.com/OutSystemsRD/9e79bc5b-69b2-4476-9ca5-d67594972a52/_packaging/PublicArtifactRepository/maven/v1 |
0 commit comments