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
+22
-18
No files matched your search
@@ -24,7 +24,7 @@ jobs:
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
+7
-4
@@ -7,8 +7,8 @@ ext {
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group 'imgui-java'
|
||||
version 'git describe --tags --always'.execute().text.trim().substring(1)
|
||||
group = 'imgui-java'
|
||||
version = 'git describe --tags --always'.execute().text.trim().substring(1)
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -21,16 +21,19 @@ allprojects {
|
||||
into 'META-INF'
|
||||
}
|
||||
|
||||
def jdkMetadata = tasks.withType(JavaCompile).find().javaCompiler.get().metadata
|
||||
def buildJdk = "${jdkMetadata.javaRuntimeVersion} (${jdkMetadata.vendor})".toString()
|
||||
|
||||
manifest {
|
||||
attributes (
|
||||
'Implementation-Title': project.name,
|
||||
'Implementation-Version': project.version,
|
||||
'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')})",
|
||||
'Build-Jdk': buildJdk,
|
||||
'Source-Compatibility': tasks.withType(JavaCompile).find().sourceCompatibility,
|
||||
'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();
|
||||
ImDrawList drawList = ImGui.getWindowDrawList();
|
||||
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,
|
||||
ImColor.intToColor(255, 255, 255, 255));
|
||||
ImColor.rgba(255, 255, 255, 255));
|
||||
|
||||
// This will catch our interactions
|
||||
ImGui.invisibleButton("canvas", canvasSize.x, canvasSize.y,
|
||||
@@ -112,27 +112,27 @@ public class ExampleCanvasEditor {
|
||||
float GRID_STEP = 64.0f;
|
||||
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,
|
||||
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) {
|
||||
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) {
|
||||
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,
|
||||
ImColor.intToColor(255, 255, 0, 255), thickness);
|
||||
ImColor.rgba(255, 255, 0, 255), thickness);
|
||||
}
|
||||
drawList.popClipRect();
|
||||
|
||||
// Menu properties
|
||||
if (ImGui.beginPopup("context")) {
|
||||
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);
|
||||
}
|
||||
if (ImGui.menuItem("Remove all", "", false, pointList.size() > 0)) {
|
||||
if (ImGui.menuItem("Remove all", "", false, !pointList.isEmpty())) {
|
||||
pointList.clear();
|
||||
}
|
||||
ImGui.endPopup();
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,8 +15,9 @@ java {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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-api:5.11.3")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.3")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
test {
|
||||
@@ -53,7 +54,7 @@ jar {
|
||||
processResources {
|
||||
filesMatching('**/imgui-java.properties') {
|
||||
filter(ReplaceTokens, tokens: [
|
||||
'version': project.version
|
||||
'version': version
|
||||
])
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user