6.0.1 release

This commit is contained in:
Steve Ebersole 2022-04-29 15:55:45 -05:00
parent e2258b3232
commit 9e6e618caf
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,7 @@
package org.hibernate.orm.env;
import java.io.File;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
@ -10,9 +12,10 @@ public class EnvironmentProjectPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getExtensions().add( HibernateVersion.EXT_KEY, HibernateVersion.from( project ) );
final File versionFile = project.getRootProject().file( HibernateVersion.RELATIVE_FILE );
project.getExtensions().add( "ormVersionFile", versionFile );
project.getExtensions().add( HibernateVersion.EXT_KEY, HibernateVersion.from( project, versionFile ) );
project.getExtensions().add( JpaVersion.EXT_KEY, JpaVersion.from( project ) );
project.getExtensions().add( "jpaVersion", new JpaVersion( "2.2" ) );
}
}

View File

@ -10,7 +10,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;
import java.util.function.Consumer;
@ -64,7 +63,7 @@ public class HibernateVersion {
return isSnapshot;
}
public static HibernateVersion from(Project project) {
public static HibernateVersion from(Project project, File versionFile) {
if ( project.hasProperty( VERSION_KEY ) ) {
final Object version = project.property( VERSION_KEY );
if ( version != null ) {
@ -72,7 +71,6 @@ public class HibernateVersion {
}
}
final File versionFile = project.getRootProject().file( RELATIVE_FILE );
final String fullName = readVersionProperties( versionFile );
return new HibernateVersion( fullName );
}