Skip to content

Commit

Permalink
Upgrade gradle to 4.4.1
Browse files Browse the repository at this point in the history
related to asciidoctor#591
  • Loading branch information
tisoft committed Jan 10, 2018
1 parent 9880f7f commit 522843a
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 24 deletions.
2 changes: 1 addition & 1 deletion asciidoctorj-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jrubyPrepare {
doLast {
copy { // bundles the gems inside this artifact
from gemFiles
into sourceSets.main.output.resourcesDir
into preparedGems
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion asciidoctorj-diagram/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jrubyPrepare {
doLast {
copy { // bundles the gems inside this artifact
from gemFiles
into sourceSets.main.output.resourcesDir
into preparedGems
}
}
}
4 changes: 0 additions & 4 deletions asciidoctorj-distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ if ( !project.hasProperty('skip.signing') ) {
signPom.enabled = false
}

configurations.all {
artifacts.clear()
}

tasks.withType(AbstractArchiveTask) {
baseName rootProject.name
classifier 'bin' // use classifier for identification in repository list
Expand Down
2 changes: 1 addition & 1 deletion asciidoctorj-epub3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jrubyPrepare {
doLast {
copy { // bundles the gems inside this artifact
from gemFiles
into sourceSets.main.output.resourcesDir
into preparedGems
}
}
}
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,19 @@ configure(subprojects.findAll { !it.name.endsWith('-distribution') && ! it.name.
// TODO I'd like to be able to customize the name of the gemInstallDir
}

ext {
// path to use for the prepared jruby gems
preparedGems = new File("$buildDir/preparedGems")
}

sourceSets {
main {
//let's register an output folder on the main SourceSet:
output.dir(preparedGems, builtBy: 'jrubyPrepare')
//it is now a part of the 'main' classpath and will be a part of the jar
}
}

// QUESTION is this the right place to insert this task dependency in the lifecycle?
// IMPORTANT The TMP or TEMP environment variable must be set for the gem install command to work on Windows
processResources.dependsOn jrubyPrepare
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri May 27 23:04:37 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
26 changes: 17 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down 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 @@ -154,11 +154,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 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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.
Expand All @@ -60,11 +59,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
Expand Down

0 comments on commit 522843a

Please sign in to comment.