Skip to content

Commit ab49a94

Browse files
committed
Update gradle, fix groupid.
1 parent e9322b5 commit ab49a94

File tree

7 files changed

+136
-133
lines changed

7 files changed

+136
-133
lines changed

build.gradle

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,6 @@
1717
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
1818
*/
1919

20-
/*
21-
* This has to be here... It will not be taken into account in common.gradle!
22-
*
23-
* Looks like a serious bug... See also:
24-
*
25-
* http://forums.gradle.org/gradle/topics/buildscript_in_subprojects_ignored
26-
*
27-
* We also use Spring's propdeps plugin to have a _real_ provided scope. See:
28-
*
29-
* https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin
30-
*/
31-
//buildscript {
32-
// repositories {
33-
// maven {
34-
// url "http://repo.springsource.org/plugins-release";
35-
// }
36-
// }
37-
// dependencies {
38-
// classpath(group: "org.springframework.build.gradle",
39-
// name: "propdeps-plugin", version: "0.0.5");
40-
// }
41-
//};
42-
43-
//configure(allprojects) {
44-
// apply(plugin: "propdeps");
45-
// apply(plugin: "propdeps-maven");
46-
// apply(plugin: "propdeps-idea");
47-
// apply(plugin: "propdeps-eclipse");
48-
//}
49-
5020
apply(plugin: "java");
5121
apply(plugin: "maven");
5222
apply(plugin: "signing");
@@ -56,6 +26,8 @@ apply(plugin: "eclipse");
5626

5727
apply(from: "project.gradle");
5828

29+
group = "com.github.java-json-tools";
30+
5931
/*
6032
* Repositories to use
6133
*/
@@ -103,39 +75,43 @@ artifacts {
10375
archives javadocJar;
10476
}
10577

