"> 382
                        } else {
383
                            msg.setMaxLines(Integer.MAX_VALUE);
384
                        }
385
                        toolBar.setVisibility(View.GONE);
386
                    } else {
387
                        fold.setImageResource(R.drawable.fold_icon);
388
                        msg.setMovementMethod(null);
389
                        msg.setMaxLines(3);
390
                        msg.setScrollbarFadingEnabled(true);
391
                        msg.setEllipsize(TextUtils.TruncateAt.END);
392
                        msg.setText(str);  // 重新赋值,解决...不出现的问题
393
394
                        toolBar.setVisibility(View.VISIBLE);
395
                    }
396
                }
397
            });
398
399
            if (TextUtils.isEmpty(bean.headImgUrl)) {
400
                Picasso.with(getContext())
401
                        .load(R.drawable.icon_face2_0)
402
                        .placeholder(R.drawable.icon_face2_0)
403
                        .error(R.drawable.icon_face2_0)
404
                        .transform(new CircleTransform())
405
                        .into(headImage);
406
            } else {
407
                Picasso.with(getContext())
408
                        .load("http://cdz.evcharge.cc/zhannew/uploadfile/" + bean.headImgUrl)
409
                        .placeholder(R.drawable.icon_face2_0)
410
                        .error(R.drawable.icon_face2_0)
411
                        .transform(new CircleTransform())
412
                        .into(headImage);
413
            }
414
415
            nickName.setText(bean.nickName);
416
            addDate.setText(bean.addDate);
417
418
419
            rootView.findViewById(R.id.bottomView).setOnClickListener(new View.OnClickListener() {
420
                @Override
421
                public void onClick(View view) {
422
                }
423
            });
424
425
            setVideoAllCallBack();
426
        }
427
428
        private void doLike(final ChatRecommendBean bean) {
429
            String url = MainApplication.urlNew + "/topic/like.do";
430
            Map<String, String> map = new HashMap<>();
431
            map.put("targetId", bean.targetId + "");
432
            map.put("targetType", bean.targetType + "");
433
            map.put("flag", "1");
434
            map.put("authorId", bean.addUserId + "");
435
            CommonParams.addCommonParams(map);
436
437
            OkHttpUtils.get().url(url).params(map).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
438
                @Override
439
                public void onError(Call call, Exception e) {
440
                    ToastUtil.showToast(getContext(), "点赞失败,请重试", Toast.LENGTH_SHORT);
441
                }
442
443
                @Override
444
                public void onResponse(String res) {
445
                    String code = JsonUtils.getKeyResult(res, "code");
446
                    String desc = JsonUtils.getKeyResult(res, "desc");
447
                    if ("1000".equals(code)) {
448
                        bean.likeFlg = 1;
449
                        bean.likeNums += 1;
450
                        likeLabel.setText(bean.likeNums > 999 ? "999+" : bean.likeNums + "");
451
                        if (bean.likeFlg == 1) {
452
                            likeIcon.setImageResource(R.drawable.like_red_icon);
453
                        } else {
454
                            likeIcon.setImageResource(R.drawable.like_icon);
455
                        }
456
                    } else {
457
                        ToastUtil.showToast(getContext(), desc, Toast.LENGTH_SHORT);
458
                    }
459
                }
460
            });
461
        }
462
463
        private void playOrPause() {
464
            int currentStatue = videoPlayer.getCurrentState();
465
            if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
466
                playIcon.setVisibility(View.VISIBLE);
467
                videoPlayer.onVideoPause();
468
            } else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
469
                playIcon.setVisibility(View.GONE);
470
                videoPlayer.onVideoResume(false);
471
            } else {
472
                playIcon.setVisibility(View.GONE);
473
                videoPlayer.startPlayLogic();
474
            }
475
        }
476
477
        public void play() {
478
            if (videoPlayer == null) {
479
                return;
480
            }
481
482
            playIcon.setVisibility(View.GONE);
483
            int currentStatue = videoPlayer.getCurrentState();
484
            if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
485
            } else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
486
                videoPlayer.onVideoResume(true);
487
            } else {
488
                videoPlayer.startPlayLogic();
489
            }
