Skip to content

Commit

Permalink
Update Geode to build with Gradle 5.0 (apache#2931)
Browse files Browse the repository at this point in the history
* Java 11 support
* Dependency version alignment
* Better build output caching
  • Loading branch information
robbadler authored and jake-at-work committed Dec 10, 2018
1 parent 9adaffc commit a5fdcad
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import org.gradle.process.internal.ExecHandleState;
import org.gradle.process.internal.ProcessSettings;
import org.gradle.process.internal.StreamsHandler;
import org.gradle.process.internal.shutdown.ShutdownHookActionRegister;
import org.gradle.process.internal.shutdown.ShutdownHooks;

/**
* Default implementation for the ExecHandle interface.
Expand Down Expand Up @@ -225,7 +225,7 @@ private boolean stateIn(ExecHandleState... states) {
}

private void setEndStateInfo(ExecHandleState newState, int exitValue, Throwable failureCause) {
ShutdownHookActionRegister.removeAction(shutdownHookAction);
ShutdownHooks.removeShutdownHook(shutdownHookAction);
buildCancellationToken.removeCallback(shutdownHookAction);
ExecHandleState currentState;
lock.lock();
Expand Down Expand Up @@ -367,7 +367,7 @@ void detached() {
}

void started() {
ShutdownHookActionRegister.addAction(shutdownHookAction);
ShutdownHooks.addShutdownHook(shutdownHookAction);
buildCancellationToken.addCallback(shutdownHookAction);
setState(ExecHandleState.STARTED);
broadcast.getSource().executionStarted(this);
Expand Down Expand Up @@ -545,6 +545,12 @@ public void stop() {
inputHandler.stop();
outputHandler.stop();
}

@Override
public void disconnect() {
inputHandler.disconnect();
outputHandler.disconnect();
}
}

private class DockerizedProcess extends Process {
Expand Down
2 changes: 1 addition & 1 deletion geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ gradle.taskGraph.whenReady( { graph ->
repositories {
ivy {
url 'https://archive.apache.org/'
layout 'pattern', {
patternLayout {
artifact '/dist/tomcat/tomcat-6/v6.0.37/bin/[organisation]-[module]-[revision].[ext]'
}
}
Expand Down
9 changes: 7 additions & 2 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ subprojects {
}
javac.options.incremental = true
javac.options.fork = true
javac.options.forkOptions.with({
memoryMaximumSize = "768m"
})
if (project.hasProperty('compileJVM') && !compileJVM.trim().isEmpty()) {
javac.options.forkOptions.executable = compileJVM + "/bin/javac"
}
Expand All @@ -69,8 +72,10 @@ subprojects {
}
jar.metaInf {
from("$rootDir/LICENSE")
if (jar.source.filter({ it.name.contains('NOTICE') }).empty) {
from("$rootDir/NOTICE")
jar.doLast {
if (jar.source.filter({ it.name.contains('NOTICE') }).empty) {
from("$rootDir/NOTICE")
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 0 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ if (GradleVersion.current() < GradleVersion.version(minimumGradleVersion)) {
throw new GradleException('Running with unsupported Gradle Version. Use Gradle Wrapper or with Gradle version >= ' + minimumGradleVersion)
}

enableFeaturePreview('STABLE_PUBLISHING')

buildCache {
local {
enabled = true
}
}

0 comments on commit a5fdcad

Please sign in to comment.