Skip to content

Commit

Permalink
HHH-11507 - Upgrade to Gradle 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Sep 21, 2017
1 parent f8b78bc commit ca368f8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
17 changes: 14 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ buildscript {
}

plugins {
id 'com.gradle.build-scan' version '1.3'
id 'com.gradle.build-scan' version '1.9'
id 'me.champeau.buildscan-recipes' version '0.1.7'
}

Expand All @@ -59,7 +59,7 @@ allprojects {

ext {
hibernateTargetVersion = '5.2.12-SNAPSHOT'
expectedGradleVersion = '3.2.1'
expectedGradleVersion = '4.2'
baselineJavaVersion = '1.8'

osgiExportVersion = hibernateTargetVersion.replaceAll( '-SNAPSHOT', '.SNAPSHOT' )
Expand Down Expand Up @@ -97,6 +97,10 @@ subprojects { subProject ->

defaultTasks 'build'

if ( subProject.name.startsWith( 'hibernate-gradle-plugin' ) ) {
apply plugin: 'groovy'
}

group = 'org.hibernate'
version = rootProject.hibernateTargetVersion

Expand Down Expand Up @@ -280,12 +284,19 @@ subprojects { subProject ->

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// artifact

jar {
manifest = osgiManifest {
// GRADLE-1411: Even if we override Imports and Exports
// auto-generation with instructions, classesDir and classpath
// need to be here (temporarily).
classesDir = sourceSets.main.output.classesDir

if ( subProject.name.startsWith( 'hibernate-gradle-plugin' ) ) {
classesDir = sourceSets.main.groovy.outputDir
}
else {
classesDir = sourceSets.main.output.classesDir
}
classpath = configurations.runtime

instruction 'Import-Package',
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Dec 16 15:26:37 GMT 2016
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class MavenEnhancePluginTest {

@Test
public void testEnhancePlugin() throws Exception {
File baseDir = new File("target/classes/test");
File baseDir = new File("target/classes/java/test");
URL[] baseURLs = { baseDir.toURI().toURL() };

MavenEnhancePlugin plugin = new MavenEnhancePlugin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*/
apply plugin: 'java-gradle-plugin'

apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'java'

dependencies {
compile( project( ':hibernate-core' ) )
Expand Down

0 comments on commit ca368f8

Please sign in to comment.