diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 000000000..3572571ad --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 000000000..922003b84 --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..3f97ca691 --- /dev/null +++ b/build.gradle @@ -0,0 +1,26 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.6.+' + } +} + +apply plugin: 'android-library' + +repositories { + mavenCentral() +} + +android { + compileSdkVersion 18 + buildToolsVersion "17.0.0" + + defaultConfig { + minSdkVersion 7 + targetSdkVersion 18 + testPackageName "com.mixpanel.android" + testInstrumentationRunner "android.test.InstrumentationTestRunner" + } +} diff --git a/build.xml b/build.xml deleted file mode 100644 index 1c5e8c434..000000000 --- a/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/custom_rules.xml b/custom_rules.xml deleted file mode 100644 index 25daa414f..000000000 --- a/custom_rules.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/demo/Hello Mixpanel/.classpath b/demo/Hello Mixpanel/.classpath deleted file mode 100755 index a4763d1ee..000000000 --- a/demo/Hello Mixpanel/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/demo/Hello Mixpanel/.project b/demo/Hello Mixpanel/.project deleted file mode 100755 index 0264c5a80..000000000 --- a/demo/Hello Mixpanel/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - Hello Mixpanel - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/demo/Hello Mixpanel/.settings/org.eclipse.jdt.core.prefs b/demo/Hello Mixpanel/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index eeb1c2ea4..000000000 --- a/demo/Hello Mixpanel/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Dec 01 12:06:30 PST 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/demo/Hello Mixpanel/AndroidManifest.xml b/demo/Hello Mixpanel/AndroidManifest.xml deleted file mode 100755 index a60a186c3..000000000 --- a/demo/Hello Mixpanel/AndroidManifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/demo/Hello Mixpanel/gen/com/mixpanel/android/hellomixpanel/R.java b/demo/Hello Mixpanel/gen/com/mixpanel/android/hellomixpanel/R.java deleted file mode 100644 index f58f59026..000000000 --- a/demo/Hello Mixpanel/gen/com/mixpanel/android/hellomixpanel/R.java +++ /dev/null @@ -1,26 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.mixpanel.android.hellomixpanel; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int icon=0x7f020000; - } - public static final class id { - public static final int button=0x7f050000; - } - public static final class layout { - public static final int main=0x7f030000; - } - public static final class string { - public static final int app_name=0x7f040001; - public static final int hello=0x7f040000; - } -} diff --git a/demo/Hello Mixpanel/project.properties b/demo/Hello Mixpanel/project.properties deleted file mode 100644 index c957743cb..000000000 --- a/demo/Hello Mixpanel/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-4 diff --git a/demo/Hello Mixpanel/res/drawable/icon.png b/demo/Hello Mixpanel/res/drawable/icon.png deleted file mode 100755 index a07c69fa5..000000000 Binary files a/demo/Hello Mixpanel/res/drawable/icon.png and /dev/null differ diff --git a/demo/Hello Mixpanel/res/layout/main.xml b/demo/Hello Mixpanel/res/layout/main.xml deleted file mode 100755 index ab55adf6d..000000000 --- a/demo/Hello Mixpanel/res/layout/main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/demo/Hello Mixpanel/res/values/strings.xml b/demo/Hello Mixpanel/res/values/strings.xml deleted file mode 100755 index d337ce2a8..000000000 --- a/demo/Hello Mixpanel/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, HelloMixpanel! - Hello Mixpanel - diff --git a/demo/Hello Mixpanel/src/com/mixpanel/android/hellomixpanel/HelloMixpanel.java b/demo/Hello Mixpanel/src/com/mixpanel/android/hellomixpanel/HelloMixpanel.java deleted file mode 100755 index 6323fbd7e..000000000 --- a/demo/Hello Mixpanel/src/com/mixpanel/android/hellomixpanel/HelloMixpanel.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.mixpanel.android.hellomixpanel; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import com.mixpanel.android.mpmetrics.MixpanelAPI; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; - -/** - * For a more comprehensive sample application, see - * - * https://github.com/mixpanel/sample-android-mixpanel-integration - */ -public class HelloMixpanel extends Activity { - - Button mButton; - MixpanelAPI mMixpanel; - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - mMixpanel = MixpanelAPI.getInstance(this, "c35a4b5163ee2c097de447765f691544"); - - mButton = (Button) findViewById(R.id.button); - mButton.setOnClickListener(new View.OnClickListener() { - - public void onClick(View arg0) { - JSONObject properties = new JSONObject(); - try { - properties.put("gender", "male"); - properties.put("age", 24); - properties.put("registered", true); - properties.put("some list", new JSONArray("[1,2,3,4,5]")); - } catch(JSONException e) { } - mMixpanel.track("Button Clicked", properties); - mMixpanel.flush(); - } - }); - } -} diff --git a/dummy/.classpath b/dummy/.classpath deleted file mode 100644 index 7bc01d9a9..000000000 --- a/dummy/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/dummy/.project b/dummy/.project deleted file mode 100644 index d85892911..000000000 --- a/dummy/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - dummy-activity - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/dummy/AndroidManifest.xml b/dummy/AndroidManifest.xml deleted file mode 100755 index e342fa1fc..000000000 --- a/dummy/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/dummy/project.properties b/dummy/project.properties deleted file mode 100644 index c957743cb..000000000 --- a/dummy/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-4 diff --git a/dummy/res/drawable/icon.png b/dummy/res/drawable/icon.png deleted file mode 100755 index a07c69fa5..000000000 Binary files a/dummy/res/drawable/icon.png and /dev/null differ diff --git a/dummy/res/layout/main.xml b/dummy/res/layout/main.xml deleted file mode 100755 index ab55adf6d..000000000 --- a/dummy/res/layout/main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/dummy/res/values/strings.xml b/dummy/res/values/strings.xml deleted file mode 100755 index d53bf199f..000000000 --- a/dummy/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, HelloMixpanel! - Dummy App - diff --git a/dummy/src/com/mixpanel/android/dummy/DummyActivity.java b/dummy/src/com/mixpanel/android/dummy/DummyActivity.java deleted file mode 100755 index a0d1d302a..000000000 --- a/dummy/src/com/mixpanel/android/dummy/DummyActivity.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mixpanel.android.dummy; - -import android.app.Activity; -import android.os.Bundle; -import android.widget.Button; - -/** - * A dummy Activity for use in unit tests. - */ -public class DummyActivity extends Activity { - - Button mButton; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - mButton = (Button) findViewById(R.id.button); - } -} diff --git a/mixpanel-android-private.iml b/mixpanel-android-private.iml new file mode 100644 index 000000000..bd82285bc --- /dev/null +++ b/mixpanel-android-private.iml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..2dca7cd26 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include ":" diff --git a/test/src/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java b/src/instrumentTest/java/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java similarity index 93% rename from test/src/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java rename to src/instrumentTest/java/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java index 88f3cdad7..a08cc00ef 100644 --- a/test/src/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java +++ b/src/instrumentTest/java/com/mixpanel/android/mpmetrics/MixpanelBasicTest.java @@ -17,32 +17,20 @@ import android.content.Context; import android.os.Bundle; -import android.test.ActivityInstrumentationTestCase2; +import android.test.AndroidTestCase; -import com.mixpanel.android.dummy.DummyActivity; - -public class MixpanelBasicTest extends - ActivityInstrumentationTestCase2 { - - public MixpanelBasicTest(){ - super("com.mixpanel.android.dummy", DummyActivity.class); - } +public class MixpanelBasicTest extends AndroidTestCase { @Override protected void setUp() throws Exception { super.setUp(); - mActivity = getActivity(); - - setActivityInitialTouchMode(false); - - - AnalyticsMessages messages = AnalyticsMessages.getInstance(mActivity); + AnalyticsMessages messages = AnalyticsMessages.getInstance(getContext()); messages.hardKill(); Thread.sleep(500); } // end of setUp() method definition public void testTrivialRunning() { - assertTrue(mActivity != null); + assertTrue(getContext() != null); } public void testCustomConfig() { @@ -69,20 +57,9 @@ public void testCustomConfig() { assertEquals(config.getDecideFallbackEndpoint(), "DecideFallback"); } - public void testReadConfig() { - // This test depends on a setting in dummy-activity AndroidManifest.xml - - // In particular - // - // - // ... - // - MPConfig config = MPConfig.readConfig(mActivity.getApplicationContext()); - assertEquals(config.getDataExpiration(), 86400000); - } - public void testGeneratedDistinctId() { String fakeToken = UUID.randomUUID().toString(); - MixpanelAPI mixpanel = MixpanelAPI.getInstance(mActivity, fakeToken); + MixpanelAPI mixpanel = MixpanelAPI.getInstance(getContext(), fakeToken); String generatedId1 = mixpanel.getDistinctId(); assertTrue(generatedId1 != null); @@ -101,7 +78,7 @@ public void testDeleteDB() { afterMap.put("added", "after"); JSONObject after = new JSONObject(afterMap); - MPDbAdapter adapter = new MPDbAdapter(mActivity, "DeleteTestDB"); + MPDbAdapter adapter = new MPDbAdapter(getContext(), "DeleteTestDB"); adapter.addJSON(before, MPDbAdapter.Table.EVENTS); adapter.addJSON(before, MPDbAdapter.Table.PEOPLE); adapter.deleteDB(); @@ -154,21 +131,21 @@ public void testLooperDestruction() { // If something terrible happens in the worker thread, we // should make sure - final MPDbAdapter explodingDb = new MPDbAdapter(mActivity) { + final MPDbAdapter explodingDb = new MPDbAdapter(getContext()) { @Override public int addJSON(JSONObject message, MPDbAdapter.Table table) { messages.add(message); throw new RuntimeException("BANG!"); } }; - final AnalyticsMessages explodingMessages = new AnalyticsMessages(mActivity) { + final AnalyticsMessages explodingMessages = new AnalyticsMessages(getContext()) { // This will throw inside of our worker thread. @Override public MPDbAdapter makeDbAdapter(Context context) { return explodingDb; } }; - MixpanelAPI mixpanel = new MixpanelAPI(mActivity, "TEST TOKEN testLooperDisaster") { + MixpanelAPI mixpanel = new MixpanelAPI(getContext(), "TEST TOKEN testLooperDisaster") { @Override protected AnalyticsMessages getAnalyticsMessages() { return explodingMessages; @@ -197,14 +174,14 @@ protected AnalyticsMessages getAnalyticsMessages() { public void testIdentifyAfterSet() { final List messages = new ArrayList(); - final AnalyticsMessages listener = new AnalyticsMessages(mActivity) { + final AnalyticsMessages listener = new AnalyticsMessages(getContext()) { @Override public void peopleMessage(JSONObject heard) { messages.add(heard); } }; - MixpanelAPI mixpanel = new MixpanelAPI(mActivity, "TEST TOKEN testIdentifyAfterSet") { + MixpanelAPI mixpanel = new MixpanelAPI(getContext(), "TEST TOKEN testIdentifyAfterSet") { @Override protected AnalyticsMessages getAnalyticsMessages() { return listener; @@ -307,7 +284,7 @@ else if(nextMessage.has("$add") && addMessage == null) { } public void testIdentifyAndGetDistinctId() { - MixpanelAPI metrics = new MixpanelAPI(mActivity, "Identify Test Token"); + MixpanelAPI metrics = new MixpanelAPI(getContext(), "Identify Test Token"); metrics.clearPreferences(); String generatedId = metrics.getDistinctId(); assertNotNull(generatedId); @@ -338,12 +315,12 @@ public void testSurveys() { return new Result(Status.SUCCEEDED, responses.remove(0)); } }; - final AnalyticsMessages mockMessages = new AnalyticsMessages(mActivity) { + final AnalyticsMessages mockMessages = new AnalyticsMessages(getContext()) { @Override protected ServerMessage getPoster() { return mockMessage; } }; - final MixpanelAPI mixpanel = new MixpanelAPI(mActivity, "TEST TOKEN testLooperDisaster") { + final MixpanelAPI mixpanel = new MixpanelAPI(getContext(), "TEST TOKEN testLooperDisaster") { @Override protected AnalyticsMessages getAnalyticsMessages() { return mockMessages; @@ -420,7 +397,7 @@ protected AnalyticsMessages getAnalyticsMessages() { public void testMessageQueuing() { final BlockingQueue messages = new LinkedBlockingQueue(); - final MPDbAdapter mockAdapter = new MPDbAdapter(mActivity) { + final MPDbAdapter mockAdapter = new MPDbAdapter(getContext()) { @Override public int addJSON(JSONObject message, MPDbAdapter.Table table) { try { @@ -472,7 +449,7 @@ public String getPeopleEndpoint() { } }; - final AnalyticsMessages listener = new AnalyticsMessages(mActivity) { + final AnalyticsMessages listener = new AnalyticsMessages(getContext()) { @Override protected MPDbAdapter makeDbAdapter(Context context) { return mockAdapter; @@ -489,7 +466,7 @@ protected ServerMessage getPoster() { } }; - MixpanelAPI metrics = new MixpanelAPI(mActivity, "Test Message Queuing") { + MixpanelAPI metrics = new MixpanelAPI(getContext(), "Test Message Queuing") { @Override protected AnalyticsMessages getAnalyticsMessages() { return listener; @@ -603,14 +580,14 @@ public ServerMessage.Result postData(String rawMessage, String endpointUrl, Stri } }; - final AnalyticsMessages listener = new AnalyticsMessages(mActivity) { + final AnalyticsMessages listener = new AnalyticsMessages(getContext()) { @Override protected ServerMessage getPoster() { return mockPoster; } }; - MixpanelAPI metrics = new MixpanelAPI(mActivity, "Test Message Queuing") { + MixpanelAPI metrics = new MixpanelAPI(getContext(), "Test Message Queuing") { @Override protected AnalyticsMessages getAnalyticsMessages() { return listener; @@ -653,7 +630,7 @@ protected AnalyticsMessages getAnalyticsMessages() { public void testTrackCharge() { final List messages = new ArrayList(); - final AnalyticsMessages listener = new AnalyticsMessages(mActivity) { + final AnalyticsMessages listener = new AnalyticsMessages(getContext()) { @Override public void eventsMessage(JSONObject heard) { throw new RuntimeException("Should not be called during this test"); @@ -676,7 +653,7 @@ protected AnalyticsMessages getAnalyticsMessages() { } } - MixpanelAPI api = new ListeningAPI(mActivity, "TRACKCHARGE TEST TOKEN"); + MixpanelAPI api = new ListeningAPI(getContext(), "TRACKCHARGE TEST TOKEN"); api.getPeople().identify("TRACKCHARGE PERSON"); JSONObject props; @@ -703,7 +680,7 @@ protected AnalyticsMessages getAnalyticsMessages() { } public void testPersistence() { - MixpanelAPI metricsOne = new MixpanelAPI(mActivity, "SAME TOKEN"); + MixpanelAPI metricsOne = new MixpanelAPI(getContext(), "SAME TOKEN"); metricsOne.clearPreferences(); JSONObject props; @@ -722,7 +699,7 @@ public void testPersistence() { // will get their values from the same persistent store. final List messages = new ArrayList(); - final AnalyticsMessages listener = new AnalyticsMessages(mActivity) { + final AnalyticsMessages listener = new AnalyticsMessages(getContext()) { @Override public void eventsMessage(JSONObject heard) { messages.add(heard); @@ -745,7 +722,7 @@ protected AnalyticsMessages getAnalyticsMessages() { } } - MixpanelAPI differentToken = new ListeningAPI(mActivity, "DIFFERENT TOKEN"); + MixpanelAPI differentToken = new ListeningAPI(getContext(), "DIFFERENT TOKEN"); differentToken.track("other event", null); differentToken.getPeople().set("other people prop", "Word"); // should be queued up. @@ -768,7 +745,7 @@ protected AnalyticsMessages getAnalyticsMessages() { messages.clear(); - MixpanelAPI metricsTwo = new ListeningAPI(mActivity, "SAME TOKEN"); + MixpanelAPI metricsTwo = new ListeningAPI(getContext(), "SAME TOKEN"); metricsTwo.track("eventname", null); metricsTwo.getPeople().set("people prop name", "Indeed"); @@ -798,6 +775,4 @@ protected AnalyticsMessages getAnalyticsMessages() { fail("Event message has an unexpected shape: " + peopleMessage.toString()); } } - - private DummyActivity mActivity; } diff --git a/AndroidManifest.xml b/src/main/AndroidManifest.xml similarity index 100% rename from AndroidManifest.xml rename to src/main/AndroidManifest.xml diff --git a/src/com/mixpanel/android/mpmetrics/AnalyticsMessages.java b/src/main/java/com/mixpanel/android/mpmetrics/AnalyticsMessages.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/AnalyticsMessages.java rename to src/main/java/com/mixpanel/android/mpmetrics/AnalyticsMessages.java diff --git a/src/com/mixpanel/android/mpmetrics/ConfigurationChecker.java b/src/main/java/com/mixpanel/android/mpmetrics/ConfigurationChecker.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/ConfigurationChecker.java rename to src/main/java/com/mixpanel/android/mpmetrics/ConfigurationChecker.java diff --git a/src/com/mixpanel/android/mpmetrics/GCMReceiver.java b/src/main/java/com/mixpanel/android/mpmetrics/GCMReceiver.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/GCMReceiver.java rename to src/main/java/com/mixpanel/android/mpmetrics/GCMReceiver.java diff --git a/src/com/mixpanel/android/mpmetrics/MPConfig.java b/src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/MPConfig.java rename to src/main/java/com/mixpanel/android/mpmetrics/MPConfig.java diff --git a/src/com/mixpanel/android/mpmetrics/MPDbAdapter.java b/src/main/java/com/mixpanel/android/mpmetrics/MPDbAdapter.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/MPDbAdapter.java rename to src/main/java/com/mixpanel/android/mpmetrics/MPDbAdapter.java diff --git a/src/com/mixpanel/android/mpmetrics/MixpanelAPI.java b/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/MixpanelAPI.java rename to src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java diff --git a/src/com/mixpanel/android/mpmetrics/ServerMessage.java b/src/main/java/com/mixpanel/android/mpmetrics/ServerMessage.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/ServerMessage.java rename to src/main/java/com/mixpanel/android/mpmetrics/ServerMessage.java diff --git a/src/com/mixpanel/android/mpmetrics/Survey.java b/src/main/java/com/mixpanel/android/mpmetrics/Survey.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/Survey.java rename to src/main/java/com/mixpanel/android/mpmetrics/Survey.java diff --git a/src/com/mixpanel/android/mpmetrics/SurveyCallbacks.java b/src/main/java/com/mixpanel/android/mpmetrics/SurveyCallbacks.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/SurveyCallbacks.java rename to src/main/java/com/mixpanel/android/mpmetrics/SurveyCallbacks.java diff --git a/src/com/mixpanel/android/mpmetrics/SystemInformation.java b/src/main/java/com/mixpanel/android/mpmetrics/SystemInformation.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/SystemInformation.java rename to src/main/java/com/mixpanel/android/mpmetrics/SystemInformation.java diff --git a/src/com/mixpanel/android/mpmetrics/WaitingPeopleRecord.java b/src/main/java/com/mixpanel/android/mpmetrics/WaitingPeopleRecord.java similarity index 100% rename from src/com/mixpanel/android/mpmetrics/WaitingPeopleRecord.java rename to src/main/java/com/mixpanel/android/mpmetrics/WaitingPeopleRecord.java diff --git a/src/com/mixpanel/android/surveys/CardCarouselLayout.java b/src/main/java/com/mixpanel/android/surveys/CardCarouselLayout.java similarity index 100% rename from src/com/mixpanel/android/surveys/CardCarouselLayout.java rename to src/main/java/com/mixpanel/android/surveys/CardCarouselLayout.java diff --git a/src/com/mixpanel/android/surveys/SurveyActivity.java b/src/main/java/com/mixpanel/android/surveys/SurveyActivity.java similarity index 100% rename from src/com/mixpanel/android/surveys/SurveyActivity.java rename to src/main/java/com/mixpanel/android/surveys/SurveyActivity.java diff --git a/src/com/mixpanel/android/surveys/SurveyChoiceView.java b/src/main/java/com/mixpanel/android/surveys/SurveyChoiceView.java similarity index 100% rename from src/com/mixpanel/android/surveys/SurveyChoiceView.java rename to src/main/java/com/mixpanel/android/surveys/SurveyChoiceView.java diff --git a/src/com/mixpanel/android/util/Base64Coder.java b/src/main/java/com/mixpanel/android/util/Base64Coder.java similarity index 100% rename from src/com/mixpanel/android/util/Base64Coder.java rename to src/main/java/com/mixpanel/android/util/Base64Coder.java diff --git a/src/com/mixpanel/android/util/StackBlurManager.java b/src/main/java/com/mixpanel/android/util/StackBlurManager.java similarity index 100% rename from src/com/mixpanel/android/util/StackBlurManager.java rename to src/main/java/com/mixpanel/android/util/StackBlurManager.java diff --git a/src/com/mixpanel/android/util/StringUtils.java b/src/main/java/com/mixpanel/android/util/StringUtils.java similarity index 100% rename from src/com/mixpanel/android/util/StringUtils.java rename to src/main/java/com/mixpanel/android/util/StringUtils.java diff --git a/res/drawable/com_mixpanel_android_arrowleft.png b/src/main/res/drawable/com_mixpanel_android_arrowleft.png similarity index 100% rename from res/drawable/com_mixpanel_android_arrowleft.png rename to src/main/res/drawable/com_mixpanel_android_arrowleft.png diff --git a/res/drawable/com_mixpanel_android_arrowright.png b/src/main/res/drawable/com_mixpanel_android_arrowright.png similarity index 100% rename from res/drawable/com_mixpanel_android_arrowright.png rename to src/main/res/drawable/com_mixpanel_android_arrowright.png diff --git a/res/drawable/com_mixpanel_android_checkmark.png b/src/main/res/drawable/com_mixpanel_android_checkmark.png similarity index 100% rename from res/drawable/com_mixpanel_android_checkmark.png rename to src/main/res/drawable/com_mixpanel_android_checkmark.png diff --git a/res/drawable/com_mixpanel_android_checkmark_states.xml b/src/main/res/drawable/com_mixpanel_android_checkmark_states.xml similarity index 100% rename from res/drawable/com_mixpanel_android_checkmark_states.xml rename to src/main/res/drawable/com_mixpanel_android_checkmark_states.xml diff --git a/res/drawable/com_mixpanel_android_choice_first_states.xml b/src/main/res/drawable/com_mixpanel_android_choice_first_states.xml similarity index 100% rename from res/drawable/com_mixpanel_android_choice_first_states.xml rename to src/main/res/drawable/com_mixpanel_android_choice_first_states.xml diff --git a/res/drawable/com_mixpanel_android_choice_last_states.xml b/src/main/res/drawable/com_mixpanel_android_choice_last_states.xml similarity index 100% rename from res/drawable/com_mixpanel_android_choice_last_states.xml rename to src/main/res/drawable/com_mixpanel_android_choice_last_states.xml diff --git a/res/drawable/com_mixpanel_android_choice_middle_states.xml b/src/main/res/drawable/com_mixpanel_android_choice_middle_states.xml similarity index 100% rename from res/drawable/com_mixpanel_android_choice_middle_states.xml rename to src/main/res/drawable/com_mixpanel_android_choice_middle_states.xml diff --git a/res/drawable/com_mixpanel_android_logo.png b/src/main/res/drawable/com_mixpanel_android_logo.png similarity index 100% rename from res/drawable/com_mixpanel_android_logo.png rename to src/main/res/drawable/com_mixpanel_android_logo.png diff --git a/res/drawable/com_mixpanel_android_nocolor_list.xml b/src/main/res/drawable/com_mixpanel_android_nocolor_list.xml similarity index 100% rename from res/drawable/com_mixpanel_android_nocolor_list.xml rename to src/main/res/drawable/com_mixpanel_android_nocolor_list.xml diff --git a/res/drawable/com_mixpanel_android_rounded_bottom.9.png b/src/main/res/drawable/com_mixpanel_android_rounded_bottom.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_rounded_bottom.9.png rename to src/main/res/drawable/com_mixpanel_android_rounded_bottom.9.png diff --git a/res/drawable/com_mixpanel_android_rounded_bottom_selected.9.png b/src/main/res/drawable/com_mixpanel_android_rounded_bottom_selected.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_rounded_bottom_selected.9.png rename to src/main/res/drawable/com_mixpanel_android_rounded_bottom_selected.9.png diff --git a/res/drawable/com_mixpanel_android_rounded_top.9.png b/src/main/res/drawable/com_mixpanel_android_rounded_top.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_rounded_top.9.png rename to src/main/res/drawable/com_mixpanel_android_rounded_top.9.png diff --git a/res/drawable/com_mixpanel_android_rounded_top_selected.9.png b/src/main/res/drawable/com_mixpanel_android_rounded_top_selected.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_rounded_top_selected.9.png rename to src/main/res/drawable/com_mixpanel_android_rounded_top_selected.9.png diff --git a/res/drawable/com_mixpanel_android_square.9.png b/src/main/res/drawable/com_mixpanel_android_square.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_square.9.png rename to src/main/res/drawable/com_mixpanel_android_square.9.png diff --git a/res/drawable/com_mixpanel_android_square_selected.9.png b/src/main/res/drawable/com_mixpanel_android_square_selected.9.png similarity index 100% rename from res/drawable/com_mixpanel_android_square_selected.9.png rename to src/main/res/drawable/com_mixpanel_android_square_selected.9.png diff --git a/res/drawable/com_mixpanel_android_text_answer_border.xml b/src/main/res/drawable/com_mixpanel_android_text_answer_border.xml similarity index 100% rename from res/drawable/com_mixpanel_android_text_answer_border.xml rename to src/main/res/drawable/com_mixpanel_android_text_answer_border.xml diff --git a/res/layout/com_mixpanel_android_activity_survey.xml b/src/main/res/layout/com_mixpanel_android_activity_survey.xml similarity index 100% rename from res/layout/com_mixpanel_android_activity_survey.xml rename to src/main/res/layout/com_mixpanel_android_activity_survey.xml diff --git a/res/layout/com_mixpanel_android_first_choice_answer.xml b/src/main/res/layout/com_mixpanel_android_first_choice_answer.xml similarity index 100% rename from res/layout/com_mixpanel_android_first_choice_answer.xml rename to src/main/res/layout/com_mixpanel_android_first_choice_answer.xml diff --git a/res/layout/com_mixpanel_android_last_choice_answer.xml b/src/main/res/layout/com_mixpanel_android_last_choice_answer.xml similarity index 100% rename from res/layout/com_mixpanel_android_last_choice_answer.xml rename to src/main/res/layout/com_mixpanel_android_last_choice_answer.xml diff --git a/res/layout/com_mixpanel_android_middle_choice_answer.xml b/src/main/res/layout/com_mixpanel_android_middle_choice_answer.xml similarity index 100% rename from res/layout/com_mixpanel_android_middle_choice_answer.xml rename to src/main/res/layout/com_mixpanel_android_middle_choice_answer.xml diff --git a/res/layout/com_mixpanel_android_question_card.xml b/src/main/res/layout/com_mixpanel_android_question_card.xml similarity index 100% rename from res/layout/com_mixpanel_android_question_card.xml rename to src/main/res/layout/com_mixpanel_android_question_card.xml diff --git a/res/values/strings.xml b/src/main/res/values/strings.xml similarity index 100% rename from res/values/strings.xml rename to src/main/res/values/strings.xml diff --git a/test/.classpath b/test/.classpath deleted file mode 100644 index 1bcd98a94..000000000 --- a/test/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/test/.project b/test/.project deleted file mode 100644 index fda66ae01..000000000 --- a/test/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - mixpanel-android-tests - - - Hello Mixpanel - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/test/AndroidManifest.xml b/test/AndroidManifest.xml deleted file mode 100644 index 41711e7cd..000000000 --- a/test/AndroidManifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/test/build.gradle b/test/build.gradle deleted file mode 100644 index 22abd6006..000000000 --- a/test/build.gradle +++ /dev/null @@ -1,36 +0,0 @@ -apply plugin: 'android' - -dependencies { - compile fileTree(dir: 'libs', include: '*.jar') - compile project(':mixpanel-android:dummy') - compile project(':mixpanel-android') -} - -android { - compileSdkVersion 8 - buildToolsVersion "18.1.1" - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - resources.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - res.srcDirs = ['res'] - assets.srcDirs = ['assets'] - } - - // Move the tests to tests/java, tests/res, etc... - instrumentTest.setRoot('tests') - - // Move the build types to build-types/ - // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... - // This moves them out of them default location under src//... which would - // conflict with src/ being used by the main source set. - // Adding new build types or product flavors should be accompanied - // by a similar customization. - debug.setRoot('build-types/debug') - release.setRoot('build-types/release') - } -} diff --git a/test/proguard-project.txt b/test/proguard-project.txt deleted file mode 100644 index f2fe1559a..000000000 --- a/test/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/test/project.properties b/test/project.properties deleted file mode 100644 index 85aac5401..000000000 --- a/test/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-8 diff --git a/test/res/drawable-hdpi/ic_launcher.png b/test/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 96a442e5b..000000000 Binary files a/test/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/test/res/drawable-ldpi/ic_launcher.png b/test/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 99238729d..000000000 Binary files a/test/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/test/res/drawable-mdpi/ic_launcher.png b/test/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 359047dfa..000000000 Binary files a/test/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/test/res/drawable-xhdpi/ic_launcher.png b/test/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 71c6d760f..000000000 Binary files a/test/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/test/res/values/strings.xml b/test/res/values/strings.xml deleted file mode 100644 index c81ffbd9e..000000000 --- a/test/res/values/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - Mixpanel-android-testsTest - - \ No newline at end of file