Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle to 5.3.1 #11

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
language: java
sudo: false
matrix:
include:
- os: osx
osx_image: xcode10
install:
# Install Oracle JDK 10 and set as JAVA_HOME
- pwd
- cd ..
- mkdir java
- cd java
- wget http://www.nerps.net/jdk10/jdk-10.0.2_osx-x64_bin.dmg
- MOUNTDEV=$(hdiutil mount jdk-10.0.2_osx-x64_bin.dmg | awk '/dev.disk/{print$1}')
- echo $MOUNTDEV
- MOUNTDIR="$(mount | grep JDK | awk '{$1=$2="";sub(" [(].*","");sub("^ ","");print}')"
- echo $MOUNTDIR
- sudo installer -pkg "${MOUNTDIR}/"*.pkg -target /
- hdiutil unmount "$MOUNTDIR"
- echo java home was $JAVA_HOME
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
- echo java home is $JAVA_HOME
- export PATH=$JAVA_HOME/bin:$PATH
- echo $PATH
- cd ../clientserver
- ./gradlew -version
- java -version
script:
- ./gradlew build
before_deploy:
# # Install Sentry.io CLI
# - curl -sL https://sentry.io/get-cli/ | bash
# - sentry-cli info
- echo Version is $TRAVIS_TAG
# # Create a Sentry release
# - sentry-cli releases new "$TRAVIS_TAG"
# Create Deploy Artifacts
- ./gradlew deploy
deploy:
provider: releases
api_key: $GITHUB_RELEASE_KEY
file_glob: true
file: releases/release-*/*
overwrite: true
skip_cleanup: true
target_commitish: $TRAVIS_COMMIT
tag_name: $TRAVIS_TAG
draft: false
prerelease: true
on:
repo: $REPO
tags: true
all_branches: true
after_deploy:
# Finalize Sentry release
# - sentry-cli releases finalize "$TRAVIS_TAG"
# Associate commits with the Sentry release
# - sentry-cli releases set-commits "$TRAVIS_TAG" --auto
# Tell Sentry.io we have deployed a release
# - sentry-cli releases deploys "$TRAVIS_TAG" new -e Production
after_success:
- wget $TRAVIS_DISCORD_WEBHOOK_SCRIPT_URL
- chmod +x send.sh
- ./send.sh success $DISCORD_URL
after_failure:
- wget $TRAVIS_DISCORD_WEBHOOK_SCRIPT_URL
- chmod +x send.sh
- ./send.sh failure $DISCORD_URL
80 changes: 36 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
import org.apache.tools.ant.filters.ReplaceTokens
import java.text.SimpleDateFormat
import org.ajoberstar.grgit.*

buildscript {
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.26.1"
classpath "org.ajoberstar.grgit:grgit-gradle:4.0.1"
}

repositories {
mavenCentral()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
}

plugins {
id "org.ajoberstar.grgit" version "4.0.1"
id "com.github.spotbugs" version "3.0.0"
}
apply plugin: 'java'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'maven'
apply plugin: 'com.diffplug.gradle.spotless'


sourceCompatibility = 1.7
targetCompatibility = 1.7

if (version == 'unspecified') {
version = getVersionName()
}

ext.repo = Grgit.open(project.file('.'))

ext.repo = grgit.open(currentDir: project.file('.'))

spotless {
java {
eclipseFormatFile 'build-resources/eclipse.prefs.formatter.xml'
eclipse().configFile 'build-resources/eclipse.prefs.formatter.xml'
}
}

Expand All @@ -33,54 +43,36 @@ configurations {
}


task wrapper(type: Wrapper) {
gradleVersion='2.1'
}

install {
repositories.mavenInstaller {
pom.version = project.version;
pom.artifactId = 'clientserver';
pom.groupId = 'net.rptools.clientserver';
pom.version = project.version
pom.artifactId = 'clientserver'
pom.groupId = 'net.rptools.clientserver'
}
}


uploadArchives {
repositories.mavenDeployer {
pom.version = project.version;
pom.artifactId = 'clientserver';
pom.groupId = 'net.rptools.clientserver';
configuration = configurations.deployerJars;
pom.version = project.version
pom.artifactId = 'clientserver'
pom.groupId = 'net.rptools.clientserver'
configuration = configurations.deployerJars
repository url: 'file://' + projectDir + '/../maven-repo'
}
}

buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.11.2'
classpath 'com.diffplug.gradle.spotless:spotless:1.3.0-SNAPSHOT'
}
}


dependencies {
compile 'commons-logging:commons-logging:1.1.1'
compile 'log4j:log4j:1.2.16'
compile 'com.caucho.hessian:hessian:3.1.6'
implementation 'commons-logging:commons-logging:1.1.1'
implementation 'log4j:log4j:1.2.16'
implementation 'com.caucho.hessian:hessian:3.1.6'
testCompile group: 'junit', name: 'junit', version: '4.11'
deployerJars 'org.apache.maven.wagon:wagon-ssh:2.2'
}

ext.compileDate = new Date();
ext.yyyymmdd = (new SimpleDateFormat('yyyyMMDD')).format(ext.compileDate);
ext.compileDate = new Date()
ext.yyyymmdd = (new SimpleDateFormat('yyyyMMDD')).format((Date)ext.compileDate)


repositories {
Expand All @@ -107,9 +99,9 @@ def getVersionName() {
}
}

findbugs {
spotbugs {
ignoreFailures = true
toolVersion = '3.0.0'
toolVersion = '3.1.12'
effort = 'max'
sourceSets = [] // Empty source set so it wont run during build/check
}
Expand All @@ -119,16 +111,16 @@ pmd {
sourceSets = [] // Empty source set so it wont run during tebuild/check
}



task showBuildVersion() << {
println 'Build Version Number = ' + project.version
task showBuildVersion() {
doLast {
println 'Build Version Number = ' + project.version
}
}

jar {
manifest {
attributes 'Implementation-Title': 'clientserver',
'Implementation-Version': project.version
'Implementation-Version': project.version
}
}

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 Sep 18 13:53:52 ACST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
94 changes: 59 additions & 35 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# 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 All @@ -30,6 +64,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,31 +75,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -90,7 +105,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -114,6 +129,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down Expand Up @@ -154,11 +170,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 "$@")

# 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" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
Loading