Skip to content

Commit c3b2c6b

Browse files
authored
Merge branch 'processing:main' into develop-menu
2 parents d3f3611 + 354e560 commit c3b2c6b

File tree

7 files changed

+73
-12
lines changed

7 files changed

+73
-12
lines changed

build.gradle.kts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,27 @@ plugins {
44

55
alias(libs.plugins.compose.compiler) apply false
66
alias(libs.plugins.jetbrainsCompose) apply false
7+
8+
alias(libs.plugins.versions)
79
}
810

911
// Set the build directory to not /build to prevent accidental deletion through the clean action
1012
// Can be deleted after the migration to Gradle is complete
11-
layout.buildDirectory = file(".build")
13+
layout.buildDirectory = file(".build")
14+
15+
// Configure the dependencyUpdates task
16+
tasks {
17+
dependencyUpdates {
18+
gradleReleaseChannel = "current"
19+
20+
val nonStableKeywords = listOf("alpha", "beta", "rc")
21+
22+
fun isNonStable(version: String) = nonStableKeywords.any {
23+
version.lowercase().contains(it)
24+
}
25+
26+
rejectVersionIf {
27+
isNonStable(candidate.version) && !isNonStable(currentVersion)
28+
}
29+
}
30+
}

core/src/processing/core/PApplet.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ public PSurface getSurface() {
802802
// Unlike the others above, needs to be public to support
803803
// the pixelWidth and pixelHeight fields.
804804
public int pixelDensity = 1;
805+
boolean pixelDensityWarning = false;
805806

806807
boolean present;
807808

@@ -1082,6 +1083,9 @@ public int displayDensity(int display) {
10821083
*/
10831084
public void pixelDensity(int density) {
10841085
//println(density + " " + this.pixelDensity);
1086+
1087+
1088+
this.pixelDensityWarning = false;
10851089
if (density != this.pixelDensity) {
10861090
if (insideSettings("pixelDensity", density)) {
10871091
if (density != 1 && density != 2) {
@@ -2050,6 +2054,10 @@ public void handleDraw() {
20502054
if (frameCount == 0) {
20512055
setup();
20522056

2057+
if(pixelDensityWarning){
2058+
System.err.println("Warning: Processing now sets pixelDensity(2) by default on high-density screens. This may change how your sketch looks. To revert to the old behavior, set pixelDensity(1) in setup().");
2059+
}
2060+
20532061
} else { // frameCount > 0, meaning an actual draw()
20542062
// update the current frameRate
20552063

@@ -10106,6 +10114,7 @@ static public void runSketch(final String[] args,
1010610114
sketch.fullScreen = fullScreen;
1010710115

1010810116
sketch.pixelDensity = sketch.displayDensity();
10117+
sketch.pixelDensityWarning = sketch.pixelDensity > 1;
1010910118

1011010119
// For 3.0.1, moved this above handleSettings() so that loadImage() can be
1011110120
// used inside settings(). Sets a terrible precedent, but the alternative

gradle/libs.versions.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "
4343
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
4444
download = { id = "de.undercouch.download", version = "5.6.0" }
4545
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
46-
gradlePublish = { id = "com.gradle.plugin-publish", version = "1.2.1" }
46+
versions = { id = "com.github.ben-manes.versions", version = "0.52.0" }
47+
gradlePublish = { id = "com.gradle.plugin-publish", version = "1.2.1" }

java/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ legacyLibraries.forEach { library ->
8787
}
8888
}
8989

90-
val libraries = arrayOf("pdf")
90+
val libraries = arrayOf("dxf", "pdf")
91+
9192
libraries.forEach { library ->
9293
val name = "create-$library-library"
9394
tasks.register<Copy>(name) {
Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
ant.importBuild("build.xml")
1+
plugins{
2+
java
3+
}
4+
5+
sourceSets {
6+
main {
7+
java {
8+
srcDirs("src")
9+
}
10+
}
11+
}
12+
repositories{
13+
mavenCentral()
14+
maven("https://jogamp.org/deployment/maven/")
15+
}
16+
17+
dependencies{
18+
compileOnly(project(":core"))
19+
20+
implementation("com.lowagie:itext:2.1.7")
21+
}
22+
23+
tasks.register<Copy>("createLibrary"){
24+
dependsOn("jar")
25+
into(layout.buildDirectory.dir("library"))
26+
27+
from(layout.projectDirectory){
28+
include ("library.properties")
29+
include("examples/**")
30+
}
31+
32+
from(configurations.runtimeClasspath){
33+
into("library")
34+
}
35+
36+
from(tasks.jar) {
37+
into("library")
38+
}
39+
}

java/test/processing/mode/java/ParserTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public void bug1525() {
280280

281281
@Test
282282
public void bug1532() {
283-
expectRecognitionException("bug1532", 50);
283+
expectRecognitionException("bug1532", 43);
284284
}
285285

286286
@Test

java/test/resources/bug1532.pde

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ Capture cam;
1919
flatCube[][] grid;
2020

2121
void setup() {
22-
try {
23-
quicktime.QTSession.open();
24-
}
25-
catch (quicktime.QTException qte) {
26-
qte.printStackTrace();
27-
}
28-
2922
size (dx,dy,OPENGL);
3023
int d=day();
3124
int m=month();

0 commit comments

Comments
 (0)