Skip to content

Commit

Permalink
updated gradle to 4.0.1 and fixed a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fab1an committed Jul 21, 2017
1 parent cc66dbb commit bc68403
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 91 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Expand Up @@ -184,30 +184,30 @@ artifacts {

signing {
required { gradle.taskGraph.hasTask("uploadArchives") }

sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "${mavenStagingRepositoryUrl}") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

snapshotRepository(url: "${mavenSnapshotsRepositoryUrl}") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project {
packaging 'jar'
name "Glazed Lists"
description "Event-driven lists for dynamically filtered and sorted tables"

url "http://www.glazedlists.com"

issueManagement {
system "GitHub Issues"
url "https://github.com/glazedlists/glazedlists/issues"
Expand Down
144 changes: 73 additions & 71 deletions core/build.gradle
@@ -1,96 +1,98 @@
/**
* M4 generation
*/
task m4 << {
task m4 {
doLast {

def extension = ["Node", "Tree", "TreeAsList", "TreeIterator"]
def dir = "$rootDir/core/src/main/java/ca/odell/glazedlists/impl/adt/barcode2"
def extension = ["Node", "Tree", "TreeAsList", "TreeIterator"]
def dir = "$rootDir/core/src/main/java/ca/odell/glazedlists/impl/adt/barcode2"

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=4',
'-DVAR_WIDE_NODES=true',
'-DVAR_TYPE_COUNT=1',
"Bcii${ext}.java"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=4',
'-DVAR_WIDE_NODES=true',
'-DVAR_TYPE_COUNT=1',
"Bcii${ext}.java"

standardOutput = new FileOutputStream("$dir/FourColor${ext}.java_intermediate")
standardOutput = new FileOutputStream("$dir/FourColor${ext}.java_intermediate")
}
}
}

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=FourColorTree',
'-DBciiNode=FourColorNode',
'-DBciiTreeAsList=FourColorTreeAsList',
'-DBciiTreeIterator=FourColorTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"FourColor${ext}.java_intermediate"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=FourColorTree',
'-DBciiNode=FourColorNode',
'-DBciiTreeAsList=FourColorTreeAsList',
'-DBciiTreeIterator=FourColorTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"FourColor${ext}.java_intermediate"

standardOutput = new FileOutputStream("$dir/FourColor${ext}.java")
standardOutput = new FileOutputStream("$dir/FourColor${ext}.java")
}
}
}

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=4',
'-DVAR_WIDE_NODES=true',
'-DVAR_TYPE_COUNT=2',
"Bcii${ext}.java"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=4',
'-DVAR_WIDE_NODES=true',
'-DVAR_TYPE_COUNT=2',
"Bcii${ext}.java"

standardOutput = new FileOutputStream("$dir/FourColorTwoValue${ext}.java_intermediate")
standardOutput = new FileOutputStream("$dir/FourColorTwoValue${ext}.java_intermediate")
}
}
}

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=FourColorTwoValueTree',
'-DBciiNode=FourColorTwoValueNode',
'-DBciiTreeAsList=FourColorTwoValueTreeAsList',
'-DBciiTreeIterator=FourColorTwoValueTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"FourColorTwoValue${ext}.java_intermediate"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=FourColorTwoValueTree',
'-DBciiNode=FourColorTwoValueNode',
'-DBciiTreeAsList=FourColorTwoValueTreeAsList',
'-DBciiTreeIterator=FourColorTwoValueTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"FourColorTwoValue${ext}.java_intermediate"

standardOutput = new FileOutputStream("$dir/FourColorTwoValue${ext}.java")
standardOutput = new FileOutputStream("$dir/FourColorTwoValue${ext}.java")
}
}
}

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=1',
'-DVAR_WIDE_NODES=false',
'-DVAR_TYPE_COUNT=1',
"Bcii${ext}.java"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DVAR_COLOUR_COUNT=1',
'-DVAR_WIDE_NODES=false',
'-DVAR_TYPE_COUNT=1',
"Bcii${ext}.java"

standardOutput = new FileOutputStream("$dir/Simple${ext}.java_intermediate")
standardOutput = new FileOutputStream("$dir/Simple${ext}.java_intermediate")
}
}
}

extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=SimpleTree',
'-DBciiNode=SimpleNode',
'-DBciiTreeAsList=SimpleTreeAsList',
'-DBciiTreeIterator=SimpleTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"Simple${ext}.java_intermediate"
extension.each { ext ->
exec {
workingDir dir
commandLine 'm4', '--prefix-builtins',
'-DBciiTree=SimpleTree',
'-DBciiNode=SimpleNode',
'-DBciiTreeAsList=SimpleTreeAsList',
'-DBciiTreeIterator=SimpleTreeIterator',
'-DCOMMAPLACEHOLDER=,',
"Simple${ext}.java_intermediate"

standardOutput = new FileOutputStream("$dir/Simple${ext}.java")
standardOutput = new FileOutputStream("$dir/Simple${ext}.java")
}
}
}

delete fileTree(dir) {
include '**/*_intermediate'
delete fileTree(dir) {
include '**/*_intermediate'
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Sep 07 10:56:44 CEST 2016
#Fri Jul 21 07:56:36 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip
22 changes: 15 additions & 7 deletions gradlew
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
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
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 bc68403

Please sign in to comment.