Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: palantir/gradle-baseline
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.19.0
Choose a base ref
...
head repository: palantir/gradle-baseline
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.20.0
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Mar 7, 2025

  1. Excavator: Format Java files (#3061)

    svc-excavator-bot authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7676db2 View commit details

Commits on Mar 10, 2025

  1. Allow test tasks without corresponding source set (#3062)

    pkoenig10 authored Mar 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d51c41a View commit details
  2. Release 6.20.0

    [skip ci]
    svc-autorelease committed Mar 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    7faacda View commit details
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ buildscript {
classpath 'com.palantir.gradle.plugintesting:gradle-plugin-testing:0.6.0'
classpath 'com.gradle.publish:plugin-publish-plugin:1.3.1'
classpath 'com.palantir.baseline:gradle-baseline-java:6.16.0'
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.55.0'
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.56.0'
classpath 'com.palantir.suppressible-error-prone:gradle-suppressible-error-prone:2.5.0'
}
}
Original file line number Diff line number Diff line change
@@ -141,7 +141,6 @@ private void configureTestTask(TestingExtension testingExtension, Test task) {

private static Stream<SourceSet> testSourceSetsWhereJunitToolchainDepsHaveNotBeenAutomaticallyAdded(
Project project) {

SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
TestingExtension testingExtension = project.getExtensions().getByType(TestingExtension.class);

@@ -150,7 +149,7 @@ private static Stream<SourceSet> testSourceSetsWhereJunitToolchainDepsHaveNotBee

return project.getTasks().withType(Test.class).getNames().stream().flatMap(testTaskName -> {
if (gradleVersionLessThan8 || testTaskNotCreatedByJvmTestSuites(testingExtension, testTaskName)) {
return Stream.of(sourceSets.getByName(testTaskName));
return Stream.ofNullable(sourceSets.findByName(testTaskName));
}

return Stream.empty();
Original file line number Diff line number Diff line change
@@ -294,6 +294,23 @@ class BaselineTestingIntegrationTest extends IntegrationSpec {
gradleVersionNumber << GradleTestVersions.gradleVersionsForTests
}

def '#gradleVersionNumber: test task without source set'() {
when:
gradleVersion = gradleVersionNumber

buildFile << standardBuildFile
buildFile << '''
tasks.register('otherTest', Test.class)
'''.stripIndent(true)

then:
// Run a task that will attempt to resolve dependencies
runTasksSuccessfully('compileJava')

where:
gradleVersionNumber << GradleTestVersions.gradleVersionsForTests
}

def 'running -Drecreate=true will re-run tests even if no code changes'() {
buildFile << standardBuildFile
file('src/test/java/test/JUnit5Test.java') << junit5Test