name: Gradle Fullbuild

on:
  push:
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 8
      uses: actions/setup-java@v2
      with:
        java-version: '8'
        distribution: 'adopt'
        
    - name: Install D-BUS AT-SPI core
      run: sudo apt-get -y install at-spi2-core
      
    - name: Check Java Directory
      run: echo $JAVA_HOME

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    
    - name: Build with Gradle
      run: ./gradlew fullbuild --warning-mode all
    
    - name: Maven repo and sonar cache
      uses: actions/cache@v2
      with:
        path: |
          ~/.m2/repository'
          ~/.sonar/cache'
        key: ${{ runner.os }}-mvn_sonar_cache

    - name: Gradle cache
      uses: actions/cache@v2
      with:
        path: |
          ~/.gradle/caches/'
          ~/.gradle/wrapper/'
        key: ${{ runner.os }}-gradle_cache
        

Set up GitHub action for Gradle build
Set up GitHub action for Gradle build