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

merge upstream #1

Open
wants to merge 197 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
a2796bf
Allow some Coins
exmatrikulator Oct 15, 2016
507c354
Use Retrofit.
YtvwlD Jan 27, 2017
f31ba26
UserController: Remove userToJSONPostParams.
YtvwlD Jan 27, 2017
ee43366
longrunningio: Remove unused imports.
YtvwlD Jan 27, 2017
7e23a75
Move more things into MeteroidNetworkActivity.
YtvwlD Jan 27, 2017
72e0bb7
longrunningio: Merge the different HTTP methods.
YtvwlD Feb 2, 2017
d1cefbf
Remove superflous != null checks
YtvwlD Feb 5, 2017
67985ad
Make Drink more similar to the stuff we get from Mete.
YtvwlD Feb 5, 2017
57c42f3
Make User more similar to the stuff we get from Mete.
YtvwlD Feb 5, 2017
491510a
PickUsername: Use already created api of MeteroidNetworkActivity.
YtvwlD Feb 5, 2017
7d5dec7
Move initializeRetrofit from Utility to MeteroidNetworkActivity.
YtvwlD Feb 5, 2017
180dfe4
LongRunningIO: Add logging.
YtvwlD Feb 5, 2017
5e15c79
Make more use of Retrofit and GSON.
YtvwlD Feb 5, 2017
26ef48c
Delete unused controllers.
YtvwlD Feb 5, 2017
6da2547
Add "-Xlint:unchecked" to compiler args.
YtvwlD Feb 5, 2017
ee587b9
Specify more types for LongRunningIORequest.
YtvwlD Feb 5, 2017
6aec78f
Specify types for LongRunningIOCallback.
YtvwlD Feb 5, 2017
5a869b2
LongRunningIORequest: Remove runOnUiThread.
YtvwlD Feb 5, 2017
2f642cb
Make LongRunningIOCallback the interface to implement.
YtvwlD Feb 5, 2017
21486fc
Specify more types in LongRunningIORequest.
YtvwlD Feb 5, 2017
6f7d8b2
PickUsername: Specify types for LongRunningIOCallback more explicitly.
YtvwlD Feb 5, 2017
752c6f2
Some ` = this` are no longer needed.
YtvwlD Feb 5, 2017
ca319f9
UserSettings: Split processIOResult.
YtvwlD Feb 5, 2017
1824d15
Replace getResources().getDrawable() with Context.getDrawable().
YtvwlD Feb 5, 2017
9c4efbb
Add the possibility to delete a user.
YtvwlD Feb 5, 2017
5faf76d
Reset saved userID after deletion of a user.
YtvwlD Feb 5, 2017
a193e00
Remove dependency on okhttp3.
YtvwlD Feb 5, 2017
9d55e2a
Release v2.3.0.
YtvwlD Feb 6, 2017
f4575ad
Replace donationRecommendation with price.
YtvwlD Mar 1, 2017
0197d8d
Support accounts being inactive.
YtvwlD Mar 1, 2017
ccda1b3
Make User.active default to true.
YtvwlD Mar 2, 2017
ab3cd0b
Revert "Make User.active default to true."
YtvwlD Mar 2, 2017
dc17934
Supports drinks being inactive.
YtvwlD Mar 2, 2017
a468f82
Release v2.3.1
YtvwlD Mar 2, 2017
4448427
Support buying drinks by barcode (closes #13).
YtvwlD Mar 25, 2017
9fcb3ba
"Clarify" error message in BuyDrink.
YtvwlD Mar 25, 2017
4bc247f
Move raw ressources into a folder.
YtvwlD Mar 25, 2017
d35cb32
Resize the user avatar (fixes #11).
YtvwlD Mar 25, 2017
20815fb
Display negative account balances in red (closes #12).
YtvwlD Mar 26, 2017
b6f9baf
Release v2.3.2
YtvwlD Mar 28, 2017
b211ac9
Add a floating action button for adding a user.
YtvwlD Apr 2, 2017
bd50f14
Add a floating action button for scanning a barcode.
YtvwlD Apr 2, 2017
7fd4816
Make BuyDrink fit on small screens on Gingerbread.
YtvwlD Apr 5, 2017
66f63ad
Release v2.3.3
YtvwlD Apr 5, 2017
04d32de
Show less menu entries on Gingerbread.
YtvwlD Apr 13, 2017
04127e8
PickUsername: Don't destroy the whole activity when reloading.
YtvwlD Apr 13, 2017
8a7a224
BuyDrink: Don't destroy the whole activity when reloading.
YtvwlD Apr 13, 2017
17b8427
PickUsername: Bring back the reload function for Gingerbread.
YtvwlD Apr 13, 2017
eb50d7e
Add SwipeRefreshLayout to PickUsername.
YtvwlD Apr 25, 2017
a37ab7d
PickUsername: Hide the error message on reload.
YtvwlD Apr 25, 2017
b6e9e7c
Changed buy/kaufen into donate/spenden to meet the legal base of mete.
Aug 25, 2017
a14719a
Fix ü.
YtvwlD Sep 17, 2017
df1801d
Update Android SDK.
YtvwlD Oct 6, 2017
378a0fa
Update a few dependencies.
YtvwlD Oct 6, 2017
806ddf4
Retrieve defaults for new users when creating new users.
YtvwlD Oct 6, 2017
fe0720f
Remove gradle.properties.
YtvwlD Oct 6, 2017
a58567a
More compatibility with Java 7.
YtvwlD Oct 6, 2017
087c165
Correctly pass parameters in a POST.
YtvwlD Oct 6, 2017
600f462
Add audit and redirect as properties for users.
YtvwlD Oct 8, 2017
e34ad3f
When creating or modifying a user, send JSON in the POST body.
YtvwlD Oct 8, 2017
54c689f
Add data binding to UserSettings.
YtvwlD Oct 8, 2017
cf7230f
UserSettings: setWritable
YtvwlD Oct 8, 2017
6f89488
UserSettings: Remove unused imports.
YtvwlD Oct 8, 2017
e2fac0b
Add data binding to BuyDrink.
YtvwlD Oct 8, 2017
1c15bf2
Add util.Config.
YtvwlD Oct 8, 2017
37a86f6
Config: Make default values more clear.
YtvwlD Oct 8, 2017
e268d66
Make clear what userID==0 means.
YtvwlD Oct 8, 2017
7fd75b1
Config: Logging.
YtvwlD Oct 8, 2017
4485e94
Config: Add a version.
YtvwlD Oct 8, 2017
38e1915
Upgrade Gradle.
YtvwlD Oct 8, 2017
262944f
Downgrade org.jetbrains:annotations.
YtvwlD Oct 9, 2017
5861a33
Add (simple) databinding to SetHostname.
YtvwlD Oct 9, 2017
846c318
Add (simple) databinding to PickUsername.
YtvwlD Oct 9, 2017
1cdcb96
PickUsername: Don't keep multiUserMode as a seperate variable.
YtvwlD Oct 9, 2017
0c2a201
PickUsername: Get rid of seperate NEW_USER_ID.
YtvwlD Oct 9, 2017
28adfac
Config: Set NO_USER_ID to -1.
YtvwlD Oct 9, 2017
b874272
Config: Add api_version.
YtvwlD Oct 9, 2017
286118d
Fix b8742: Correctly save the new config version.
YtvwlD Feb 8, 2018
61c6737
Move the connection to an own class.
YtvwlD Feb 8, 2018
0db2c35
Make Config a singleton.
YtvwlD Feb 10, 2018
9d36675
Make Connection a singleton.
YtvwlD Feb 10, 2018
1073b63
Correctly reset the connection.
YtvwlD Feb 10, 2018
a789fe7
Guess the API version after setting a hostname.
YtvwlD Feb 10, 2018
4d03e72
Connection: Try to upgrade the API version.
YtvwlD Feb 10, 2018
36d179e
Fix adding users.
YtvwlD Feb 10, 2018
b12da86
SetHostname: Only instantiate Connection after setting the hostname.
YtvwlD Feb 11, 2018
2155a40
PickUsername: Reset the userID when adding a new user.
YtvwlD Feb 11, 2018
f40c917
Release v2.4.0.
YtvwlD Feb 11, 2018
c9c8f6b
Let Mete handle the sorting of drinks.
YtvwlD Feb 25, 2018
d17e289
Upgrade Gradle.
YtvwlD Sep 27, 2018
f840cee
Update Retrofit.
YtvwlD Sep 27, 2018
959949c
Update SDK and Build Tools.
YtvwlD Sep 27, 2018
5157c81
Set the target SDK to 27.
YtvwlD Sep 27, 2018
7936424
Update Travis config.
YtvwlD Sep 27, 2018
5d1675a
Add missing http://.
YtvwlD Sep 27, 2018
5e11bfa
Release v2.4.1.
YtvwlD Sep 28, 2018
0b3c5a6
SetHostname: Don't treat "https://" as valid (closes #16).
YtvwlD Jan 15, 2019
6750ca9
UserSettings: Also gray out ActionBar buttons when waiting for someth…
YtvwlD Jan 15, 2019
83c28ed
BuyDrink: Handle edge case where touched item is null.
YtvwlD Jan 16, 2019
70a9429
Update Retrofit.
YtvwlD Jan 16, 2019
1c1fec2
Set Android Pie as the target version.
YtvwlD Jan 16, 2019
90e137d
Update Gradle and wrapper to 4.10.3.
YtvwlD Jan 16, 2019
13c2e44
UserSettings: Properly disable ActionBar buttons.
YtvwlD Jan 16, 2019
8fbaa49
UserSettings: Workaround for 2.3.3.
YtvwlD Jan 16, 2019
38272f7
Release v2.4.2.
YtvwlD Jan 17, 2019
b799228
UserSettings: Fix issue with ActionBar buttons being wrongly disabled.
YtvwlD Jan 17, 2019
599be32
Add MeteroidItem as an interface implemented by drinks and users.
YtvwlD Jan 20, 2019
904baa9
Add fast scrolling for selecting users and drinks.
YtvwlD Jan 20, 2019
520ed82
Allow connections over HTTP on Android 9.
YtvwlD Jan 20, 2019
3e4148f
Gradle: Use mavenCentral().
YtvwlD Jan 21, 2019
c4ec915
Warn when entering a HTTP URL.
YtvwlD Jan 21, 2019
785a3b8
BuyDrink: Fix a NullPointerException when scanning a barcode.
YtvwlD Jan 22, 2019
a93a5b2
longrunningio: Just catch network issues.
YtvwlD Jan 22, 2019
019d199
Utility: Simplify arrayToHex.
YtvwlD Jan 26, 2019
949b13f
LongRunningIO: Pass empty reponses.
YtvwlD Jan 26, 2019
8fe1189
Replace imageloader with Picasso.
YtvwlD Jan 26, 2019
eb7a618
Don't ignore exceptions that can't occur.
YtvwlD Jan 26, 2019
23c1d7c
BuyDrink: Remove error message when refreshing.
YtvwlD Jan 26, 2019
3df7f83
Utility: Use Config.
YtvwlD Feb 2, 2019
9708ddb
Update the state of the checkbox after tapping.
YtvwlD Feb 3, 2019
dc29d03
Remove MenuUtility.onClickMultiUserMode.
YtvwlD Feb 3, 2019
d154a31
Fix typo in Utility.toggleMultiUserMode.
YtvwlD Feb 3, 2019
04e1c58
Release v2.5.0.
YtvwlD Feb 3, 2019
070aee1
BuyDrink: Honour user.redirect in multi-user mode (closes #18).
YtvwlD Feb 3, 2019
9354746
Update Google Play link
YtvwlD Feb 3, 2019
6b664fc
BuyDrink: Support buying a drink via intent.
YtvwlD Feb 3, 2019
2fa4f37
Add a shortcut for the last bought drink.
YtvwlD Feb 3, 2019
934f9ed
Only install shortcuts on Android versions that support them.
YtvwlD Feb 4, 2019
59160bb
Support scanning barcodes via intent.
YtvwlD Feb 4, 2019
ada5388
Add BuyDrink.scanBarcode.
YtvwlD Feb 4, 2019
785a166
Add a shortcut when scanning a barcode.
YtvwlD Feb 4, 2019
3c7ef02
BuyDrink: Don't create shortcuts when in multi-user mode.
YtvwlD Feb 4, 2019
c3c52ea
Add an about screen.
YtvwlD Feb 4, 2019
253f4f6
About: Support going back by tapping the icon in the ActionBar.
YtvwlD Feb 4, 2019
45523df
About: Change fallback version name.
YtvwlD Feb 4, 2019
a6629bb
About: Add a link to Github
YtvwlD Feb 6, 2019
470fd99
MeteroidAdapter: Fix getPositionForSection to not throw an exception.
YtvwlD Feb 7, 2019
1c52ba9
Give more space to drinks in grid view.
YtvwlD Feb 8, 2019
36902c4
Don't show the checkbox for multi-user mode in BuyDrink.
YtvwlD Feb 9, 2019
04b9659
BuyDrink: Rework exit behavior.
YtvwlD Feb 9, 2019
ca1d20c
Start with PickUsername if in multi-user mode.
YtvwlD Feb 9, 2019
6c2cb77
Finish MainActivity directly.
YtvwlD Feb 9, 2019
fd1e24f
PickUsername: Record successful loading.
YtvwlD Feb 9, 2019
e1c6dbb
Get the LayoutInflater more easily.
YtvwlD Feb 10, 2019
25c123c
Don't increase the padding in dialogs on tablets.
YtvwlD Feb 10, 2019
d98764d
Hide the delete menu item in SetHostname.
YtvwlD Feb 10, 2019
1745870
Add class files to .gitignore.
YtvwlD Feb 10, 2019
7518d13
Move res_raw to gfx
YtvwlD Feb 10, 2019
b48e480
Add an empty glass.
YtvwlD Feb 10, 2019
6c925e8
BuyDrink: Always finish when going to PickUsername.
YtvwlD Feb 10, 2019
7c10072
Utility: Add flags to startActivity.
YtvwlD Feb 10, 2019
006222b
UserSettings: Always finish.
YtvwlD Feb 10, 2019
26856e9
Use SpotBugs.
YtvwlD Feb 13, 2019
3fcce6f
Picasso: Use placeholder instead of error.
YtvwlD May 24, 2019
16da884
Change default URL.
YtvwlD May 24, 2019
ec8d198
Bump version to 2.6.0.
YtvwlD May 24, 2019
60cbc0c
MeteroidAdapter: Fix getPositionForSection to not throw an exception.
YtvwlD Jul 11, 2019
840e703
Update Retrofit
YtvwlD Oct 20, 2019
d80027e
Update SDK, build tools and target SDK version to Android 10
YtvwlD Oct 20, 2019
3283cd0
Bump version to 2.6.1
YtvwlD Oct 20, 2019
adc0202
Fix Travis config
YtvwlD Oct 20, 2019
1a6a2c5
Show multiple dynamic shortcuts at the same time (closes #24)
YtvwlD Apr 2, 2020
5f40b0e
Notify the system which shortcut has been used
YtvwlD Apr 2, 2020
dab8260
Update dependencies where possible
YtvwlD Apr 3, 2020
e1731e7
util: Make singletons volatile
YtvwlD Apr 3, 2020
ac9b1eb
Don't duplicate code in a switch-case
YtvwlD Apr 3, 2020
f6e671b
Disable shortcuts when deselecting user and reenable them when possible
YtvwlD Apr 3, 2020
78537d9
Bump version to 2.7.0
YtvwlD Apr 3, 2020
4e27631
Replace com.melnykov.fab.FloatingActionButton with com.shamanland.fab…
YtvwlD Apr 3, 2020
582a437
Don't specify version of the Android support library
YtvwlD Apr 3, 2020
faec748
Update Android Gradle plugin to 3.3.2 (closes #22)
YtvwlD Apr 3, 2020
09965c3
Update Gradle and wrapper to 5.6.4
YtvwlD Apr 3, 2020
72edff5
build.gradle: Replace compile with implementation
YtvwlD Apr 3, 2020
82d2429
Adjust path for SpotBugs
YtvwlD Apr 3, 2020
783d7f3
Update Android Gradle plugin to 3.6.2
YtvwlD Apr 3, 2020
45a5159
Update Gradle SpotBugs plugin to 3.0.0
YtvwlD Apr 3, 2020
9883fac
Move <uses-sdk> from AndroidManifest.xml to build.gradle
YtvwlD Apr 3, 2020
cb0d492
Upgrade Gradle and wrapper to 6.3
YtvwlD Apr 3, 2020
227d513
Revert "UserSettings: Workaround for 2.3.3."
YtvwlD Jan 17, 2019
40d881e
Merge default values and v11+ ones.
YtvwlD Jan 17, 2019
67a7883
Gradle: Remove workaround for Gingerbread.
YtvwlD Jan 17, 2019
b5fe5ab
Remove code specific to pre-Holo versions of Android
YtvwlD Jan 17, 2019
dc2c212
Remove unused layout property
YtvwlD Apr 3, 2020
7467f4c
Ensure that updateShortcuts is only being called on Android 7.1 and n…
YtvwlD Apr 3, 2020
04f95f3
Remove unneeded XML schema
YtvwlD Apr 3, 2020
76a19e4
Add autofill hints on user settings page
YtvwlD Apr 3, 2020
0ca2f30
Don't specify a Java version
YtvwlD Apr 3, 2020
3525685
Use view binding for the grid view in PickUsername
YtvwlD Apr 8, 2020
166a7eb
PickUsername: Don't support adding users via the last item
YtvwlD Apr 8, 2020
75c745d
Update German translation
YtvwlD May 9, 2020
22c02d3
Update Android Gradle plugin to 4.0.1
YtvwlD Aug 9, 2020
1f70c9a
Move dataBinding and viewBinding config
YtvwlD Aug 9, 2020
60ba990
Update Picasso
YtvwlD Mar 8, 2021
5e0074f
Target Android 11
YtvwlD Mar 8, 2021
20ad08d
Try to unify support version libraries
YtvwlD Mar 8, 2021
2b71e36
Update Gradle and wrapper to 6.8.3
YtvwlD Mar 8, 2021
05fc8ed
Bump version to 2.8.0
YtvwlD Mar 9, 2021
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ local.properties
build/

*~
*.swp
*.swp
*.class
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ android:
components:
- platform-tools
- tools
- build-tools-23.0.3
- android-23
- build-tools-29.0.2
- android-30
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Small Android application to use with mete, the Matekasse of Chaosdorf.

### Where
* [Chaosdorf Wiki](https://wiki.chaosdorf.de/Meteroid)
* [Google Play](https://play.google.com/store/apps/details?id=de.chaosdorf.meteroid)
* [Google Play](https://play.google.com/store/apps/details?id=de.chaosdorf.meteroid2)
* [F-Droid](https://f-droid.org/repository/browse/?fdid=de.chaosdorf.meteroid)
* [apk](https://github.com/chaosdorf/meteroid/releases/)

Expand Down
41 changes: 41 additions & 0 deletions gfx/button_barcode.eps
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%!PS-Adobe-2.0
%%Creator: "barcode", libbarcode sample frontend
%%DocumentPaperSizes: a4
%%EndComments
%%EndProlog

%%Page: 1 1

% Printing barcode for "MeTe", scaled 1.00, encoded using "code 128-B"
% The space/bar succession is represented by the following widths (space first):
% 02112141131231122142133111122143111412331112
[
% height xpos ypos width height xpos ypos width
[75.00 11.00 15.00 1.85] [75.00 13.50 15.00 0.85]
[75.00 16.50 15.00 0.85] [70.00 21.50 20.00 0.85]
[70.00 24.50 20.00 2.85] [70.00 28.00 20.00 1.85]
[70.00 32.50 20.00 0.85] [70.00 35.00 20.00 1.85]
[70.00 38.50 20.00 0.85] [70.00 44.00 20.00 1.85]
[70.00 47.50 20.00 2.85] [70.00 52.50 20.00 0.85]
[70.00 54.50 20.00 0.85] [70.00 57.00 20.00 1.85]
[70.00 60.50 20.00 0.85] [70.00 66.50 20.00 2.85]
[70.00 69.50 20.00 0.85] [70.00 73.00 20.00 3.85]
[75.00 77.00 15.00 1.85] [75.00 82.50 15.00 2.85]
[75.00 85.50 15.00 0.85] [75.00 88.00 15.00 1.85]

] { {} forall setlinewidth moveto 0 exch rlineto stroke} bind forall
[
% char xpos ypos fontsize
[(M) 21.00 10.00 12.00]
[(e) 32.00 10.00 0.00]
[(T) 43.00 10.00 0.00]
[(e) 54.00 10.00 0.00]
] { {} forall dup 0.00 ne {
/Helvetica findfont exch scalefont setfont
} {pop} ifelse
moveto show} bind forall
% End barcode for "MeTe"

showpage
%%Trailer

Binary file added gfx/button_barcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gfx/button_barcode.xcf
Binary file not shown.
Binary file added gfx/empty_glass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
org.gradle.jvmargs=-Xmx2048M
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 Jun 17 17:57:55 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
111 changes: 68 additions & 43 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
#
# https://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,28 +75,14 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# 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

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


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand All @@ -85,7 +106,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 @@ -105,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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
Expand All @@ -134,27 +156,30 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
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"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
53 changes: 26 additions & 27 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -8,20 +24,23 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

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

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -45,34 +64,14 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz 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.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
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

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@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 %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Loading