Revert "Build: Move gradle wrapper jar to a dot dir (#30146)"
This reverts commit a324cd41f7
.
A non default gradle wrapper location causes intellij to fail in
mysterious ways....
This commit is contained in:
parent
092dd6cb89
commit
a799939630
23
build.gradle
23
build.gradle
|
@ -440,19 +440,26 @@ task run(type: Run) {
|
||||||
impliesSubProjects = true
|
impliesSubProjects = true
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper)
|
||||||
distributionType = DistributionType.ALL
|
|
||||||
jarFile = file('.gradle-wrapper/gradle-wrapper.jar')
|
gradle.projectsEvaluated {
|
||||||
doLast {
|
|
||||||
|
allprojects {
|
||||||
|
tasks.withType(Wrapper) { Wrapper wrapper ->
|
||||||
|
wrapper.distributionType = DistributionType.ALL
|
||||||
|
|
||||||
|
wrapper.doLast {
|
||||||
final DistributionLocator locator = new DistributionLocator()
|
final DistributionLocator locator = new DistributionLocator()
|
||||||
final GradleVersion version = GradleVersion.version(gradleVersion)
|
final GradleVersion version = GradleVersion.version(wrapper.gradleVersion)
|
||||||
final URI distributionUri = locator.getDistributionFor(version, distributionType.name().toLowerCase(Locale.ENGLISH))
|
final URI distributionUri = locator.getDistributionFor(version, wrapper.distributionType.name().toLowerCase(Locale.ENGLISH))
|
||||||
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
|
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
|
||||||
final String sha256Sum = new String(sha256Uri.toURL().bytes)
|
final String sha256Sum = new String(sha256Uri.toURL().bytes)
|
||||||
final String existingProperties = getPropertiesFile().getText('UTF-8')
|
wrapper.getPropertiesFile() << "distributionSha256Sum=${sha256Sum}\n"
|
||||||
getPropertiesFile().setText("${existingProperties}distributionSha256Sum=${sha256Sum}\n", 'UTF-8')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void assertLinesInFile(final Path path, final List<String> expectedLines) {
|
static void assertLinesInFile(final Path path, final List<String> expectedLines) {
|
||||||
final List<String> actualLines = Files.readAllLines(path)
|
final List<String> actualLines = Files.readAllLines(path)
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
distributionSha256Sum=203f4537da8b8075e38c036a6d14cb71b1149de5bf0a8f6db32ac2833a1d1294
|
distributionSha256Sum=203f4537da8b8075e38c036a6d14cb71b1149de5bf0a8f6db32ac2833a1d1294
|
|
@ -64,7 +64,7 @@ case "`uname`" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/.gradle-wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
|
|
@ -63,7 +63,7 @@ set CMD_LINE_ARGS=%*
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\.gradle-wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
Loading…
Reference in New Issue