From 1c46c4ca4443bbb7345f0a9ee86c11beb007cabc Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Sat, 24 Oct 2015 17:56:52 +0300
Subject: moving to Gradle
---
.gitignore | 6 +-
build.gradle | 1 +
build.xml | 74 ---
nbproject/build-impl.xml | 1031 ----------------------------------
nbproject/genfiles.properties | 8 -
nbproject/project.properties | 69 ---
nbproject/project.xml | 13 -
src/com/juick/Group.java | 29 -
src/com/juick/Message.java | 173 ------
src/com/juick/Place.java | 33 --
src/com/juick/Tag.java | 35 --
src/com/juick/User.java | 53 --
src/main/java/com/juick/Group.java | 29 +
src/main/java/com/juick/Message.java | 173 ++++++
src/main/java/com/juick/Place.java | 33 ++
src/main/java/com/juick/Tag.java | 35 ++
src/main/java/com/juick/User.java | 53 ++
17 files changed, 327 insertions(+), 1521 deletions(-)
create mode 100644 build.gradle
delete mode 100644 build.xml
delete mode 100644 nbproject/build-impl.xml
delete mode 100644 nbproject/genfiles.properties
delete mode 100644 nbproject/project.properties
delete mode 100644 nbproject/project.xml
delete mode 100644 src/com/juick/Group.java
delete mode 100644 src/com/juick/Message.java
delete mode 100644 src/com/juick/Place.java
delete mode 100644 src/com/juick/Tag.java
delete mode 100644 src/com/juick/User.java
create mode 100644 src/main/java/com/juick/Group.java
create mode 100644 src/main/java/com/juick/Message.java
create mode 100644 src/main/java/com/juick/Place.java
create mode 100644 src/main/java/com/juick/Tag.java
create mode 100644 src/main/java/com/juick/User.java
diff --git a/.gitignore b/.gitignore
index 2a2d339d..e090eb9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/nbproject/private/
-/dist/
-/build/
\ No newline at end of file
+build/*
+.gradle/*
+*.iml
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 00000000..405a81af
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1 @@
+apply plugin: "java"
diff --git a/build.xml b/build.xml
deleted file mode 100644
index d3b97f3c..00000000
--- a/build.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Builds, tests, and runs the project com.juick.
-
-
-
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
deleted file mode 100644
index 879dd0a2..00000000
--- a/nbproject/build-impl.xml
+++ /dev/null
@@ -1,1031 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set src.dir
- Must set build.dir
- Must set dist.dir
- Must set build.classes.dir
- Must set dist.javadoc.dir
- Must set build.test.classes.dir
- Must set build.test.results.dir
- Must set build.classes.excludes
- Must set dist.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set JVM to use for profiling in profiler.info.jvm
- Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
-
-
-
-
-
- java -cp "${run.classpath.with.dist.jar}" ${main.class}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
- java -jar "${dist.jar.resolved}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must set fix.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set profile.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Some tests failed; see details above.
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set test.includes
-
-
-
- Some tests failed; see details above.
-
-
-
-
- Must select one file in the IDE or set test.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
deleted file mode 100644
index a153c6a0..00000000
--- a/nbproject/genfiles.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=94de2884
-build.xml.script.CRC32=c31a9b77
-build.xml.stylesheet.CRC32=28e38971@1.44.1.45
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=94de2884
-nbproject/build-impl.xml.script.CRC32=f66e0b65
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
diff --git a/nbproject/project.properties b/nbproject/project.properties
deleted file mode 100644
index 7ab562b8..00000000
--- a/nbproject/project.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-annotation.processing.enabled=true
-annotation.processing.enabled.in.editor=false
-annotation.processing.run.all.processors=true
-annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-application.title=com.juick
-application.vendor=ugnich
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-# Uncomment to specify the preferred debugger connection transport:
-#debug.transport=dt_socket
-debug.classpath=\
- ${run.classpath}
-debug.test.classpath=\
- ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/com.juick.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-endorsed.classpath=
-excludes=
-includes=**
-jar.compress=false
-javac.classpath=
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.processorpath=\
- ${javac.classpath}
-javac.source=1.6
-javac.target=1.6
-javac.test.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}
-javac.test.processorpath=\
- ${javac.test.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=${source.encoding}
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-meta.inf.dir=${src.dir}/META-INF
-mkdist.disabled=true
-platform.active=default_platform
-run.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=
-run.test.classpath=\
- ${javac.test.classpath}:\
- ${build.test.classes.dir}
-source.encoding=UTF-8
-src.dir=src
diff --git a/nbproject/project.xml b/nbproject/project.xml
deleted file mode 100644
index 757a6ebb..00000000
--- a/nbproject/project.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- org.netbeans.modules.java.j2seproject
-
-
- com.juick
-
-
-
-
-
-
-
diff --git a/src/com/juick/Group.java b/src/com/juick/Group.java
deleted file mode 100644
index 008d3af2..00000000
--- a/src/com/juick/Group.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Juick
- * Copyright (C) 2008-2013, Ugnich Anton
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package com.juick;
-
-/**
- *
- * @author Ugnich Anton
- */
-public class Group {
-
- public String Name = null;
- public int GID = 0;
- public int UsersCnt = 0;
-}
diff --git a/src/com/juick/Message.java b/src/com/juick/Message.java
deleted file mode 100644
index 3d2b8227..00000000
--- a/src/com/juick/Message.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Juick
- * Copyright (C) 2008-2011, Ugnich Anton
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package com.juick;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-
-/**
- *
- * @author Ugnich Anton
- */
-public class Message {
-
- public int MID = 0;
- public int RID = 0;
- public int ReplyTo = 0;
- public String Text = null;
- public User User = null;
- public ArrayList Tags = new ArrayList();
- public Date Timestamp = null;
- public String TimestampString = null;
- public int TimeAgo = 0;
- public int Privacy = 1;
- public boolean FriendsOnly = false;
- public boolean ReadOnly = false;
- public boolean Hidden = false;
- public boolean VisitorCanComment = true;
- public int Replies = 0;
- public String RepliesBy = null;
- public String AttachmentType = null;
- public String Photo = null;
- public String Video = null;
- public Place Place = null;
- public int Likes = 0;
- public boolean UserLike = false;
- public ArrayList childs = new ArrayList();
-
- public Message() {
- }
-
- public Message(Message msg) {
- MID = msg.MID;
- RID = msg.RID;
- ReplyTo = msg.ReplyTo;
- Text = msg.Text;
- User = msg.User;
- Tags = msg.Tags;
- Timestamp = msg.Timestamp;
- TimestampString = msg.TimestampString;
- TimeAgo = msg.TimeAgo;
- Privacy = msg.Privacy;
- FriendsOnly = msg.FriendsOnly;
- ReadOnly = msg.ReadOnly;
- Hidden = msg.Hidden;
- Replies = msg.Replies;
- AttachmentType = msg.AttachmentType;
- Photo = msg.Photo;
- Video = msg.Video;
- Place = msg.Place;
- Likes = msg.Likes;
- UserLike = msg.UserLike;
- childs = msg.childs;
- }
-
- public void parseTags(String strTags) {
- Tags.addAll(Arrays.asList(strTags.split(" ")));
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof Message)) {
- return false;
- }
- Message jmsg = (Message) obj;
- return (this.MID == jmsg.MID && this.RID == jmsg.RID);
- }
-
- public int compareTo(Object obj) throws ClassCastException {
- if (!(obj instanceof Message)) {
- throw new ClassCastException();
- }
- Message jmsg = (Message) obj;
-
- if (this.MID != jmsg.MID) {
- if (this.MID > jmsg.MID) {
- return -1;
- } else {
- return 1;
- }
- }
-
- if (this.RID != jmsg.RID) {
- if (this.RID < jmsg.RID) {
- return -1;
- } else {
- return 1;
- }
- }
-
- return 0;
- }
-
- public int getChildsCount() {
- int cnt = childs.size();
- for (int i = 0; i < childs.size(); i++) {
- cnt += childs.get(i).getChildsCount();
- }
- return cnt;
- }
-
- public void cleanupChilds() {
- if (!childs.isEmpty()) {
- for (int i = 0; i < childs.size(); i++) {
- childs.get(i).cleanupChilds();
- }
- childs.clear();
- }
- }
-
- public String getAttachmentURL() {
- if (AttachmentType != null) {
- String url = "http://i.juick.com/";
- url += AttachmentType.equals("mp4") ? "video" : "photos-1024";
- url += "/" + MID;
- if (RID > 0) {
- url += "-" + RID;
- }
- url += "." + AttachmentType;
- return url;
- } else {
- return null;
- }
- }
-
- public String getTagsString() {
- String ret = "";
- for (int i = 0; i < Tags.size(); i++) {
- ret += " *" + Tags.get(i);
- }
- if (FriendsOnly) {
- ret += " *friends";
- }
- if (Privacy == -2) {
- ret += " *private";
- }
- if (Privacy == -1) {
- ret += " *friends";
- }
- if (Privacy == 2) {
- ret += " *public";
- }
- if (ReadOnly) {
- ret += " *readonly";
- }
- return ret;
- }
-}
diff --git a/src/com/juick/Place.java b/src/com/juick/Place.java
deleted file mode 100644
index 7174ed6e..00000000
--- a/src/com/juick/Place.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Juick
- * Copyright (C) 2008-2011, Ugnich Anton
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package com.juick;
-
-/**
- *
- * @author Ugnich Anton
- */
-public class Place {
-
- public int pid = 0;
- public double lat = 0;
- public double lon = 0;
- public String name = null;
- public int users = 0;
- public int messages = 0;
- public int distance = 0;
-}
diff --git a/src/com/juick/Tag.java b/src/com/juick/Tag.java
deleted file mode 100644
index 3cee3358..00000000
--- a/src/com/juick/Tag.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Juick
- * Copyright (C) 2008-2011, Ugnich Anton
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package com.juick;
-
-/**
- *
- * @author Ugnich Anton
- */
-public class Tag implements Comparable {
-
- public String Name = null;
- public int TID = 0;
- public int SynonymID = 0;
- public int UsageCnt = 0;
-
- @Override
- public int compareTo(Tag o) {
- return this.Name.compareTo(o.Name);
- }
-}
diff --git a/src/com/juick/User.java b/src/com/juick/User.java
deleted file mode 100644
index e3fc0ae7..00000000
--- a/src/com/juick/User.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Juick
- * Copyright (C) 2008-2011, Ugnich Anton
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-package com.juick;
-
-/**
- *
- * @author Ugnich Anton
- */
-public class User {
-
- public int UID = 0;
- public String UName = null;
- public Object Avatar = null;
- public String FullName = null;
- public String JID = null;
- public int MessagesCount = 0;
- public String AuthHash = null;
- public boolean Banned = false;
-
- public User() {
- }
-
- public User(User u) {
- UID = u.UID;
- UName = u.UName;
- Avatar = u.Avatar;
- FullName = u.FullName;
- JID = u.JID;
- MessagesCount = u.MessagesCount;
- AuthHash = u.AuthHash;
- Banned = u.Banned;
- }
-
- @Override
- public boolean equals(Object obj) {
- return (obj instanceof User && ((User) obj).UID == this.UID);
- }
-}
diff --git a/src/main/java/com/juick/Group.java b/src/main/java/com/juick/Group.java
new file mode 100644
index 00000000..008d3af2
--- /dev/null
+++ b/src/main/java/com/juick/Group.java
@@ -0,0 +1,29 @@
+/*
+ * Juick
+ * Copyright (C) 2008-2013, Ugnich Anton
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+package com.juick;
+
+/**
+ *
+ * @author Ugnich Anton
+ */
+public class Group {
+
+ public String Name = null;
+ public int GID = 0;
+ public int UsersCnt = 0;
+}
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
new file mode 100644
index 00000000..3d2b8227
--- /dev/null
+++ b/src/main/java/com/juick/Message.java
@@ -0,0 +1,173 @@
+/*
+ * Juick
+ * Copyright (C) 2008-2011, Ugnich Anton
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+package com.juick;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+
+/**
+ *
+ * @author Ugnich Anton
+ */
+public class Message {
+
+ public int MID = 0;
+ public int RID = 0;
+ public int ReplyTo = 0;
+ public String Text = null;
+ public User User = null;
+ public ArrayList Tags = new ArrayList();
+ public Date Timestamp = null;
+ public String TimestampString = null;
+ public int TimeAgo = 0;
+ public int Privacy = 1;
+ public boolean FriendsOnly = false;
+ public boolean ReadOnly = false;
+ public boolean Hidden = false;
+ public boolean VisitorCanComment = true;
+ public int Replies = 0;
+ public String RepliesBy = null;
+ public String AttachmentType = null;
+ public String Photo = null;
+ public String Video = null;
+ public Place Place = null;
+ public int Likes = 0;
+ public boolean UserLike = false;
+ public ArrayList childs = new ArrayList();
+
+ public Message() {
+ }
+
+ public Message(Message msg) {
+ MID = msg.MID;
+ RID = msg.RID;
+ ReplyTo = msg.ReplyTo;
+ Text = msg.Text;
+ User = msg.User;
+ Tags = msg.Tags;
+ Timestamp = msg.Timestamp;
+ TimestampString = msg.TimestampString;
+ TimeAgo = msg.TimeAgo;
+ Privacy = msg.Privacy;
+ FriendsOnly = msg.FriendsOnly;
+ ReadOnly = msg.ReadOnly;
+ Hidden = msg.Hidden;
+ Replies = msg.Replies;
+ AttachmentType = msg.AttachmentType;
+ Photo = msg.Photo;
+ Video = msg.Video;
+ Place = msg.Place;
+ Likes = msg.Likes;
+ UserLike = msg.UserLike;
+ childs = msg.childs;
+ }
+
+ public void parseTags(String strTags) {
+ Tags.addAll(Arrays.asList(strTags.split(" ")));
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Message)) {
+ return false;
+ }
+ Message jmsg = (Message) obj;
+ return (this.MID == jmsg.MID && this.RID == jmsg.RID);
+ }
+
+ public int compareTo(Object obj) throws ClassCastException {
+ if (!(obj instanceof Message)) {
+ throw new ClassCastException();
+ }
+ Message jmsg = (Message) obj;
+
+ if (this.MID != jmsg.MID) {
+ if (this.MID > jmsg.MID) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+
+ if (this.RID != jmsg.RID) {
+ if (this.RID < jmsg.RID) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+
+ return 0;
+ }
+
+ public int getChildsCount() {
+ int cnt = childs.size();
+ for (int i = 0; i < childs.size(); i++) {
+ cnt += childs.get(i).getChildsCount();
+ }
+ return cnt;
+ }
+
+ public void cleanupChilds() {
+ if (!childs.isEmpty()) {
+ for (int i = 0; i < childs.size(); i++) {
+ childs.get(i).cleanupChilds();
+ }
+ childs.clear();
+ }
+ }
+
+ public String getAttachmentURL() {
+ if (AttachmentType != null) {
+ String url = "http://i.juick.com/";
+ url += AttachmentType.equals("mp4") ? "video" : "photos-1024";
+ url += "/" + MID;
+ if (RID > 0) {
+ url += "-" + RID;
+ }
+ url += "." + AttachmentType;
+ return url;
+ } else {
+ return null;
+ }
+ }
+
+ public String getTagsString() {
+ String ret = "";
+ for (int i = 0; i < Tags.size(); i++) {
+ ret += " *" + Tags.get(i);
+ }
+ if (FriendsOnly) {
+ ret += " *friends";
+ }
+ if (Privacy == -2) {
+ ret += " *private";
+ }
+ if (Privacy == -1) {
+ ret += " *friends";
+ }
+ if (Privacy == 2) {
+ ret += " *public";
+ }
+ if (ReadOnly) {
+ ret += " *readonly";
+ }
+ return ret;
+ }
+}
diff --git a/src/main/java/com/juick/Place.java b/src/main/java/com/juick/Place.java
new file mode 100644
index 00000000..7174ed6e
--- /dev/null
+++ b/src/main/java/com/juick/Place.java
@@ -0,0 +1,33 @@
+/*
+ * Juick
+ * Copyright (C) 2008-2011, Ugnich Anton
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+package com.juick;
+
+/**
+ *
+ * @author Ugnich Anton
+ */
+public class Place {
+
+ public int pid = 0;
+ public double lat = 0;
+ public double lon = 0;
+ public String name = null;
+ public int users = 0;
+ public int messages = 0;
+ public int distance = 0;
+}
diff --git a/src/main/java/com/juick/Tag.java b/src/main/java/com/juick/Tag.java
new file mode 100644
index 00000000..3cee3358
--- /dev/null
+++ b/src/main/java/com/juick/Tag.java
@@ -0,0 +1,35 @@
+/*
+ * Juick
+ * Copyright (C) 2008-2011, Ugnich Anton
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+package com.juick;
+
+/**
+ *
+ * @author Ugnich Anton
+ */
+public class Tag implements Comparable {
+
+ public String Name = null;
+ public int TID = 0;
+ public int SynonymID = 0;
+ public int UsageCnt = 0;
+
+ @Override
+ public int compareTo(Tag o) {
+ return this.Name.compareTo(o.Name);
+ }
+}
diff --git a/src/main/java/com/juick/User.java b/src/main/java/com/juick/User.java
new file mode 100644
index 00000000..e3fc0ae7
--- /dev/null
+++ b/src/main/java/com/juick/User.java
@@ -0,0 +1,53 @@
+/*
+ * Juick
+ * Copyright (C) 2008-2011, Ugnich Anton
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+package com.juick;
+
+/**
+ *
+ * @author Ugnich Anton
+ */
+public class User {
+
+ public int UID = 0;
+ public String UName = null;
+ public Object Avatar = null;
+ public String FullName = null;
+ public String JID = null;
+ public int MessagesCount = 0;
+ public String AuthHash = null;
+ public boolean Banned = false;
+
+ public User() {
+ }
+
+ public User(User u) {
+ UID = u.UID;
+ UName = u.UName;
+ Avatar = u.Avatar;
+ FullName = u.FullName;
+ JID = u.JID;
+ MessagesCount = u.MessagesCount;
+ AuthHash = u.AuthHash;
+ Banned = u.Banned;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return (obj instanceof User && ((User) obj).UID == this.UID);
+ }
+}
--
cgit v1.2.3
From b52670824b48675cfa87a903ea155c699abd0afe Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Mon, 26 Oct 2015 17:17:08 +0300
Subject: fix tags string
---
src/main/java/com/juick/Message.java | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index 3d2b8227..4db2620e 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -150,23 +150,25 @@ public class Message {
public String getTagsString() {
String ret = "";
- for (int i = 0; i < Tags.size(); i++) {
- ret += " *" + Tags.get(i);
- }
- if (FriendsOnly) {
- ret += " *friends";
- }
- if (Privacy == -2) {
- ret += " *private";
- }
- if (Privacy == -1) {
- ret += " *friends";
- }
- if (Privacy == 2) {
- ret += " *public";
- }
- if (ReadOnly) {
- ret += " *readonly";
+ if (!Tags.isEmpty()) {
+ for (int i = 0; i < Tags.size(); i++) {
+ ret += " *" + Tags.get(i);
+ }
+ if (FriendsOnly) {
+ ret += " *friends";
+ }
+ if (Privacy == -2) {
+ ret += " *private";
+ }
+ if (Privacy == -1) {
+ ret += " *friends";
+ }
+ if (Privacy == 2) {
+ ret += " *public";
+ }
+ if (ReadOnly) {
+ ret += " *readonly";
+ }
}
return ret;
}
--
cgit v1.2.3
From 86c15ac320f9757524fffd99d88dbfcae8a84217 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 4 Nov 2015 13:40:17 +0300
Subject: add unit tests
---
build.gradle | 4 ++++
src/test/java/com/juick/tests/MessageTests.java | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 src/test/java/com/juick/tests/MessageTests.java
diff --git a/build.gradle b/build.gradle
index 405a81af..c973749c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1 +1,5 @@
apply plugin: "java"
+
+dependencies {
+ testCompile 'junit:junit:4.12'
+}
diff --git a/src/test/java/com/juick/tests/MessageTests.java b/src/test/java/com/juick/tests/MessageTests.java
new file mode 100644
index 00000000..47b2d13c
--- /dev/null
+++ b/src/test/java/com/juick/tests/MessageTests.java
@@ -0,0 +1,16 @@
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.juick.Message;
+
+public class MessageTests {
+ @Test
+ public void messageTagsParser() {
+ Message msg = new Message();
+ msg.parseTags("test test" + (char)0xA0 + "2 test3");
+ assertEquals("First tag must be", "test", msg.Tags.get(0));
+ assertEquals("Third tag must be", "test3", msg.Tags.get(2));
+ assertEquals("Count of tags must be", 3, msg.Tags.size());
+ }
+}
\ No newline at end of file
--
cgit v1.2.3
From 7668b411895053aebb1e6b122a9ba54301a257ba Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 4 Nov 2015 14:19:11 +0300
Subject: refactoring
---
src/main/java/com/juick/Message.java | 66 +++++++++++++++++++------
src/main/java/com/juick/User.java | 62 ++++++++++++++++++-----
src/test/java/com/juick/tests/MessageTests.java | 2 +
3 files changed, 103 insertions(+), 27 deletions(-)
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index 4db2620e..03573aed 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -27,11 +27,13 @@ import java.util.Date;
*/
public class Message {
- public int MID = 0;
- public int RID = 0;
+ private int MID = 0;
+
+ private int RID = 0;
+
public int ReplyTo = 0;
- public String Text = null;
- public User User = null;
+ private String Text = null;
+ private User User = null;
public ArrayList Tags = new ArrayList();
public Date Timestamp = null;
public String TimestampString = null;
@@ -55,11 +57,11 @@ public class Message {
}
public Message(Message msg) {
- MID = msg.MID;
- RID = msg.RID;
+ setMID(msg.getMID());
+ setRID(msg.getRID());
ReplyTo = msg.ReplyTo;
- Text = msg.Text;
- User = msg.User;
+ setText(msg.getText());
+ setUser(msg.getUser());
Tags = msg.Tags;
Timestamp = msg.Timestamp;
TimestampString = msg.TimestampString;
@@ -88,7 +90,7 @@ public class Message {
return false;
}
Message jmsg = (Message) obj;
- return (this.MID == jmsg.MID && this.RID == jmsg.RID);
+ return (this.getMID() == jmsg.getMID() && this.getRID() == jmsg.getRID());
}
public int compareTo(Object obj) throws ClassCastException {
@@ -97,16 +99,16 @@ public class Message {
}
Message jmsg = (Message) obj;
- if (this.MID != jmsg.MID) {
- if (this.MID > jmsg.MID) {
+ if (this.getMID() != jmsg.getMID()) {
+ if (this.getMID() > jmsg.getMID()) {
return -1;
} else {
return 1;
}
}
- if (this.RID != jmsg.RID) {
- if (this.RID < jmsg.RID) {
+ if (this.getRID() != jmsg.getRID()) {
+ if (this.getRID() < jmsg.getRID()) {
return -1;
} else {
return 1;
@@ -137,9 +139,9 @@ public class Message {
if (AttachmentType != null) {
String url = "http://i.juick.com/";
url += AttachmentType.equals("mp4") ? "video" : "photos-1024";
- url += "/" + MID;
- if (RID > 0) {
- url += "-" + RID;
+ url += "/" + getMID();
+ if (getRID() > 0) {
+ url += "-" + getRID();
}
url += "." + AttachmentType;
return url;
@@ -172,4 +174,36 @@ public class Message {
}
return ret;
}
+
+ public int getMID() {
+ return MID;
+ }
+
+ public void setMID(int MID) {
+ this.MID = MID;
+ }
+
+ public int getRID() {
+ return RID;
+ }
+
+ public void setRID(int RID) {
+ this.RID = RID;
+ }
+
+ public com.juick.User getUser() {
+ return User;
+ }
+
+ public void setUser(com.juick.User user) {
+ User = user;
+ }
+
+ public String getText() {
+ return Text;
+ }
+
+ public void setText(String text) {
+ Text = text;
+ }
}
diff --git a/src/main/java/com/juick/User.java b/src/main/java/com/juick/User.java
index e3fc0ae7..40a3df96 100644
--- a/src/main/java/com/juick/User.java
+++ b/src/main/java/com/juick/User.java
@@ -23,31 +23,71 @@ package com.juick;
*/
public class User {
- public int UID = 0;
- public String UName = null;
+ private int UID = 0;
+ private String UName = null;
public Object Avatar = null;
- public String FullName = null;
- public String JID = null;
+ private String FullName = null;
+ private String JID = null;
public int MessagesCount = 0;
- public String AuthHash = null;
+ private String AuthHash = null;
public boolean Banned = false;
public User() {
}
public User(User u) {
- UID = u.UID;
- UName = u.UName;
+ setUID(u.getUID());
+ setUName(u.getUName());
Avatar = u.Avatar;
- FullName = u.FullName;
- JID = u.JID;
+ setFullName(u.getFullName());
+ setJID(u.getJID());
MessagesCount = u.MessagesCount;
- AuthHash = u.AuthHash;
+ setAuthHash(u.getAuthHash());
Banned = u.Banned;
}
@Override
public boolean equals(Object obj) {
- return (obj instanceof User && ((User) obj).UID == this.UID);
+ return (obj instanceof User && ((User) obj).getUID() == this.getUID());
+ }
+
+ public int getUID() {
+ return UID;
+ }
+
+ public void setUID(int UID) {
+ this.UID = UID;
+ }
+
+ public String getUName() {
+ return UName;
+ }
+
+ public void setUName(String UName) {
+ this.UName = UName;
+ }
+
+ public String getFullName() {
+ return FullName;
+ }
+
+ public void setFullName(String fullName) {
+ FullName = fullName;
+ }
+
+ public String getJID() {
+ return JID;
+ }
+
+ public void setJID(String JID) {
+ this.JID = JID;
+ }
+
+ public String getAuthHash() {
+ return AuthHash;
+ }
+
+ public void setAuthHash(String authHash) {
+ AuthHash = authHash;
}
}
diff --git a/src/test/java/com/juick/tests/MessageTests.java b/src/test/java/com/juick/tests/MessageTests.java
index 47b2d13c..0392c7b3 100644
--- a/src/test/java/com/juick/tests/MessageTests.java
+++ b/src/test/java/com/juick/tests/MessageTests.java
@@ -1,3 +1,5 @@
+package com.juick.tests;
+
import static org.junit.Assert.assertEquals;
import org.junit.Test;
--
cgit v1.2.3
From 77d86f9aaf5aa20542baa25685bb70bd77ae9b16 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Sat, 16 Jan 2016 17:37:02 +0300
Subject: fix possible NPE
---
src/main/java/com/juick/Message.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index 03573aed..ea1d550b 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -81,7 +81,9 @@ public class Message {
}
public void parseTags(String strTags) {
- Tags.addAll(Arrays.asList(strTags.split(" ")));
+ if (strTags != null) {
+ Tags.addAll(Arrays.asList(strTags.split(" ")));
+ }
}
@Override
--
cgit v1.2.3
From 15ceb8125d4f5c99af53ff0606076518aa4e292e Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Sat, 16 Jan 2016 18:23:47 +0300
Subject: do not keep date in string
---
src/main/java/com/juick/Message.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index ea1d550b..003622ec 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -35,8 +35,7 @@ public class Message {
private String Text = null;
private User User = null;
public ArrayList Tags = new ArrayList();
- public Date Timestamp = null;
- public String TimestampString = null;
+ private Date date = null;
public int TimeAgo = 0;
public int Privacy = 1;
public boolean FriendsOnly = false;
@@ -63,8 +62,7 @@ public class Message {
setText(msg.getText());
setUser(msg.getUser());
Tags = msg.Tags;
- Timestamp = msg.Timestamp;
- TimestampString = msg.TimestampString;
+ setDate(msg.getDate());
TimeAgo = msg.TimeAgo;
Privacy = msg.Privacy;
FriendsOnly = msg.FriendsOnly;
@@ -208,4 +206,13 @@ public class Message {
public void setText(String text) {
Text = text;
}
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+
+ this.date = date;
+ }
}
--
cgit v1.2.3
From b9879afad02609f08280155d286ba62775fcec14 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Fri, 1 Jul 2016 10:35:02 +0300
Subject: add Gradle wrapper
---
build.gradle | 9 ++
gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53637 bytes
gradle/wrapper/gradle-wrapper.properties | 6 ++
gradlew | 160 +++++++++++++++++++++++++++++++
gradlew.bat | 90 +++++++++++++++++
5 files changed, 265 insertions(+)
create mode 100644 gradle/wrapper/gradle-wrapper.jar
create mode 100644 gradle/wrapper/gradle-wrapper.properties
create mode 100644 gradlew
create mode 100644 gradlew.bat
diff --git a/build.gradle b/build.gradle
index c973749c..b860c09e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,13 @@
+buildscript {
+ dependencies {
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' // Add this line
+ }
+}
+
apply plugin: "java"
+apply plugin: 'com.github.dcendents.android-maven'
+
+group='com.github.juick'
dependencies {
testCompile 'junit:junit:4.12'
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..05ef575b
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..24ca4f54
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Oct 29 12:36:21 MSK 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 00000000..9d82f789
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/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
+
+# 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
+ # 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"`
+ 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`
+ 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 "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 00000000..8a0b282a
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@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 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
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+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%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
--
cgit v1.2.3
From fbedd4f7784f0cb651cc8105c656a1c20da0e2d5 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Fri, 1 Jul 2016 11:14:42 +0300
Subject: Gradle: remove non-working android configuration
---
build.gradle | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/build.gradle b/build.gradle
index b860c09e..c973749c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,13 +1,4 @@
-buildscript {
- dependencies {
- classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' // Add this line
- }
-}
-
apply plugin: "java"
-apply plugin: 'com.github.dcendents.android-maven'
-
-group='com.github.juick'
dependencies {
testCompile 'junit:junit:4.12'
--
cgit v1.2.3