Skip to content

Commit

Permalink
Remove Gradle 7 support
Browse files Browse the repository at this point in the history
See gh-95
  • Loading branch information
ciscoo committed Nov 12, 2023
1 parent 0d8cedc commit da981db
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 43 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ jobs:
uses: ./.github/actions/run-gradle
- name: Upload to Codecov.io
uses: codecov/codecov-action@v3
- name: Functional Tests (Gradle 8)
- name: Functional Tests
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel
- name: Functional Tests (Gradle 7)
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel -Dgradle7=true

Windows:
runs-on: windows-latest
Expand All @@ -38,14 +34,10 @@ jobs:
fetch-depth: 1
- name: Main Build
uses: ./.github/actions/run-gradle
- name: Functional Tests (Gradle 8)
- name: Functional Tests
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel
- name: Functional Tests (Gradle 7)
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel -Dgradle7=true

macOS:
runs-on: macos-latest
Expand All @@ -56,14 +48,10 @@ jobs:
fetch-depth: 1
- name: Main Build
uses: ./.github/actions/run-gradle
- name: Functional Tests (Gradle 8)
- name: Functional Tests
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel
- name: Functional Tests (Gradle 7)
uses: ./.github/actions/run-gradle
with:
arguments: functionalTest --parallel -Dgradle7=true

publish_snapshot_artifacts:
name: Publish Snapshot Artifacts
Expand Down
1 change: 0 additions & 1 deletion cxf-codegen-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ testing {
testLogging {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
systemProperty("gradle7", System.getProperty("gradle7", false.toString()))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
class ConfigurationCacheFunctionalTests {

@RegisterExtension
static GradleCompatibilityExtension gradleCompatibilityExtension = new GradleCompatibilityExtension("7.3.3",
"7.4.2", "7.5.1", "7.6", "8.2.1", "8.3", "current");
static GradleCompatibilityExtension gradleCompatibilityExtension = new GradleCompatibilityExtension("8.2.1", "8.3",
"current");

@TestTemplate
void configurationCacheCompatibility(GradleBuild gradleBuild) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,20 @@
*/
public final class GradleCompatibilityExtension implements TestTemplateInvocationContextProvider {

private static final List<String> GRADLE_7_VERSIONS = List.of("7.3.3", "7.4.2", "7.5.1", "7.6.1");

private static final List<String> GRADLE_8_VERSIONS = List.of("8.0.2", "8.1.1", "8.2.1", "8.3", "current");

private static final List<String> DEFAULT_GRADLE_VERSIONS;

static {
List<String> defaultVersions = new ArrayList<>(GRADLE_7_VERSIONS.size() + GRADLE_8_VERSIONS.size());
defaultVersions.addAll(GRADLE_7_VERSIONS);
List<String> defaultVersions = new ArrayList<>(GRADLE_8_VERSIONS.size());
defaultVersions.addAll(GRADLE_8_VERSIONS);
DEFAULT_GRADLE_VERSIONS = List.copyOf(defaultVersions);
}

private final List<String> gradleVersions;

public GradleCompatibilityExtension() {
// Attempt to reduce amount of work done in CI.
if (Boolean.parseBoolean(System.getProperty("gradle7"))) {
this.gradleVersions = GRADLE_7_VERSIONS;
}
else {
this.gradleVersions = GRADLE_8_VERSIONS;
}
this.gradleVersions = GRADLE_8_VERSIONS;
System.err.println("Testing against the following Gradle versions " + this.gradleVersions);
Assertions.assertTrue(DEFAULT_GRADLE_VERSIONS.containsAll(this.gradleVersions),
"GradleCompatibilityExtension version defaults mismatch");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ private NamedDomainObjectProvider<Configuration> createConfiguration(Project pro
}

private Provider<List<Dependency>> createDependencies(Project project, CxfCodegenExtension extension) {
// Avoid cast exception: FlatMapProvider to CollectionProviderInternal
if (GradleVersion.current().compareTo(GradleVersion.version("7.4")) < 0) {
String cxfVersion = extension.getCxfVersion().get();
return createDependenciesProvider(project, cxfVersion);
}
return extension.getCxfVersion().flatMap(cxfVersion -> createDependenciesProvider(project, cxfVersion));
}

Expand Down
11 changes: 2 additions & 9 deletions documentation/src/docs/asciidoc/overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,9 @@ include::../gradle/overview/plugin-application.gradle[]

The CXF Codegen Gradle plugin supports the following Gradle versions:

[cols="1,1"]
[cols="1"]
|===
| Gradle 7 | Gradle 8

a|

- 7.3.3
- 7.4.2
- 7.5.1
- 7.6.1
| Gradle 8

a|
- 8.0.2
Expand Down

0 comments on commit da981db

Please sign in to comment.