490
        }
491
492
        private void initPicturesView(View rootView, ChatRecommendBean bean) {
493
            TextView positionTextView = rootView.findViewById(R.id.position);
494
            positionTextView.setText(bean.title);
495
        }
496
497
        private void setVideoAllCallBack() {
294 498
            videoPlayer.setVideoAllCallBack(new VideoAllCallBack() {
295 499
                @Override
296 500
                public void onAutoComplete(String s, Object... objects) {
@ -391,101 +595,6 @@ public class ChatContentListActivity extends AppCompatActivity {
391 595
                public void onClickStartThumb(String s, Object... objects) {
392 596
                }
393 597
            });
394
395
            ImageView thumbImageView = new ImageView(getContext());
396
            thumbImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
397
            ImageDisplayUtils.dispalyImg(getContext(), bean.coverImgUrl, thumbImageView);
398
            videoPlayer.setThumbImageView(thumbImageView);
399
400
            rootView.findViewById(R.id.videoPlayerCover).setOnClickListener(new View.OnClickListener() {
401
                @Override
402
                public void onClick(View view) {
403
                    if (ProfileManager.getInstance().getMakeSureNetworkForView(getContext())) {
404
                        playOrPause();
405
                    } else {
406
                        new AlertDialog(getContext()).builder()
407
                                .setMsg("目前正在移动网络下,是否播放")
408
                                .setPositiveButton("继续播放", new View.OnClickListener() {
409
                                    @Override
410
                                    public void onClick(View view) {
411
                                        ProfileManager.getInstance().setMakeSureNetworkForView(getContext());
412
                                        playOrPause();
413
                                    }
414
                                }).setNegativeButton("暂停播放", null).show();
415
                    }
416
                }
417
            });
418
419
            rootView.findViewById(R.id.like).setOnClickListener(new View.OnClickListener() {
420
                @Override
421
                public void onClick(View view) {
422
                    doLike(bean);
423
                }
424
            });
425
        }
426
427
        private void doLike(final ChatRecommendBean bean) {
428
            String url = MainApplication.urlNew + "/topic/like.do";
429
            Map<String, String> map = new HashMap<>();
430
            map.put("targetId", bean.targetId + "");
431
            map.put("targetType", bean.targetType + "");
432
            map.put("flag", "1");
433
            map.put("authorId", bean.addUserId + "");
434
            CommonParams.addCommonParams(map);
435
436
            OkHttpUtils.get().url(url).params(map).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
437
                @Override
438
                public void onError(Call call, Exception e) {
439
                    ToastUtil.showToast(getContext(), "点赞失败,请重试", Toast.LENGTH_SHORT);
440
                }
441
442
                @Override
443
                public void onResponse(String res) {
444
                    String code = JsonUtils.getKeyResult(res, "code");
445
                    String desc = JsonUtils.getKeyResult(res, "desc");
446
                    if ("1000".equals(code)) {
447
                        bean.likeFlg = 1;
448
                        bean.likeNums += 1;
449
450
                    } else {
451
                        ToastUtil.showToast(getContext(), desc, Toast.LENGTH_SHORT);
452
                    }
453
                }
454
            });
455
        }
456
457
        private void playOrPause() {
458
            int currentStatue = videoPlayer.getCurrentState();
459
            if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
460
                playIcon.setVisibility(View.VISIBLE);
461
                videoPlayer.onVideoPause();
462
            } else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
463
                playIcon.setVisibility(View.GONE);
464
                videoPlayer.onVideoResume(false);
465
            } else {
466
                playIcon.setVisibility(View.GONE);
467
                videoPlayer.startPlayLogic();
468
            }
469
        }
470
471
        public void play() {
472
            if (videoPlayer == null) {
473
                return;
474
            }
475
476
            playIcon.setVisibility(View.GONE);
477
            int currentStatue = videoPlayer.getCurrentState();
478
            if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
479
            } else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
480
                videoPlayer.onVideoResume(true);
481
            } else {
482
                videoPlayer.startPlayLogic();
483
            }
484
        }
