From e0a27160aee74e4155de41e861acba9fadaa2db2 Mon Sep 17 00:00:00 2001 From: SpaiR Date: Thu, 8 Aug 2024 09:09:41 +0300 Subject: [PATCH] build(ci): adapt build pipeline for the generator API build(ci): make "Compare Binding Hash" job also took into account generated and include folders build(ci): add JDK 11 to the setup-java pipeline This is required for the buildSrc module, since it uses "spoon" library, which is compiled for JDK11. build(ci): keep only JDK11 - Add source ant target compatibility output to the MANIFEST.mf file build: add auto-provisioning for JDK just in case --- .github/workflows/ci.yml | 8 +++++--- build.gradle | 2 ++ settings.gradle | 6 ------ settings.gradle.kts | 10 ++++++++++ 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8cf0b10..e93c473a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - java-version: 8 distribution: liberica + java-version: 11 cache: gradle - name: Build @@ -68,8 +68,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - java-version: 8 distribution: liberica + java-version: 11 cache: gradle - name: Install Dependencies (for Windows build) @@ -124,6 +124,8 @@ jobs: touch bin/binding.sha1 cat bin/binding.sha1 > /tmp/hash find imgui-binding/src/main -type f -print0 | sort -z | xargs -0 sha1sum > bin/binding.sha1 + find imgui-binding/src/generated -type f -print0 | sort -z | xargs -0 sha1sum >> bin/binding.sha1 + find include -type f -print0 | sort -z | xargs -0 sha1sum >> bin/binding.sha1 cmp /tmp/hash bin/binding.sha1 - name: Update @@ -151,8 +153,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - java-version: 8 distribution: liberica + java-version: 11 cache: gradle - name: Download Artifacts diff --git a/build.gradle b/build.gradle index 15589b5d..421e1d31 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,8 @@ allprojects { 'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(System.currentTimeMillis()), 'Build-Revision': 'git rev-parse HEAD'.execute().text.trim(), 'Build-Jdk': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})", + 'Source-Compatibility': tasks.withType(JavaCompile).find().sourceCompatibility, + 'Target-Compatibility': tasks.withType(JavaCompile).find().targetCompatibility, 'Created-By': "Gradle ${gradle.gradleVersion}" ) } diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 6640a256..00000000 --- a/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -rootProject.name = 'imgui-java' -include 'imgui-binding' -include 'imgui-lwjgl3' -include 'imgui-binding-natives' -include 'imgui-app' -include 'example' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..24d64bf4 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0") +} + +rootProject.name = "imgui-java" +include("imgui-binding") +include("imgui-lwjgl3") +include("imgui-binding-natives") +include("imgui-app") +include("example")