diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000000..7084f5aced --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +lonelyTwitter \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000000..96cc43efa6 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000000..e7bedf3377 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000000..1bbc21dc23 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/appcompat_v7_18_0_0.xml b/.idea/libraries/appcompat_v7_18_0_0.xml new file mode 100644 index 0000000000..031124ef1e --- /dev/null +++ b/.idea/libraries/appcompat_v7_18_0_0.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/gson_2_5.xml b/.idea/libraries/gson_2_5.xml new file mode 100644 index 0000000000..45bea3da3c --- /dev/null +++ b/.idea/libraries/gson_2_5.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/support_v4_18_0_0.xml b/.idea/libraries/support_v4_18_0_0.xml new file mode 100644 index 0000000000..645ed89112 --- /dev/null +++ b/.idea/libraries/support_v4_18_0_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..f7095715d0 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..c15affbaa2 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000000..7f68460d8b --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..6564d52db2 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..790b060882 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,2045 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1455063614526 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/app.iml b/app/app.iml index db23a3c322..1613d851bc 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -65,28 +65,26 @@ - - + + - + - - - - - - + - + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 1cc9ef1961..8a05c42eb1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.application' - android { compileSdkVersion 18 buildToolsVersion "22.0.1" @@ -21,3 +20,8 @@ android { } } } + +dependencies { + compile 'com.google.code.gson:gson:2.5' + compile 'com.android.support:appcompat-v7:18.0.0' +} \ No newline at end of file diff --git a/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivityTest.java b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivityTest.java new file mode 100644 index 0000000000..aa427b4017 --- /dev/null +++ b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivityTest.java @@ -0,0 +1,61 @@ +package ca.ualberta.cs.lonelytwitter; + +import android.content.Intent; +import android.test.ActivityInstrumentationTestCase2; +import android.test.ViewAsserts; +import android.widget.TextView; + +/** + * Created by sajediba on 2/8/16. + */ +public class IntentReaderActivityTest extends ActivityInstrumentationTestCase2{ + + public IntentReaderActivityTest() { + super(IntentReaderActivity.class); + } + + // + // + public void testSendText(){ + Intent intent = new Intent(); + intent.putExtra(IntentReaderActivity.TEXT_TO_TRANSFORM_KEY, "message 1"); + + setActivityIntent(intent); + IntentReaderActivity ira = (IntentReaderActivity) getActivity(); + + assertEquals("IntentReaderActivity should get the text from intent", + "message 1", ira.getText()); + } + + public void testDisplayText(){ + Intent intent = new Intent(); + intent.putExtra(IntentReaderActivity.TEXT_TO_TRANSFORM_KEY, "message 2"); + + setActivityIntent(intent); + IntentReaderActivity ira = (IntentReaderActivity) getActivity(); + + TextView textView = (TextView) ira.findViewById(R.id.intentText); + assertEquals("The text should be displayed!", "message 2", + textView.getText().toString()); + } + + public void testDoubleText(){ + Intent intent = new Intent(); + intent.putExtra(IntentReaderActivity.TEXT_TO_TRANSFORM_KEY, "message 3"); + intent.putExtra(IntentReaderActivity.MODE_OF_TRANSFORM_KEY, + IntentReaderActivity.DOUBLE); + + setActivityIntent(intent); + IntentReaderActivity ira = (IntentReaderActivity) getActivity(); + assertEquals("The text should be repeated twice!", "message 3message 3", + ira.getText()); + } + + // + // + + //TODO: Add your code here ... +//------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------- +} diff --git a/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivityUITest.java b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivityUITest.java new file mode 100644 index 0000000000..725a078fa1 --- /dev/null +++ b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivityUITest.java @@ -0,0 +1,58 @@ +package ca.ualberta.cs.lonelytwitter; + +import android.app.Activity; +import android.app.Instrumentation; +import android.test.ActivityInstrumentationTestCase2; +import android.test.UiThreadTest; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.EditText; + +/** + * Created by sajediba on 2/8/16. + */ +public class LonelyTwitterActivityUITest extends ActivityInstrumentationTestCase2 { + + Instrumentation instrumentation; + Activity activity; + EditText textInput; + + public LonelyTwitterActivityUITest() { + super(LonelyTwitterActivity.class); + } + + protected void setUp() throws Exception { + super.setUp(); + instrumentation = getInstrumentation(); + activity = getActivity(); + textInput = ((EditText) activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.body)); + } + + //makeTweet(text) fills in the input text field and clicks the 'save' button for the activity under test: + private void makeTweet(String text) { + assertNotNull(activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save)); + textInput.setText(text); + ((Button) activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save)).performClick(); + } + + // + // + @UiThreadTest + public void testMakeTweet(){ + LonelyTwitterActivity lta = (LonelyTwitterActivity) getActivity(); + int oldLength = lta.getAdapter().getCount(); + + makeTweet("test string"); + ArrayAdapter arrayAdapter = lta.getAdapter(); + assertEquals(oldLength + 1, arrayAdapter.getCount()); + + assertTrue("Did you add a Tweet object?", + arrayAdapter.getItem(arrayAdapter.getCount()-1) instanceof Tweet); + + Tweet tweet = arrayAdapter.getItem(arrayAdapter.getCount()-1); + assertEquals("This is not the text we expected!", tweet.getMessage(), + "test string"); + } + // + // +} diff --git a/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/TweetListTest.java b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/TweetListTest.java new file mode 100644 index 0000000000..62955eb642 --- /dev/null +++ b/app/src/androidTest/java/ca/ualberta/cs/lonelytwitter/TweetListTest.java @@ -0,0 +1,57 @@ +package ca.ualberta.cs.lonelytwitter; + +import android.test.ActivityInstrumentationTestCase2; + +/** + * Created by watts1 on 1/26/16. + */ +public class TweetListTest extends ActivityInstrumentationTestCase2{ + public TweetListTest(){ + super(LonelyTwitterActivity.class); + } + + public void testAddTweet(){ + TweetList tweets = new TweetList(); + Tweet tweet = new NormalTweet("Test tweet"); + + tweets.add(tweet); + + assertTrue(tweets.hasTweet(tweet)); + + } + + public void testHasTweet(){ + TweetList tweets = new TweetList(); + Tweet tweet = new NormalTweet("Hello"); + + assertFalse(tweets.hasTweet(tweet)); + + tweets.add(tweet); + tweets.hasTweet(tweet); + + assertTrue(tweets.hasTweet(tweet)); + + } + + public void testDeleteTweet(){ + TweetList tweets = new TweetList(); + Tweet tweet = new NormalTweet("Test tweet"); + + tweets.add(tweet); + tweets.delete(tweet); + + assertFalse(tweets.hasTweet(tweet)); + } + + public void testGetTweet(){ + TweetList tweets = new TweetList(); + Tweet tweet = new NormalTweet("Test tweet"); + + tweets.add(tweet); + Tweet returnedTweet = tweets.getTweet(0); + + assertEquals(returnedTweet.getMessage(),tweet.getMessage()); + assertEquals(returnedTweet.getDate(),tweet.getDate()); + } + +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 271f52eb7b..5b7ea22000 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,22 +2,27 @@ + android:versionName="1.0"> + + + + + android:label="@string/app_name"> + android:label="@string/app_name"> + - \ No newline at end of file + diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/ImportantTweet.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/ImportantTweet.java new file mode 100644 index 0000000000..c3ed2b95ca --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/ImportantTweet.java @@ -0,0 +1,29 @@ +package ca.ualberta.cs.lonelytwitter; + +import java.util.Date; + +/** + * Created by romansky on 1/12/16. + */ +public class ImportantTweet extends Tweet implements Tweetable { + @Override + public Boolean isImportant() { + return Boolean.TRUE; + } + + public ImportantTweet(Date date, String message) { + super(date, message); + } + + public ImportantTweet(String message) { + super(message); + } + + public Date getDate() { + return this.date; + } + + public String getMessage() { + return "!IMPORTANT! " + this.message; + } +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivity.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivity.java new file mode 100644 index 0000000000..80ebe5b589 --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/IntentReaderActivity.java @@ -0,0 +1,60 @@ +package ca.ualberta.cs.lonelytwitter; + +import android.app.Activity; +import android.content.Intent; +import android.support.v7.app.ActionBarActivity; +import android.os.Bundle; +import android.widget.TextView; + +public class IntentReaderActivity extends Activity { + + public static final String TEXT_TO_TRANSFORM_KEY = "TEXT"; + public static final String MODE_OF_TRANSFORM_KEY = "TRANSFORM"; + + public static final int NORMAL = 1; + public static final int REVERSE = 2; + public static final int DOUBLE = 3; + + private String text; + private int mode; + + public String getText() { + return text; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_intent_reader); + + // + // + Intent intent = getIntent(); + mode = intent.getIntExtra(MODE_OF_TRANSFORM_KEY, NORMAL); + if (intent.getStringExtra(TEXT_TO_TRANSFORM_KEY) != null) + text = transformText(intent.getStringExtra(TEXT_TO_TRANSFORM_KEY)); + else + text = "default text"; + + ((TextView)findViewById(R.id.intentText)).setText(text); + // + // + } + + public String transformText(String str) { + switch (mode) { + case REVERSE: + char[] str2 = str.toCharArray(); + for (int i = 0; i < str2.length / 2; i++) { + char tmp = str2[i]; + str2[i] = str2[str2.length - i -1]; + str2[str2.length - i - 1] = tmp; + }//for. + return new String(str2); + case DOUBLE: + return str + str; + default: + return str; + } + } +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivity.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivity.java index cd5feb6966..36e7cb62a6 100644 --- a/app/src/main/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivity.java +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/LonelyTwitterActivity.java @@ -1,16 +1,20 @@ package ca.ualberta.cs.lonelytwitter; import java.io.BufferedReader; +import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Date; import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; @@ -18,11 +22,26 @@ import android.widget.EditText; import android.widget.ListView; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; + public class LonelyTwitterActivity extends Activity { private static final String FILENAME = "file.sav"; private EditText bodyText; private ListView oldTweetsList; + + private ArrayList tweets = new ArrayList(); + + public ArrayAdapter getAdapter() { + return adapter; + } + + public void setAdapter(ArrayAdapter adapter) { + this.adapter = adapter; + } + + private ArrayAdapter adapter; /** Called when the activity is first created. */ @Override @@ -39,9 +58,25 @@ public void onCreate(Bundle savedInstanceState) { public void onClick(View v) { setResult(RESULT_OK); String text = bodyText.getText().toString(); - saveInFile(text, new Date(System.currentTimeMillis())); - finish(); + Tweet latestTweet = new NormalTweet(text); + ImportantTweet latestImportantTweet = new ImportantTweet(text); + // latestTweet.setMessage(latestTweet.getMessage() + "!"); + tweets.add(latestTweet); + adapter.notifyDataSetChanged(); + saveInFile(); + //saveInFile(text, new Date(System.currentTimeMillis())); + //finish(); + // + // + Intent intent = new Intent(LonelyTwitterActivity.this, + IntentReaderActivity.class); + intent.putExtra(IntentReaderActivity.TEXT_TO_TRANSFORM_KEY, text); + intent.putExtra(IntentReaderActivity.MODE_OF_TRANSFORM_KEY, + IntentReaderActivity.NORMAL); + startActivity(intent); + // + // } }); } @@ -50,46 +85,47 @@ public void onClick(View v) { protected void onStart() { // TODO Auto-generated method stub super.onStart(); - String[] tweets = loadFromFile(); - ArrayAdapter adapter = new ArrayAdapter(this, + //String[] tweets = loadFromFile(); + loadFromFile(); + adapter = new ArrayAdapter(this, R.layout.list_item, tweets); oldTweetsList.setAdapter(adapter); } - private String[] loadFromFile() { - ArrayList tweets = new ArrayList(); + private void loadFromFile() { try { FileInputStream fis = openFileInput(FILENAME); BufferedReader in = new BufferedReader(new InputStreamReader(fis)); - String line = in.readLine(); - while (line != null) { - tweets.add(line); - line = in.readLine(); - } + Gson gson = new Gson(); + + // Took from https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/Gson.html 01-19 2016 + Type listType = new TypeToken>() {}.getType(); + tweets = gson.fromJson(in, listType); } catch (FileNotFoundException e) { // TODO Auto-generated catch block - e.printStackTrace(); + tweets = new ArrayList(); } catch (IOException e) { // TODO Auto-generated catch block - e.printStackTrace(); + throw new RuntimeException(); } - return tweets.toArray(new String[tweets.size()]); } - private void saveInFile(String text, Date date) { + private void saveInFile() { try { FileOutputStream fos = openFileOutput(FILENAME, - Context.MODE_APPEND); - fos.write(new String(date.toString() + " | " + text) - .getBytes()); + 0); + BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); + Gson gson = new Gson(); + gson.toJson(tweets, out); + out.flush(); fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block - e.printStackTrace(); + throw new RuntimeException(); } catch (IOException e) { // TODO Auto-generated catch block - e.printStackTrace(); + throw new RuntimeException(); } } } \ No newline at end of file diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/NormalTweet.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/NormalTweet.java new file mode 100644 index 0000000000..87ab5bc6e5 --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/NormalTweet.java @@ -0,0 +1,29 @@ +package ca.ualberta.cs.lonelytwitter; + +import java.util.Date; + +/** + * Created by romansky on 1/12/16. + */ +public class NormalTweet extends Tweet implements Tweetable { + public NormalTweet(Date date, String message) { + super(date, message); + } + + public NormalTweet(String message) { + super(message); + } + + public Date getDate() { + return this.date; + } + + public String getMessage() { + return this.message; + } + + @Override + public Boolean isImportant() { + return Boolean.FALSE; + } +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweet.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweet.java new file mode 100644 index 0000000000..253c818379 --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweet.java @@ -0,0 +1,46 @@ +package ca.ualberta.cs.lonelytwitter; + +import java.util.Date; + +/** + * Created by romansky on 1/12/16. + */ +public abstract class Tweet { + protected Date date; + protected String message; + + public abstract Boolean isImportant(); + + public Tweet(Date date, String message) { + this.date = date; + this.message = message; + } + + public Tweet(String message) { + this.message = message; + this.date = new Date(); + } + + public Date getDate() { + return this.date; + } + + public String getMessage() { + return this.message; + } + public void setMessage(String message) throws TweetTooLongException { + if (message.length() > 140) { + throw new TweetTooLongException(); + } + this.message = message; + } + + public void setDate(Date date) { + this.date = date; + } + + @Override + public String toString(){ + return date.toString() + " | " + message; + } +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetList.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetList.java new file mode 100644 index 0000000000..d1618edc20 --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetList.java @@ -0,0 +1,27 @@ +package ca.ualberta.cs.lonelytwitter; + +import java.util.ArrayList; + +/** + * Created by watts1 on 1/26/16. + */ +public class TweetList { + private ArrayList tweets= new ArrayList(); + + public void add(Tweet tweet){ + tweets.add(tweet); + } + + public boolean hasTweet(Tweet tweet){ + return tweets.contains(tweet); + } + + public Tweet getTweet(int index){ + return tweets.get(index); + } + + public void delete(Tweet tweet){ + tweets.remove(tweet); + } + +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetTooLongException.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetTooLongException.java new file mode 100644 index 0000000000..9beb706457 --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/TweetTooLongException.java @@ -0,0 +1,7 @@ +package ca.ualberta.cs.lonelytwitter; + +/** + * Created by romansky on 1/12/16. + */ +public class TweetTooLongException extends Exception { +} diff --git a/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweetable.java b/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweetable.java new file mode 100644 index 0000000000..d7f67cca8f --- /dev/null +++ b/app/src/main/java/ca/ualberta/cs/lonelytwitter/Tweetable.java @@ -0,0 +1,12 @@ +package ca.ualberta.cs.lonelytwitter; + +import java.util.Date; + +/** + * Created by romansky on 1/12/16. + */ +public interface Tweetable { + // getMessage returns the tweet message. + public String getMessage(); + public Date getDate(); +} diff --git a/app/src/main/res/layout/activity_intent_reader.xml b/app/src/main/res/layout/activity_intent_reader.xml new file mode 100644 index 0000000000..0f3cb17482 --- /dev/null +++ b/app/src/main/res/layout/activity_intent_reader.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000000..63fc816444 --- /dev/null +++ b/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ + + + 64dp + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000000..47c8224673 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + + 16dp + 16dp + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 919a1e2245..6ac2ff61a3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2,8 +2,9 @@ Joshua said: - LonelyTwitter + LonelyTwitter Save Clear - + Hello World! + \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..f23df6e463 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Oct 21 11:34:03 PDT 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 index 91a7e269e1..9d82f78915 100755 --- a/gradlew +++ b/gradlew @@ -42,11 +42,6 @@ case "`uname`" in ;; 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" @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -114,6 +109,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/lonelyTwitter.iml b/lonelyTwitter.iml index 8c831df98f..c8cb2a390b 100644 --- a/lonelyTwitter.iml +++ b/lonelyTwitter.iml @@ -1,5 +1,5 @@ - +