Skip to content

Commit

Permalink
Merge branch 'java-8'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build.yml
#	build.gradle
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
#	gradlew
#	gradlew.bat
  • Loading branch information
axmetishe committed Feb 11, 2024
2 parents 68929f0 + 80dc6f6 commit 97d9e8f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
name: Gradle QT Application Example
name: 'Build'

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build-project:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:

env:
SELECTED_JAVA_VERSION: ${{ endsWith(github.ref, '8') && '8' || endsWith(github.ref, '11') && '11' || endsWith(github.ref, '17') && '17' || '21' }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Java 20
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '20'
java-version: ${{ env.SELECTED_JAVA_VERSION }}

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-disabled: false
cache-read-only: false
cache-write-only: false
cache-overwrite-existing: true

- name: Setup Qt
- name: Setup QT
uses: jurplel/install-qt-action@v3
with:
cache: true
Expand All @@ -39,7 +48,7 @@ jobs:
string: ${{ runner.os }}

- name: Run build with Gradle Wrapper
run: ./gradlew build
run: ./gradlew build --no-daemon

- name: Test application
uses: coactions/setup-xvfb@v1
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
This example based on [QT Application Example](https://doc.qt.io/qt-5/qtwidgets-mainwindows-application-example.html),
with [QT Application Example Sources](https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/mainwindows/application?h=5.15)

## Tested configurations
| Plugin Version | JVM | Gradle | Build Status |
|:--------------:|:---:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 1.1.x | 8 | 6.9.3 | [![Build Status](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml/badge.svg?branch=java-8)](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml?branch=java-8) |
| 1.2.x | 11 | 7.6.4 | [![Build Status](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml/badge.svg?branch=java-11)](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml?branch=java-11) |
| 1.3.x | 17 | 8.6 | [![Build Status](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml/badge.svg?branch=java-17)](https://github.com/axmetishe/gradle-qt-application-example/actions/workflows/build.yml?branch=java-17) |

Base sources use qmake while this example repository contains configuration for [Gradle Build Tool](https://gradle.org/)
using [Gradle QT Plugin](https://github.com/axmetishe/gradle-qt-plugin)
and [Gradle C++ Application plugin](https://docs.gradle.org/current/userguide/cpp_application_plugin.html)
Expand Down

0 comments on commit 97d9e8f

Please sign in to comment.