Skip to content

Commit

Permalink
Revert "HHH-15072 Add test for out of the box support for records as …
Browse files Browse the repository at this point in the history
…embeddables"

This reverts commit 9f5f31e.
  • Loading branch information
beikov committed Sep 2, 2022
1 parent 0cf2420 commit 1d37e52
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 131 deletions.
47 changes: 0 additions & 47 deletions hibernate-core/hibernate-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -212,50 +212,3 @@ tasks.withType( Test.class ).each { test ->
}
}

// Tests with records
if ( gradle.ext.javaVersions.test.release.asInt() >= 17 ) {

// Add a new source set, which contains tests that can run on JDK17+
sourceSets {
testJava17 {
java {
srcDirs = ['src/test/java17']
}
// Refer to the main test resources to avoid processing variables twice
resources {
srcDir 'target/resources/test'
}
}
}

// For the new source set, we need to configure the source and target version to 17
compileTestJava17Java {
sourceCompatibility = 17
targetCompatibility = 17
// We also depend on the main test resources
dependsOn( tasks.processTestResources )
}

// The source set gets a custom configuration which extends the normal test implementation config
configurations {
testJava17Implementation.extendsFrom(testImplementation, testRuntimeOnly)
}

// Add the output from src/main/java as dependency
dependencies {
testJava17Implementation files(sourceSets.main.output.classesDirs) {
builtBy compileJava
}
}

// We execute the Java 17 tests in a custom test task
task java17Test(type: Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.testJava17.output.classesDirs
classpath = sourceSets.testJava17.runtimeClasspath
}

testClasses.dependsOn compileTestJava17Java
// And run this as part of the check task by default
check.dependsOn java17Test
}

This file was deleted.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ gradle.ext.baselineJavaVersion = JavaLanguageVersion.of( 11 )
def GRADLE_MAX_SUPPORTED_BYTECODE_VERSION = 17

// If either 'main.jdk.version' or 'test.jdk.version' is set, enable the toolchain and use the selected jdk.
// If only one property is set, the other defaults to the baseline Java version (11).
// If only one property is set, the other defaults to the baseline Java version (8).
// Note that when toolchain is enabled, you also need to specify
// the location of the selected jdks
// (auto-download and auto-detect are disabled in gradle.properties).
Expand Down

0 comments on commit 1d37e52

Please sign in to comment.