Skip to content

Commit

Permalink
Add support for Eclipse 2022-06 4.24 (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored Jun 16, 2022
2 parents 22f4e8d + 1f851f2 commit 6cc9fd3
Show file tree
Hide file tree
Showing 6 changed files with 13,581 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Goomph releases

## [Unreleased]
### Added
- Eclipse `4.24.0` aka `2022-06` ([new and noteworthy](https://www.eclipse.org/eclipse/news/4.24/)) ([#191](https://github.com/diffplug/goomph/pull/191)).

## [3.36.2] - 2022-04-23
### Fixed
Expand All @@ -12,7 +14,7 @@

## [3.36.0] - 2022-03-25
### Added
- Eclipse `4.23.0` aka `2022-02` ([new and noteworthy](https://www.eclipse.org/eclipse/news/4.23/)).
- Eclipse `4.23.0` aka `2022-03` ([new and noteworthy](https://www.eclipse.org/eclipse/news/4.23/)).

## [3.35.0] - 2022-01-30
### Added
Expand Down
10 changes: 5 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pluginManagement {
plugins {
id 'com.diffplug.blowdryer' version '1.5.1'
id 'com.diffplug.blowdryerSetup' version '1.5.1'
id 'com.diffplug.eclipse.mavencentral' version '3.28.0'
id 'com.diffplug.blowdryer' version '1.6.0'
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'com.diffplug.eclipse.mavencentral' version '3.36.2'
id 'com.diffplug.spotless-changelog' version '2.4.0'
id 'com.diffplug.spotless' version '6.3.0'
id 'com.gradle.plugin-publish' version '0.20.0'
id 'com.diffplug.spotless' version '6.6.0'
id 'com.gradle.plugin-publish' version '0.21.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'org.jdrupes.mdoclet' version '1.0.10'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 DiffPlug
* Copyright (C) 2018-2022 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,6 +46,7 @@ public class MavenCentralMapping {
private static final String PDE = "org.eclipse.pde";
private static final String EMF = "org.eclipse.emf";
private static final String ECF = "org.eclipse.ecf";
private static final String OSGI = "org.osgi";

private static final String ICU_BUNDLE_ID = "com.ibm.icu";

Expand All @@ -67,6 +68,8 @@ public static String groupIdArtifactId(String bundleId) {
return EMF + ":" + bundleId;
} else if (bundleId.startsWith(ECF)) {
return ECF + ":" + bundleId;
} else if (bundleId.startsWith(OSGI)) {
return OSGI + ":" + bundleId;
} else {
return PLATFORM + ":" + bundleId;
}
Expand Down Expand Up @@ -96,6 +99,13 @@ static Map<String, String> parse(InputStream inputStream, Function<String, Strin
}

static String calculateMavenCentralVersion(String bundleId, String bundleVersion) {
if ("org.eclipse.equinox.preferences".equals(bundleId) && "3.10.0.v20220503-1634".equals(bundleVersion)) {
// See https://github.com/eclipse-equinox/equinox.bundles/issues/54
return "3.10.1";
} else if ("org.eclipse.osgi.util".equals(bundleId) && "3.7.0.v20220427-2144".equals(bundleVersion)) {
// See https://github.com/eclipse-equinox/equinox.framework/issues/70
return "3.7.1";
}
Version parsed = Version.parseVersion(bundleVersion);
if (ICU_BUNDLE_ID.equals(bundleId) && parsed.getMicro() == 0) {
return parsed.getMajor() + "." + parsed.getMinor();
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/diffplug/gradle/pde/EclipseRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static EclipseRelease official(String version) {
}
}

public static final String LATEST = "4.23.0";
public static final String LATEST = "4.24.0";

public static EclipseRelease latestOfficial() {
return official(LATEST);
Expand Down Expand Up @@ -125,15 +125,16 @@ private static EclipseRelease officialReleaseMaybe(String version) {
case "4.20.0": return root + "4.20/R-4.20-202106111600/";
case "4.21.0": return root + "4.21/R-4.21-202109060500/";
case "4.22.0": return root + "4.22/R-4.22-202111241800/";
case "4.23.0": return root + "4.23/R-4.23-202203080310//";
case "4.23.0": return root + "4.23/R-4.23-202203080310/";
case "4.24.0": return root + "4.24/R-4.24-202206070700/";
// less-specific versions
case "3.5": case "3.6": case "3.7": case "3.8":
case "4.2": case "4.3": case "4.4": case "4.5":
case "4.6": case "4.7": case "4.8": case "4.9":
case "4.10": case "4.11": case "4.12": case "4.13":
case "4.14": case "4.15": case "4.16": case "4.17":
case "4.18": case "4.19": case "4.20": case "4.21":
case "4.22": case "4.23":
case "4.22": case "4.23": case "4.24":
return root + v + "/";
default: return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2021 DiffPlug
* Copyright (C) 2015-2022 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -90,6 +90,28 @@ private void assert4140(Map<String, String> groupIdArtifactIdToVersion) {
.hasSize(785);
}

@Test
public void testParsing4240() throws IOException, ParserConfigurationException, SAXException {
try (InputStream input = MavenCentralMappingTest.class.getResourceAsStream("/artifacts-4.24.0.xml")) {
assert4240(MavenCentralMapping.parse(input, MavenCentralMapping::groupIdArtifactId));
}
}

private void assert4240(Map<String, String> groupIdArtifactIdToVersion) {
Assertions.assertThat(groupIdArtifactIdToVersion)
.containsEntry("org.eclipse.platform:org.eclipse.debug.core", "3.19.100")
.containsEntry("org.eclipse.platform:org.eclipse.equinox.p2.metadata", "2.6.200")
.containsEntry("org.eclipse.platform:org.eclipse.help", "3.9.100")
.containsEntry("org.eclipse.ecf:org.eclipse.ecf", "3.10.0")
.containsEntry("org.eclipse.jdt:org.eclipse.jdt.core", "3.30.0")
.containsEntry("org.eclipse.jdt:ecj", "3.30.0")
.containsEntry("org.osgi:org.osgi.service.prefs", "1.1.2")
.containsEntry("org.osgi:org.osgi.util.function", "1.2.0")
.containsEntry("org.eclipse.platform:org.eclipse.equinox.preferences", "3.10.1") // 3.10.0 is broken on maven central, a fix was published
.containsEntry("org.eclipse.platform:org.eclipse.osgi.util", "3.7.1") // 3.7.0 is broken on maven central, a fix was published
.hasSize(833);
}

@Test
public void testMissingBugfixVersion() throws IOException {
Assertions.assertThatThrownBy(() -> {
Expand Down
Loading

0 comments on commit 6cc9fd3

Please sign in to comment.