Skip to content

Commit

Permalink
Merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
big-andy-coates committed Mar 7, 2024
2 parents 2fceaca + 4d6035f commit 792c693
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 48 deletions.
24 changes: 20 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,27 @@ updates:
schedule:
interval: monthly
- package-ecosystem: gradle
directory: /docs-examples
directory: /test-project
open-pull-requests-limit: 50
schedule:
interval: weekly
- package-ecosystem: docker
directory: /test-service
interval: monthly
- package-ecosystem: gradle
directory: /test-project-groovy
open-pull-requests-limit: 50
schedule:
interval: monthly
- package-ecosystem: gradle
directory: /test-project-kotlin
open-pull-requests-limit: 50
schedule:
interval: monthly
- package-ecosystem: gradle
directory: /test-project-kotlin-pre-1-7
open-pull-requests-limit: 50
schedule:
interval: monthly
- package-ecosystem: gradle
directory: /test-project-mixed
open-pull-requests-limit: 50
schedule:
interval: monthly
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build

on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch: {}

jobs:
build:
Expand All @@ -9,7 +14,7 @@ jobs:
- name: Git checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
cache: gradle
distribution: microsoft
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Git checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
cache: gradle
distribution: microsoft
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'eclipse'
id 'java-gradle-plugin'
id 'maven-publish' // used for publishing to local maven repository
id 'com.gradle.plugin-publish' version '0.12.0'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.github.ben-manes.versions' version '0.51.0'
}
Expand Down Expand Up @@ -30,21 +30,21 @@ configurations {
dependencies {
implementation gradleApi()
implementation 'org.jooq:joor:0.9.15'
plugin 'com.github.javaparser:javaparser-symbol-solver-core:3.13.5'
plugin 'com.github.javaparser:javaparser-symbol-solver-core:3.25.8'

testImplementation gradleTestKit()
testImplementation 'com.google.guava:guava-base:r03'
testImplementation 'com.google.guava:guava-io:r03'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.1'
testImplementation 'org.junit-pioneer:junit-pioneer:1.3.8'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
testImplementation 'org.junit-pioneer:junit-pioneer:2.2.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1' // required when testing in Eclipse
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2' // required when testing in Eclipse
}

shadowJar {
configurations = [project.configurations.plugin]
classifier = null
archiveClassifier = null
dependencies {
include(dependency('com.github.javaparser:javaparser-symbol-solver-core'))
include(dependency('com.github.javaparser:javaparser-symbol-solver-logic'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import org.gradle.testkit.runner.GradleRunner;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.CartesianEnumSource;
import org.junitpioneer.jupiter.CartesianProductTest;
import org.junitpioneer.jupiter.CartesianValueSource;
import org.junitpioneer.jupiter.cartesian.CartesianTest;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -60,10 +58,10 @@ void before() throws IOException {
.collect(Collectors.toList());
}

@CartesianProductTest(name = "smokeTest({arguments})")
@CartesianValueSource(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"})
@CartesianEnumSource(GradleVersion.class)
void smokeTest(String projectName, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTest({arguments})")
void smokeTest(
@CartesianTest.Values(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"}) String projectName,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTest of {} with Gradle {}", projectName, gradleVersion);
if(!checkCombination(projectName, gradleVersion)) return;
var result = GradleRunner.create()
Expand All @@ -84,10 +82,10 @@ void smokeTest(String projectName, GradleVersion gradleVersion) {
assertOutputDoesNotContain(result, "warning: [options] --add-opens has no effect at compile time");
}

@CartesianProductTest(name = "smokeTestRun({arguments})")
@CartesianValueSource(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"})
@CartesianEnumSource(GradleVersion.class)
void smokeTestRun(String projectName, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestRun({arguments})")
void smokeTestRun(
@CartesianTest.Values(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"}) String projectName,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestRun of {} with Gradle {}", projectName, gradleVersion);
if(!checkCombination(projectName, gradleVersion)) return;
var writer = new StringWriter(256);
Expand All @@ -108,10 +106,10 @@ void smokeTestRun(String projectName, GradleVersion gradleVersion) {
assertEquals("welcome", lines.get(2));
}

@CartesianProductTest(name = "smokeTestJunit5({arguments})")
@CartesianValueSource(strings = {"5.4.2/1.4.2", "5.5.2/1.5.2", "5.7.1/1.7.1"})
@CartesianEnumSource(GradleVersion.class)
void smokeTestJunit5(String junitVersionPair, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestJunit5({arguments})")
void smokeTestJunit5(
@CartesianTest.Values(strings = {"5.4.2/1.4.2", "5.5.2/1.5.2", "5.7.1/1.7.1"}) String junitVersionPair,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestJunit5 with junitVersionPair {} and Gradle {}", junitVersionPair, gradleVersion);
var junitVersionParts = junitVersionPair.split("/");
var junitVersionProperty = String.format("-PjUnitVersion=%s", junitVersionParts[0]);
Expand All @@ -130,9 +128,8 @@ void smokeTestJunit5(String junitVersionPair, GradleVersion gradleVersion) {
assertTasksSuccessful(result, "greeter.runner", "build", "run");
}

@CartesianProductTest(name = "smokeTestMixed({arguments})")
@CartesianEnumSource(GradleVersion.class)
void smokeTestMixed(GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestMixed({arguments})")
void smokeTestMixed(@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestMixed with Gradle {}", gradleVersion);
var result = GradleRunner.create()
.withProjectDir(new File("test-project-mixed"))
Expand Down Expand Up @@ -181,10 +178,10 @@ private static void assertExpectedClassFileFormats(
}
}

@CartesianProductTest(name = "smokeTestDist({arguments})")
@CartesianValueSource(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"})
@CartesianEnumSource(GradleVersion.class)
void smokeTestDist(String projectName, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestDist({arguments})")
void smokeTestDist(
@CartesianTest.Values(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"}) String projectName,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestDist of {} with Gradle {}", projectName, gradleVersion);
if(!checkCombination(projectName, gradleVersion)) return;
var result = GradleRunner.create()
Expand Down Expand Up @@ -222,10 +219,10 @@ void smokeTestDist(String projectName, GradleVersion gradleVersion) {
assertTrue(ctx.getAppOutput("greeter.runner").contains("welcome"));
}

@CartesianProductTest(name = "smokeTestRunDemo({arguments})")
@CartesianValueSource(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"})
@CartesianEnumSource(GradleVersion.class)
void smokeTestRunDemo(String projectName, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestRunDemo({arguments})")
void smokeTestRunDemo(
@CartesianTest.Values(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"}) String projectName,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestRunDemo of {} with Gradle {}", projectName, gradleVersion);
if(!checkCombination(projectName, gradleVersion)) return;
var result = GradleRunner.create()
Expand All @@ -241,10 +238,10 @@ void smokeTestRunDemo(String projectName, GradleVersion gradleVersion) {
assertFalse(result.getOutput().contains("Using Java lambdas is not supported as task inputs"));
}

@CartesianProductTest(name = "smokeTestRunStartScripts({arguments})")
@CartesianValueSource(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"})
@CartesianEnumSource(GradleVersion.class)
void smokeTestRunStartScripts(String projectName, GradleVersion gradleVersion) {
@CartesianTest(name = "smokeTestRunStartScripts({arguments})")
void smokeTestRunStartScripts(
@CartesianTest.Values(strings = {"test-project", "test-project-kotlin-pre-1-7", "test-project-kotlin", "test-project-groovy"}) String projectName,
@CartesianTest.Enum GradleVersion gradleVersion) {
LOGGER.lifecycle("Executing smokeTestRunScripts of {} with Gradle {}", projectName, gradleVersion);
if(!checkCombination(projectName, gradleVersion)) return;
var result = GradleRunner.create()
Expand Down
2 changes: 1 addition & 1 deletion test-project-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ subprojects {
}

dependencies {
implementation 'org.codehaus.groovy:groovy:3.0.7'
implementation 'org.codehaus.groovy:groovy:3.0.20'
testImplementation "org.junit.jupiter:junit-jupiter-api:$jUnitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$jUnitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$jUnitVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("javax.annotation:jsr250-api:1.0")

testImplementation("org.hamcrest:hamcrest:2.1+")
testImplementation("org.hamcrest:hamcrest:2.2+")
}

patchModules.config = listOf(
Expand Down
2 changes: 1 addition & 1 deletion test-project-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.7.10" apply false
kotlin("jvm") version "1.9.22" apply false
id("org.javamodularity.moduleplugin") version "1.8.13" apply false
}

Expand Down
2 changes: 1 addition & 1 deletion test-project-kotlin/greeter.provider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("javax.annotation:jsr250-api:1.0")

testImplementation("org.hamcrest:hamcrest:2.1+")
testImplementation("org.hamcrest:hamcrest:2.2+")
}

patchModules.config = listOf(
Expand Down
2 changes: 1 addition & 1 deletion test-project/greeter.provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'javax.annotation:jsr250-api:1.0'

testImplementation 'org.hamcrest:hamcrest:2.1+'
testImplementation 'org.hamcrest:hamcrest:2.2+'
}

patchModules.config = [
Expand Down

0 comments on commit 792c693

Please sign in to comment.