chore(build): update to Gradle 8.12 and set CI to use JDK 17 (#308)
Upgraded the build system to Gradle 8.12 and updated the CI pipeline to use JDK 17 for improved compatibility and performance.
This commit is contained in:
1 parent
9a77b8d4a2
commit
7190b51a72
6 files changed
+21
-17
No files matched your search
@@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: 11
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: 11
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
@@ -158,7 +158,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: 11
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|||||||
+6
-3
@@ -7,8 +7,8 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group 'imgui-java'
|
group = 'imgui-java'
|
||||||
version 'git describe --tags --always'.execute().text.trim().substring(1)
|
version = 'git describe --tags --always'.execute().text.trim().substring(1)
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -21,13 +21,16 @@ allprojects {
|
|||||||
into 'META-INF'
|
into 'META-INF'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def jdkMetadata = tasks.withType(JavaCompile).find().javaCompiler.get().metadata
|
||||||
|
def buildJdk = "${jdkMetadata.javaRuntimeVersion} (${jdkMetadata.vendor})".toString()
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes (
|
attributes (
|
||||||
'Implementation-Title': project.name,
|
'Implementation-Title': project.name,
|
||||||
'Implementation-Version': project.version,
|
'Implementation-Version': project.version,
|
||||||
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(System.currentTimeMillis()),
|
'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-Revision': 'git rev-parse HEAD'.execute().text.trim(),
|
||||||
'Build-Jdk': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
|
'Build-Jdk': buildJdk,
|
||||||
'Source-Compatibility': tasks.withType(JavaCompile).find().sourceCompatibility,
|
'Source-Compatibility': tasks.withType(JavaCompile).find().sourceCompatibility,
|
||||||
'Target-Compatibility': tasks.withType(JavaCompile).find().targetCompatibility,
|
'Target-Compatibility': tasks.withType(JavaCompile).find().targetCompatibility,
|
||||||
'Created-By': "Gradle ${gradle.gradleVersion} "
|
'Created-By': "Gradle ${gradle.gradleVersion} "
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ public class ExampleCanvasEditor {
|
|||||||
ImGuiIO io = ImGui.getIO();
|
ImGuiIO io = ImGui.getIO();
|
||||||
ImDrawList drawList = ImGui.getWindowDrawList();
|
ImDrawList drawList = ImGui.getWindowDrawList();
|
||||||
drawList.addRectFilled(canvasP0.x, canvasP0.y, canvasP1.x, canvasP1.y,
|
drawList.addRectFilled(canvasP0.x, canvasP0.y, canvasP1.x, canvasP1.y,
|
||||||
ImColor.intToColor(50, 50, 50, 255));
|
ImColor.rgba(50, 50, 50, 255));
|
||||||
drawList.addRect(canvasP0.x, canvasP0.y, canvasP1.x, canvasP1.y,
|
drawList.addRect(canvasP0.x, canvasP0.y, canvasP1.x, canvasP1.y,
|
||||||
ImColor.intToColor(255, 255, 255, 255));
|
ImColor.rgba(255, 255, 255, 255));
|
||||||
|
|
||||||
// This will catch our interactions
|
// This will catch our interactions
|
||||||
ImGui.invisibleButton("canvas", canvasSize.x, canvasSize.y,
|
ImGui.invisibleButton("canvas", canvasSize.x, canvasSize.y,
|
||||||
@@ -112,27 +112,27 @@ public class ExampleCanvasEditor {
|
|||||||
float GRID_STEP = 64.0f;
|
float GRID_STEP = 64.0f;
|
||||||
for (float x = fmodf(scrolling.x, GRID_STEP); x < canvasSize.x; x += GRID_STEP) {
|
for (float x = fmodf(scrolling.x, GRID_STEP); x < canvasSize.x; x += GRID_STEP) {
|
||||||
drawList.addLine(canvasP0.x + x, canvasP0.y, canvasP0.x + x, canvasP1.y,
|
drawList.addLine(canvasP0.x + x, canvasP0.y, canvasP0.x + x, canvasP1.y,
|
||||||
ImColor.intToColor(200, 200, 200, 40));
|
ImColor.rgba(200, 200, 200, 40));
|
||||||
}
|
}
|
||||||
for (float y = fmodf(scrolling.y, GRID_STEP); y < canvasSize.y; y += GRID_STEP) {
|
for (float y = fmodf(scrolling.y, GRID_STEP); y < canvasSize.y; y += GRID_STEP) {
|
||||||
drawList.addLine(canvasP0.x, canvasP0.y + y, canvasP1.x, canvasP0.y + y,
|
drawList.addLine(canvasP0.x, canvasP0.y + y, canvasP1.x, canvasP0.y + y,
|
||||||
ImColor.intToColor(200, 200, 200, 40));
|
ImColor.rgba(200, 200, 200, 40));
|
||||||
}
|
}
|
||||||
for (int n = 0; n < pointList.size(); n += 2) {
|
for (int n = 0; n < pointList.size(); n += 2) {
|
||||||
drawList.addLine(origin.x + pointList.get(n).x, origin.y + pointList.get(n).y,
|
drawList.addLine(origin.x + pointList.get(n).x, origin.y + pointList.get(n).y,
|
||||||
origin.x + pointList.get(n + 1).x, origin.y + pointList.get(n + 1).y,
|
origin.x + pointList.get(n + 1).x, origin.y + pointList.get(n + 1).y,
|
||||||
ImColor.intToColor(255, 255, 0, 255), thickness);
|
ImColor.rgba(255, 255, 0, 255), thickness);
|
||||||
}
|
}
|
||||||
drawList.popClipRect();
|
drawList.popClipRect();
|
||||||
|
|
||||||
// Menu properties
|
// Menu properties
|
||||||
if (ImGui.beginPopup("context")) {
|
if (ImGui.beginPopup("context")) {
|
||||||
addingLine = false;
|
addingLine = false;
|
||||||
if (ImGui.menuItem("Remove one", "", false, pointList.size() > 0)) {
|
if (ImGui.menuItem("Remove one", "", false, !pointList.isEmpty())) {
|
||||||
pointList.remove(pointList.size() - 1);
|
pointList.remove(pointList.size() - 1);
|
||||||
pointList.remove(pointList.size() - 1);
|
pointList.remove(pointList.size() - 1);
|
||||||
}
|
}
|
||||||
if (ImGui.menuItem("Remove all", "", false, pointList.size() > 0)) {
|
if (ImGui.menuItem("Remove all", "", false, !pointList.isEmpty())) {
|
||||||
pointList.clear();
|
pointList.clear();
|
||||||
}
|
}
|
||||||
ImGui.endPopup();
|
ImGui.endPopup();
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.3'
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
|
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.3")
|
||||||
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@@ -53,7 +54,7 @@ jar {
|
|||||||
processResources {
|
processResources {
|
||||||
filesMatching('**/imgui-java.properties') {
|
filesMatching('**/imgui-java.properties') {
|
||||||
filter(ReplaceTokens, tokens: [
|
filter(ReplaceTokens, tokens: [
|
||||||
'version': project.version
|
'version': version
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user