106-
task wrapper(type: Wrapper) {
107-
gradleVersion = "1.11";
78+
wrapper {
79+
gradleVersion = "5.6.2";
10880
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
10981
}
11082

111-
task pom << {
112-
pom {}.writeTo("${projectDir}/pom.xml");
83+
task pom {
84+
doLast {
85+
pom {}.writeTo("${projectDir}/pom.xml");
86+
}
11387
}
11488

11589
/*
11690
* SIGNING
11791
*/
11892

11993
project.ext {
120-
gitrwscm = sprintf("[email protected]:fge/%s", name);
121-
gitroscm = sprintf("https://github.com/fge/%s.git", name);
122-
projectURL = sprintf("https://github.com/fge/%s", name);
94+
description = "A fully functional Java implementation of URI templates (RFC 6570)";
95+
scmUrl = sprintf("git@github.com:java-json-tools/%s.git", name)
96+
projectURL = sprintf("https://github.com/java-json-tools/%s", name);
12397
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/";
12498
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/";
12599
};
126100

127-
task checkSigningRequirements << {
128-
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
129-
def noDice = false;
130-
requiredProperties.each {
131-
if (project.properties[it] == null) {
132-
noDice = true;
133-
System.err.printf("property \"%s\" is not defined!")
101+
task checkSigningRequirements {
102+
doLast {
103+
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
104+
def noDice = false;
105+
requiredProperties.each {
106+
if (project.properties[it] == null) {
107+
noDice = true;
108+
System.err.printf("property \"%s\" is not defined!")
109+
}
134110
}
111+
if (noDice)
112+
throw new IllegalStateException("missing required properties for " +
113+
"upload");
135114
}
136-
if (noDice)
137-
throw new IllegalStateException("missing required properties for " +
138-
"upload");
139115
}
140116

141117
uploadArchives {
@@ -171,15 +147,15 @@ uploadArchives {
171147
uploadArchives.repositories.mavenDeployer
172148
]*.pom*.whenConfigured { pom ->
173149
pom.project {
174-
name "${name}";
150+
name "${project.name}";
175151
packaging "jar";
176152
description "${description}";
177153
url "${projectURL}";
178154

179155
scm {
180-
url "${gitrwscm}";
181-
connection "${gitrwscm}";
182-
developerConnection "${gitroscm}";
156+
url "${scmUrl}";
157+
connection "${scmUrl}";
158+
developerConnection "scm:git:${scmUrl}";
183159
}
184160

185161
licenses {
@@ -197,9 +173,9 @@ uploadArchives {
197173

198174
developers {
199175
developer {
200-
id "fge";
201-
name "Francis Galiegue";
202-
email "fgaliegue@gmail.com";
176+
id "huggsboson";
177+
name "John Huffaker";
178+
email "jhuffaker+java-json-tools@gmail.com";
203179
}
204180
}
205181
}

dorelease.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
#!/bin/bash
22

3-
./gradlew --recompile-scripts clean test uploadArchives
3+
# Release instructions
4+
# 1. Follow the gpg setup instructions: http://central.sonatype.org/pages/working-with-pgp-signatures.html
5+
# a. gpg2 --export-secret-keys > ~/.gnupg/secring.gpg
6+
# b. gpg2 --list-keys --keyid-format short
7+
# 2. In ~/.gradle add:
8+
# sonatypeUsername=your sonatype user name
9+
# sonatypePassword=password in vault for oss sonatype<ensure newline>
10+
#
11+
# signing.keyId=generated key in short format
12+
# signing.password=password for gpg key
13+
# signing.secretKeyRingFile=/Users/username/.gnupg/secring.gpg
14+
#
15+
# 3. ./dorelease.sh
16+
# 4. Go to UI at: https://oss.sonatype.org
17+
# 5. Login as sonatypeUsername
18+
# 6. Follow the instructions here: http://central.sonatype.org/pages/releasing-the-deployment.html
19+
20+
./gradlew clean test uploadArchives
421

gradle/wrapper/gradle-wrapper.jar

4.4 KB
Binary file not shown.
Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
1-
#
2-
# Copyright (c) 2014, Francis Galiegue ([email protected])
3-
#
4-
# This software is dual-licensed under:
5-
#
6-
# - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
7-
# later version;
8-
# - the Apache Software License (ASL) version 2.0.
9-
#
10-
# The text of this file and of both licenses is available at the root of this
11-
# project or, if you have the jar distribution, in directory META-INF/, under
12-
# the names LGPL-3.0.txt and ASL-2.0.txt respectively.
13-
#
14-
# Direct link to the sources:
15-
#
16-
# - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
17-
# - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
18-
#
19-
20-
#Sun Apr 13 23:06:13 CEST 2014
211
distributionBase=GRADLE_USER_HOME
222
distributionPath=wrapper/dists
3+
distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.2-all.zip
234
zipStoreBase=GRADLE_USER_HOME
245
zipStorePath=wrapper/dists
25-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip

gradlew

Lines changed: 61 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,59 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
218

319
##############################################################################
420
##
521
## Gradle start up script for UN*X
622
##
723
##############################################################################
824

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
1142

1243
APP_NAME="Gradle"
1344
APP_BASE_NAME=`basename "$0"`
1445

46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
1549
# Use the maximum available, or set MAX_FD != -1 to use that value.
1650
MAX_FD="maximum"
1751

18-
warn ( ) {
52+
warn () {
1953
echo "$*"
2054
}
2155

22-
die ( ) {
56+
die () {
2357
echo
2458
echo "$*"
2559
echo
@@ -30,6 +64,7 @@ die ( ) {
3064
cygwin=false
3165
msys=false
3266
darwin=false
67+
nonstop=false
3368
case "`uname`" in
3469
CYGWIN* )
3570
cygwin=true
@@ -40,31 +75,11 @@ case "`uname`" in
4075
MINGW* )
4176
msys=true
4277
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
4381
esac
4482

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
50-
# Attempt to set APP_HOME
51-
# Resolve links: $0 may be a link
52-
PRG="$0"
53-
# Need this for relative symlinks.
54-
while [ -h "$PRG" ] ; do
55-
ls=`ls -ld "$PRG"`
56-
link=`expr "$ls" : '.*-> \(.*\)$'`
57-
if expr "$link" : '/.*' > /dev/null; then
58-
PRG="$link"
59-
else
60-
PRG=`dirname "$PRG"`"/$link"
61-
fi
62-
done
63-
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
65-
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
67-
6883
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6984

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

92107
# Increase the maximum file descriptors if we can.
93-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
108+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94109
MAX_FD_LIMIT=`ulimit -H -n`
95110
if [ $? -eq 0 ] ; then
96111
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -110,10 +125,11 @@ if $darwin; then
110125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111126
fi
112127

113-
# For Cygwin, switch paths to Windows format before running java
114-
if $cygwin ; then
128+
# For Cygwin or MSYS, switch paths to Windows format before running java
129+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
115130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132+
JAVACMD=`cygpath --unix "$JAVACMD"`
117133

118134
# We build the pattern for arguments to be converted via cygpath
119135
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +170,19 @@ if $cygwin ; then
154170
esac
155171
fi
156172

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
173+
# Escape application args
174+
save () {
175+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176+
echo " "
160177
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
178+
APP_ARGS=$(save "$@")
179+
180+
# Collect all arguments for the java command, following the shell quoting and substitution rules
181+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182+
183+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185+
cd "$(dirname "$0")"
186+
fi
163187

164-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
188+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)