Upgrade to Gradle 4.10.2
Due to an upgrade of the Artifactory publication plugin on the CI server, we need to upgrade the build for 4.3.x to Gradle 4.x. Closes gh-24392
This commit is contained in:
47
build.gradle
47
build.gradle
@@ -3,17 +3,13 @@ buildscript {
|
||||
maven { url "https://repo.spring.io/plugins-release" }
|
||||
}
|
||||
dependencies {
|
||||
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
||||
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.2")
|
||||
classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
|
||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.2")
|
||||
classpath("ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.9.1")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "1.1"
|
||||
}
|
||||
|
||||
ext {
|
||||
linkHomepage = 'https://projects.spring.io/spring-framework'
|
||||
linkCi = 'https://build.spring.io/browse/SPR'
|
||||
@@ -222,12 +218,6 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
|
||||
jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {taskGraph ->
|
||||
if (taskGraph.hasTask(':sonarqube')) {
|
||||
test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest.attributes["Created-By"] =
|
||||
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
|
||||
@@ -1134,20 +1124,6 @@ project("spring-framework-bom") {
|
||||
}
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.projectName", "Spring Framework"
|
||||
property "sonar.profile", "Spring Framework"
|
||||
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
||||
property "sonar.links.homepage", linkHomepage
|
||||
property "sonar.links.ci", linkCi
|
||||
property "sonar.links.issue", linkIssue
|
||||
property "sonar.links.scm", linkScmUrl
|
||||
property "sonar.links.scm_dev", linkScmDevConnection
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
}
|
||||
}
|
||||
|
||||
configure(rootProject) {
|
||||
description = "Spring Framework"
|
||||
|
||||
@@ -1370,9 +1346,9 @@ configure(rootProject) {
|
||||
archives distZip
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
wrapper {
|
||||
description = "Generates gradlew[.bat] scripts"
|
||||
gradleVersion = "2.14.1"
|
||||
gradleVersion = "4.10.2"
|
||||
|
||||
doLast() {
|
||||
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
|
||||
@@ -1388,21 +1364,6 @@ configure(rootProject) {
|
||||
|
||||
}
|
||||
|
||||
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
||||
}
|
||||
|
||||
configure(project(':spring-core')) {
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.exclusions",
|
||||
"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Support publication of artifacts versioned by topic branch.
|
||||
* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
|
||||
|
||||
@@ -21,7 +21,7 @@ eclipse.classpath.file.whenMerged { classpath ->
|
||||
def projectName = matcher[0][1]
|
||||
def path = "/${projectName}"
|
||||
if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) {
|
||||
def dependency = new ProjectDependency(path, project(":${projectName}").path)
|
||||
def dependency = new ProjectDependency(path)
|
||||
dependency.exported = true
|
||||
classpath.entries.add(dependency)
|
||||
}
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
||||
#Wed Aug 17 21:21:18 CEST 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
||||
|
||||
26
gradlew
vendored
26
gradlew
vendored
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -34,11 +34,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
|
||||
@@ -155,11 +155,19 @@ if $cygwin ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
6
gradlew.bat
vendored
6
gradlew.bat
vendored
@@ -50,7 +50,6 @@ goto fail
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
@@ -61,11 +60,6 @@ set _SKIP=2
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package org.springframework.scripting.groovy;
|
||||
|
||||
import org.springframework.context.ApplicationContext
|
||||
import org.springframework.context.ApplicationContextAware
|
||||
import org.springframework.scripting.ContextScriptBean
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package org.springframework.scripting.groovy;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean
|
||||
|
||||
class TestFactoryBean implements FactoryBean {
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package org.springframework.scripting.groovy;
|
||||
|
||||
return 3 * 2
|
||||
|
||||
@@ -23,9 +23,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import org.apache.velocity.context.Context;
|
||||
import org.apache.velocity.tools.view.ToolboxManager;
|
||||
import org.apache.velocity.tools.view.context.ChainedContext;
|
||||
import org.apache.velocity.tools.view.servlet.ServletToolboxManager;
|
||||
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
@@ -99,18 +96,21 @@ public class VelocityToolboxView extends VelocityView {
|
||||
* @see #initTool
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected Context createVelocityContext(
|
||||
Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
// Create a ChainedContext instance.
|
||||
ChainedContext velocityContext = new ChainedContext(
|
||||
new VelocityContext(model), getVelocityEngine(), request, response, getServletContext());
|
||||
org.apache.velocity.tools.view.context.ChainedContext velocityContext =
|
||||
new org.apache.velocity.tools.view.context.ChainedContext(
|
||||
new VelocityContext(model), getVelocityEngine(), request, response, getServletContext());
|
||||
|
||||
// Load a Velocity Tools toolbox, if necessary.
|
||||
if (getToolboxConfigLocation() != null) {
|
||||
ToolboxManager toolboxManager = ServletToolboxManager.getInstance(
|
||||
getServletContext(), getToolboxConfigLocation());
|
||||
Map<?, ?> toolboxContext = toolboxManager.getToolbox(velocityContext);
|
||||
org.apache.velocity.tools.view.ToolboxManager toolboxManager =
|
||||
org.apache.velocity.tools.view.servlet.ServletToolboxManager.getInstance(
|
||||
getServletContext(), getToolboxConfigLocation());
|
||||
Map toolboxContext = toolboxManager.getToolbox(velocityContext);
|
||||
velocityContext.setToolbox(toolboxContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user