485
486
        private void initPicturesView(View rootView, ChatRecommendBean bean) {
487
            TextView positionTextView = rootView.findViewById(R.id.position);
488
            positionTextView.setText(bean.title);
489 598
        }
490 599
    }
491 600
}

+ 2 - 0
app/src/main/java/com/electric/chargingpile/data/ChatRecommendBean.java

@ -15,6 +15,7 @@ public class ChatRecommendBean implements Serializable {
15 15
    public String title;
16 16
    public String name;
17 17
    public long addTime;
18
    public String addDate;
18 19
    public long topicId;
19 20
    public long joinNums;
20 21
    public int visitNums;
@ -43,6 +44,7 @@ public class ChatRecommendBean implements Serializable {
43 44
                ", title='" + title + '\'' +
44 45
                ", name='" + name + '\'' +
45 46
                ", addTime=" + addTime +
47
                ", addDate='" + addDate + '\'' +
46 48
                ", topicId=" + topicId +
47 49
                ", joinNums=" + joinNums +
48 50
                ", visitNums=" + visitNums +

+ 1 - 0
app/src/main/java/com/electric/chargingpile/util/DateUtils.java

@ -29,6 +29,7 @@ public class DateUtils {
29 29
        return sf.format(d);
30 30
    }
31 31
32
32 33
    /*将字符串转为时间戳*/
33 34
    public static long getStringToDate(String time) {
34 35
        sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

+ 5 - 0
app/src/main/res/drawable/topic_shape.xml

@ -0,0 +1,5 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <corners android:radius="4dp" />
4
    <solid android:color="#6e303030" />
5
</shape>

+ 2 - 2
app/src/main/res/drawable/video_player_progressbar.xml

@ -3,14 +3,14 @@
3 3
    <!--默认颜色-->
4 4
    <item android:id="@android:id/background">
5 5
        <shape>
6
            <solid android:color="#424242" />
6
            <solid android:color="#505050" />
7 7
        </shape>
8 8
    </item>
9 9
    <!--进度颜色-->
10 10
    <item android:id="@android:id/progress">
11 11
        <clip>
12 12
            <shape>
13
                <solid android:color="@color/white" />
13
                <solid android:color="#00edb2" />
14 14
            </shape>
15 15
        </clip>
16 16
    </item>

+ 2 - 0
app/src/main/res/layout/activity_chat_content.xml

@ -33,6 +33,7 @@
33 33
            android:layout_height="wrap_content"
34 34
            android:src="@drawable/app_talk_video_icon"
35 35
            android:visibility="gone"
36
            android:contentDescription="播放按钮图标"
36 37
            app:layout_constraintBottom_toBottomOf="@+id/coverImage"
37 38
            app:layout_constraintLeft_toLeftOf="@+id/coverImage"
38 39
            app:layout_constraintRight_toRightOf="@+id/coverImage"
@ -93,6 +94,7 @@
93 94
                    android:id="@+id/headImage"
94 95
                    android:layout_width="20dp"
95 96
                    android:layout_height="20dp"
97
                    android:contentDescription="用户头像"
96 98
                    app:layout_constraintBottom_toBottomOf="parent"
97 99
                    app:layout_constraintStart_toStartOf="parent"
98 100
                    app:layout_constraintTop_toTopOf="parent"

+ 162 - 2
app/src/main/res/layout/fragment_chat_content_video.xml

@ -16,6 +16,7 @@
16 16
        app:layout_constraintTop_toTopOf="parent"></com.electric.chargingpile.video.VideoPlayer>
17 17
18 18
    <ImageView
19
        android:id="@+id/coverVideoPlayerProgress"
19 20
        android:layout_width="match_parent"
20 21
        android:layout_height="1.5dp"
21 22
        android:background="#424242"
@ -71,15 +72,174 @@
71 72
72 73
    </android.support.constraint.ConstraintLayout>
73 74
75
    <!-- 底部视图 -->
74 76
    <android.support.constraint.ConstraintLayout
75 77
        android:id="@+id/bottomView"
76 78
        android:layout_width="match_parent"
77 79
        android:layout_height="wrap_content"
78 80
        android:layout_marginBottom="-40dp"
79
        app:layout_constraintBottom_toBottomOf="parent">
81
        app:layout_constraintBottom_toBottomOf="parent"
82
        tools:background="#f38654">
80 83
84
        <!-- 主题信息及关闭按钮 -->
81 85
        <android.support.constraint.ConstraintLayout
82 86
            android:layout_width="match_parent"
87
            android:layout_height="52dp"
88
            app:layout_constraintBottom_toTopOf="@+id/userInfo"
89
            tools:background="#39bd00">
90
91
            <android.support.constraint.ConstraintLayout
92
                android:id="@+id/topicInfo"
93
                android:layout_width="wrap_content"
94
                android:layout_height="30dp"
95
                android:layout_marginLeft="15dp"
96
                android:background="@drawable/topic_shape"
97
                android:paddingLeft="12dp"
98
                android:paddingRight="12dp"
99
                app:layout_constraintBottom_toBottomOf="parent"
100
                app:layout_constraintLeft_toLeftOf="parent"
101
                app:layout_constraintTop_toTopOf="parent"
102
                tools:background="#ff967d">
103
104
                <ImageView
105
                    android:id="@+id/topicIcon"
106
                    android:layout_width="wrap_content"
107
                    android:layout_height="wrap_content"
108
                    android:src="@drawable/topic_icon"
109
                    app:layout_constraintBottom_toBottomOf="parent"
110
                    app:layout_constraintLeft_toLeftOf="parent"
111
                    app:layout_constraintTop_toTopOf="parent" />
112
113
                <TextView
114
                    android:id="@+id/topicTitle"
115
                    android:layout_width="wrap_content"
116
                    android:layout_height="wrap_content"
117
                    android:paddingLeft="5dp"
118
                    android:textColor="#ffffff"
119
                    android:textSize="11sp"
120
                    app:layout_constraintBottom_toBottomOf="parent"
121
                    app:layout_constraintLeft_toRightOf="@+id/topicIcon"
122
                    app:layout_constraintTop_toTopOf="parent"
123
                    tools:text="#新能源#" />
124
            </android.support.constraint.ConstraintLayout>
125
126
127
            <ImageView
128
                android:id="@+id/closeUnfold"
129
                android:layout_width="22dp"
130
                android:layout_height="22dp"
131
                android:layout_margin="15dp"
132
                android:src="@drawable/icon_close"
133
                android:visibility="gone"
134
                app:layout_constraintBottom_toBottomOf="parent"
135
                app:layout_constraintRight_toRightOf="parent"
136
                app:layout_constraintTop_toTopOf="parent"
137
                tools:background="#013369"
138
                tools:visibility="visible" />
139
        </android.support.constraint.ConstraintLayout>
140
        <!-- 用户信息 -->
141
        <android.support.constraint.ConstraintLayout
142
            android:id="@+id/userInfo"
143
            android:layout_width="wrap_content"
144
            android:layout_height="wrap_content"
145
            android:layout_marginBottom="5dp"
146
            android:paddingLeft="15dp"
147
            app:layout_constraintBottom_toTopOf="@+id/msgContainer"
148
            app:layout_constraintLeft_toLeftOf="parent"
149
            tools:background="#33ccff">
150
151
            <ImageView
152
                android:id="@+id/headImage"
153
                android:layout_width="20dp"
154
                android:layout_height="20dp"
155
                app:layout_constraintBottom_toBottomOf="parent"
156
                app:layout_constraintLeft_toLeftOf="parent"
157
                app:layout_constraintTop_toTopOf="parent"
158
                tools:srcCompat="@tools:sample/avatars[1]" />
159
160
            <android.support.constraint.ConstraintLayout
161
                android:layout_width="wrap_content"
162
                android:layout_height="wrap_content"
163
                android:paddingLeft="5dp"
164
                app:layout_constraintBottom_toBottomOf="parent"
165
                app:layout_constraintLeft_toRightOf="@+id/headImage"
166
                app:layout_constraintTop_toTopOf="parent">
167
168
                <TextView
169
                    android:id="@+id/nickName"
170
                    android:layout_width="wrap_content"
171
                    android:layout_height="wrap_content"
172
                    android:textColor="#ffffff"
173
                    android:textSize="12sp"
174
                    app:layout_constraintLeft_toLeftOf="parent"
175
                    app:layout_constraintTop_toTopOf="parent"
176
                    tools:text="小电" />
177
178
                <TextView
179
                    android:id="@+id/addDate"
180
                    android:layout_width="wrap_content"
181
                    android:layout_height="wrap_content"
182
                    android:textColor="#888888"
183
                    android:textSize="12sp"
184
                    app:layout_constraintBottom_toBottomOf="parent"
185
                    app:layout_constraintLeft_toLeftOf="parent"
186
                    app:layout_constraintTop_toBottomOf="@+id/nickName"
187
                    tools:text="2019-05-29 16:28" />
188
            </android.support.constraint.ConstraintLayout>
189
        </android.support.constraint.ConstraintLayout>
190
191
        <!-- 信息 -->
192
        <android.support.constraint.ConstraintLayout
193
            android:id="@+id/msgContainer"
194
            android:layout_width="match_parent"
195
            android:layout_height="wrap_content"
196
            app:layout_constraintBottom_toTopOf="@+id/progressBar">
197
198
            <TextView
199
                android:id="@+id/msg"
200
                android:layout_width="0dp"
201
                android:layout_height="wrap_content"
202
                android:layout_marginRight="30dp"
203
                android:ellipsize="end"
204
                android:paddingLeft="40dp"
205
                android:paddingRight="10dp"
206
                android:paddingBottom="25dp"
207
                android:scrollbarStyle="outsideOverlay"
208
                android:scrollbars="vertical"
209
                android:textColor="#e2e2e2"
210
                android:textSize="14sp"
211
                app:layout_constraintBottom_toBottomOf="parent"
212
                app:layout_constraintLeft_toLeftOf="parent"
213
                app:layout_constraintRight_toRightOf="parent"
214
                app:layout_constraintTop_toTopOf="parent"
215
                tools:text="迪克啥看来当减肥考虑送到,迪克啥看来当减肥考虑送到迪克啥看来当减肥考虑送到" />
216
217
            <ImageView
218
                android:id="@+id/fold"
219
                android:layout_width="42dp"
220
                android:layout_height="62dp"
221
                android:paddingLeft="15dp"
222
                android:paddingTop="25dp"
223
                android:paddingRight="15dp"
224
                android:paddingBottom="25dp"
225
                android:src="@drawable/unfold_icon"
226
                app:layout_constraintBottom_toBottomOf="parent"
227
                app:layout_constraintRight_toRightOf="parent" />
228
        </android.support.constraint.ConstraintLayout>
229
        <!-- 自定义进度条 -->
230
        <ProgressBar
231
            android:id="@+id/progressBar"
232
            style="@android:style/Widget.ProgressBar.Horizontal"
233
            android:layout_width="match_parent"
234
            android:layout_height="1dp"
235
            android:max="100"
236
            android:progressDrawable="@drawable/video_player_progressbar"
237
            app:layout_constraintBottom_toTopOf="@+id/toolBar"
238
            tools:progress="50" />
239
        <!-- 底部工具栏 -->
240
        <android.support.constraint.ConstraintLayout
241
            android:id="@+id/toolBar"
242
            android:layout_width="match_parent"
83 243
            android:layout_height="50dp"
84 244
            app:layout_constraintBottom_toBottomOf="parent"
85 245
            tools:background="#00aee6">
@ -201,6 +361,6 @@
201 361
            </android.support.constraint.ConstraintLayout>
202 362
203 363
        </android.support.constraint.ConstraintLayout>
204
    </android.support.constraint.ConstraintLayout>
205 364
365
    </android.support.constraint.ConstraintLayout>
206 366
</android.support.constraint.ConstraintLayout>

cdzApp - Gogs: Go Git Service

充电桩app代码

gradlew 5.0KB

    #!/usr/bin/env bash ############################################################################## ## ## 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="" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn ( ) { echo "$*" } die ( ) { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=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. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock 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 APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((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" ;; 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=("$@") } eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"