Skip to content

Commit da29242

Browse files
committed
Move contribution url into centralised place
Using the work by @mingness to simplify the contributions workflow. Disabled the post request because that data is not saved anywhere and most hosts do not support it
1 parent 2fc0d69 commit da29242

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ group = rootProject.group
1717
tasks.withType<JavaExec> {
1818
systemProperty("processing.version", version)
1919
systemProperty("processing.revision", "1296")
20+
systemProperty("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt")
2021
}
2122

2223

app/src/processing/app/contrib/ContributionListing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class ContributionListing {
4444
* Stable URL that will redirect to wherever the file is hosted.
4545
* Changed to use https in 4.0 beta 8 (returns same data).
4646
*/
47-
static final String LISTING_URL = "https://download.processing.org/contribs";
47+
static final String LISTING_URL = System.getProperty("processing.contributions.source","https://download.processing.org/contribs");
4848
static final String LOCAL_FILENAME = "contribs.txt";
4949

5050
/** Location of the listing file on disk, will be read and written. */

app/src/processing/app/contrib/ContributionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ static boolean download(URL source, byte[] post,
6767
conn.setConnectTimeout(15 * 1000);
6868
conn.setReadTimeout(60 * 1000);
6969

70-
if (post == null) {
70+
// Disable the post for now, since it's not used
71+
if (post == null || System.getProperty("processing.contributions.source") != null) {
7172
conn.setRequestMethod("GET");
7273
conn.connect();
73-
7474
} else {
7575
post = Util.gzipEncode(post);
7676
conn.setRequestMethod("POST");

0 commit comments

Comments
 (0)