Skip to content

Commit

Permalink
Merge branch 'BRANCH_3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarashev committed Dec 3, 2024
2 parents 279e515 + 35547f1 commit 37a3d59
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches: ['master', 'BRANCH*']
paths: ['ganttproject-builder/BUILD-HISTORY-MAJOR']
env:
BUILD_NUMBER: 3312
VERSION: 3.3.3312
BUILD_NUMBER: 3313
VERSION: 3.3.3313
WINDOWS_APP_FOLDER_NAME: GanttProject-3.3
MAC_APP_NAME: GanttProject 3.3
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 17.0.12
java-version: 17.0.13
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 17.0.12
java-version: 17.0.13
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 17.0.12
java-version: 17.0.13
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 17.0.12
java-version: 17.0.13
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ allprojects {

subprojects {
group 'biz.ganttproject'
version = new Date().format("yy.MM.dd") + "-SNAPSHOT"
version = "3.3.3312"
}


Expand Down
5 changes: 5 additions & 0 deletions ganttproject-builder/BUILD-HISTORY-MAJOR
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2024-05-28 3309
2024-05-28 3309 again, now with macOS Intel in the workflow
2024-09-30 3312 Package deps for Ubuntu and new public key for updates
2024-09-30 3312 again, with update JRE and hopefully with notarized macOS Silicon
2024-09-30 3312 again, maybe now we will build pretty signed notarized packages
2024-11-29 3313 update launchers in ZIP and dependencies in deb package with the latest Java runtimes
2024-11-29 3313 again, now with the right build number
--
4 changes: 3 additions & 1 deletion ganttproject-builder/BUILD-HISTORY-MINOR
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
2024-04-17 3306 ganttproject,biz.ganttproject.app.localization
2024-04-18 3307 ganttproject,biz.ganttproject.app.localization
2024-05-25 3308 ganttproject,biz.ganttproject.app.localization,biz.ganttproject.core,org.ganttproject.impex.htmlpdf
2024-05-27 3309 ganttproject,biz.ganttproject.app.localization,biz.ganttproject.core,org.ganttproject.impex.htmlpdf
2024-05-27 3309 ganttproject,biz.ganttproject.app.localization,biz.ganttproject.core,org.ganttproject.impex.htmlpdf
2024-09-20 3310 ganttproject,biz.ganttproject.app.localization,biz.ganttproject.core
2024-09-21 3311 ganttproject,biz.ganttproject.app.localization,biz.ganttproject.core,org.ganttproject.impex.htmlpdf
2 changes: 1 addition & 1 deletion ganttproject-builder/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
homepage="https://www.ganttproject.biz/"
section="editors"
priority="optional"
depends="java17-runtime | bellsoft-java17-runtime | zulu17-jre | openjdk-17-jre"
depends="java17-runtime | bellsoft-java17-runtime | zulu17-jre | openjdk-17-jre | openjdk-21-jre | bellsoft-java21-runtime | zulu21-jre"
conflicts="ganttproject-praha"
replaces="ganttproject-praha"
postrm="${distDebWork}/postrm"
Expand Down
4 changes: 4 additions & 0 deletions ganttproject-builder/ganttproject
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ check_java() {
[[ "$VERSION" =~ 17\.? ]] && return 0;
[[ "$VERSION" =~ 18\.? ]] && return 0;
[[ "$VERSION" =~ 19\.? ]] && return 0;
[[ "$VERSION" =~ 20\.? ]] && return 0;
[[ "$VERSION" =~ 21\.? ]] && return 0;
[[ "$VERSION" =~ 22\.? ]] && return 0;
[[ "$VERSION" =~ 23\.? ]] && return 0;
log "...this seems to be an old Java Runtime (or maybe just too new)";
JAVA_COMMAND=""
return 1
Expand Down
4 changes: 4 additions & 0 deletions ganttproject-builder/ganttproject.command
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ check_java() {
[[ "$VERSION" =~ 17\.? ]] && return 0;
[[ "$VERSION" =~ 18\.? ]] && return 0;
[[ "$VERSION" =~ 19\.? ]] && return 0;
[[ "$VERSION" =~ 20\.? ]] && return 0;
[[ "$VERSION" =~ 21\.? ]] && return 0;
[[ "$VERSION" =~ 22\.? ]] && return 0;
[[ "$VERSION" =~ 23\.? ]] && return 0;
log "...this seems to be an old Java Runtime (or maybe just too new)";
JAVA_COMMAND=""
return 1
Expand Down
4 changes: 3 additions & 1 deletion ganttproject/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ dependencies {
}
implementation "com.michael-bull.kotlin-result:kotlin-result:2.0.0"


implementation('net.harawata:appdirs:1.2.1') {
exclude group: 'net.java.dev.jna', module: 'jna'
}
testImplementation group: 'org.easymock', name: 'easymock', version: '5.+'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.+'

Expand Down
Binary file modified ganttproject/lib/core/eclipsito.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object PgpUtil {
private val FP_CALC: KeyFingerPrintCalculator = BcKeyFingerprintCalculator()

private val ourPublicKey by lazy {
val publicKeyResource = System.getProperty("app.update.public_key", "/ganttproject-3.3.pub.asc")
val publicKeyResource = System.getProperty("app.update.public_key", "/ganttproject-3.3.3311.pub.asc")
val publicKeyStream = Eclipsito::class.java.getResourceAsStream(publicKeyResource) ?:
throw RuntimeException(
"Failed to read the public key from $publicKeyResource. This resource is missing.".also { LOG.error(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ fun String.withGanExtension() =
private val domParser = DocumentBuilderFactory.newInstance().also {
it.isValidating = false
it.isNamespaceAware = false
it.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true)
}

@Throws(SAXException::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
import net.sourceforge.ganttproject.parser.FileFormatException;
import net.sourceforge.ganttproject.parser.ParsingListener;
import net.sourceforge.ganttproject.parser.TagHandler;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.*;
import org.xml.sax.ext.DefaultHandler2;

import javax.xml.parsers.ParserConfigurationException;
Expand Down Expand Up @@ -114,13 +112,19 @@ public void parse(InputStream inStream) throws IOException {

// Use the default (non-validating) parser
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
} catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) {
GPLogger.log(e);
throw new IOException(e.getMessage());
}

try {
// Parse the input
SAXParser saxParser;
saxParser = factory.newSAXParser();
XMLReader xmlReader = saxParser.getXMLReader();
xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler",
this);
xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", this);
saxParser.parse(new ByteArrayInputStream(inputBytes), this);

var xmlProject = XmlSerializerKt.parseXmlProject(new String(inputBytes, Charsets.UTF_8));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ private void recalculateActivities() {
}

recalculateActivities(myManager.getConfig().getCalendar(), this, myActivities, startDate, endDate);
int length = 0;
float length = 0;
for (TaskActivity activity : myActivities) {
if (activity.getIntensity() > 0) {
length += activity.getDuration().getLength(getDuration().getTimeUnit());
Expand Down

0 comments on commit 37a3d59

Please sign in to comment.