-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Microsoft/modular-prototype
Modularization prototype.
- Loading branch information
Showing
71 changed files
with
5,968 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apply plugin: 'com.android.library' | ||
//apply plugin: 'checkstyle' | ||
|
||
def supportLibVersion = rootProject.ext.supportLibVersion | ||
|
||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles 'proguard-rules.pro' | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
lintOptions { | ||
disable 'GoogleAppIndexingWarning' | ||
} | ||
} | ||
|
||
dependencies { | ||
compile project(':base') | ||
|
||
//Mocking | ||
androidTestCompile 'org.mockito:mockito-core:1.10.19' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker:1.4' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker-dx:1.4' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker-mockito:1.4' | ||
|
||
androidTestCompile 'org.hamcrest:hamcrest-core:1.3' | ||
androidTestCompile 'org.hamcrest:hamcrest-library:1.3' | ||
testCompile 'junit:junit:4.12' | ||
|
||
androidTestCompile "com.android.support:support-annotations:$supportLibVersion" | ||
androidTestCompile 'com.android.support.test:runner:0.5' | ||
androidTestCompile 'com.android.support.test:rules:0.5' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# The following options are set by default. | ||
# Make sure they are always set, even if the default proguard config changes. | ||
-dontskipnonpubliclibraryclasses | ||
-verbose |
13 changes: 13 additions & 0 deletions
13
analytics/src/androidTest/java/avalanche/analytics/ApplicationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package avalanche.analytics; | ||
|
||
import android.app.Application; | ||
import android.test.ApplicationTestCase; | ||
|
||
/** | ||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
*/ | ||
public class ApplicationTest extends ApplicationTestCase<Application> { | ||
public ApplicationTest() { | ||
super(Application.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="avalanche.analytics"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true"> | ||
|
||
</application> | ||
|
||
</manifest> |
55 changes: 55 additions & 0 deletions
55
analytics/src/main/java/avalanche/analytics/ingestion/models/EventLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package avalanche.analytics.ingestion.models; | ||
|
||
import avalanche.base.ingestion.models.InSessionLog; | ||
|
||
/** | ||
* Event log. | ||
*/ | ||
public class EventLog extends InSessionLog { | ||
|
||
/** | ||
* Unique identifier for this event. | ||
*/ | ||
private String id; | ||
|
||
/** | ||
* Name of the event. | ||
*/ | ||
private String name; | ||
|
||
/** | ||
* Get the id value. | ||
* | ||
* @return the id value | ||
*/ | ||
public String getId() { | ||
return this.id; | ||
} | ||
|
||
/** | ||
* Set the id value. | ||
* | ||
* @param id the id value to set | ||
*/ | ||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* Get the name value. | ||
* | ||
* @return the name value | ||
*/ | ||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
/** | ||
* Set the name value. | ||
* | ||
* @param name the name value to set | ||
*/ | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
analytics/src/main/java/avalanche/analytics/ingestion/models/PageLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package avalanche.analytics.ingestion.models; | ||
|
||
import avalanche.base.ingestion.models.InSessionLog; | ||
|
||
/** | ||
* Page log. | ||
*/ | ||
public class PageLog extends InSessionLog { | ||
|
||
/** | ||
* Name of the page. | ||
*/ | ||
private String name; | ||
|
||
/** | ||
* Get the name value. | ||
* | ||
* @return the name value | ||
*/ | ||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
/** | ||
* Set the name value. | ||
* | ||
* @param name the name value to set | ||
*/ | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
analytics/src/main/java/avalanche/analytics/ingestion/models/SessionLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package avalanche.analytics.ingestion.models; | ||
|
||
import avalanche.base.ingestion.models.Log; | ||
|
||
/** | ||
* Session log. | ||
*/ | ||
public class SessionLog extends Log { | ||
|
||
/** | ||
* Unique session identifier. The same identifier must be used for end and | ||
* start session. | ||
*/ | ||
private String sid; | ||
|
||
/** | ||
* `true` to mark the end of the session, `false` if it the start of the | ||
* session. | ||
*/ | ||
private Boolean end; | ||
|
||
/** | ||
* Get the sid value. | ||
* | ||
* @return the sid value | ||
*/ | ||
public String getSid() { | ||
return this.sid; | ||
} | ||
|
||
/** | ||
* Set the sid value. | ||
* | ||
* @param sid the sid value to set | ||
*/ | ||
public void setSid(String sid) { | ||
this.sid = sid; | ||
} | ||
|
||
/** | ||
* Get the end value. | ||
* | ||
* @return the end value | ||
*/ | ||
public Boolean getEnd() { | ||
return this.end; | ||
} | ||
|
||
/** | ||
* Set the end value. | ||
* | ||
* @param end the end value to set | ||
*/ | ||
public void setEnd(Boolean end) { | ||
this.end = end; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">analytics</string> | ||
</resources> |
15 changes: 15 additions & 0 deletions
15
analytics/src/test/java/avalanche/analytics/ExampleUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package avalanche.analytics; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* To work on unit tests, switch the Test Artifact in the Build Variants view. | ||
*/ | ||
public class ExampleUnitTest { | ||
@Test | ||
public void addition_isCorrect() throws Exception { | ||
assertEquals(4, 2 + 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apply plugin: 'com.android.library' | ||
//apply plugin: 'checkstyle' | ||
|
||
def supportLibVersion = rootProject.ext.supportLibVersion | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles 'proguard-rules.pro' | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
//Mocking | ||
androidTestCompile 'org.mockito:mockito-core:2.0.59-beta' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker:1.4' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker-dx:1.4' | ||
androidTestCompile 'com.crittercism.dexmaker:dexmaker-mockito:1.4' | ||
|
||
androidTestCompile 'org.hamcrest:hamcrest-core:1.3' | ||
androidTestCompile 'org.hamcrest:hamcrest-library:1.3' | ||
testCompile 'junit:junit:4.12' | ||
|
||
androidTestCompile "com.android.support:support-annotations:$supportLibVersion" | ||
androidTestCompile 'com.android.support.test:runner:0.5' | ||
androidTestCompile 'com.android.support.test:rules:0.5' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# The following options are set by default. | ||
# Make sure they are always set, even if the default proguard config changes. | ||
-dontskipnonpubliclibraryclasses | ||
-verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="avalanche.base"> | ||
|
||
</manifest> |
12 changes: 12 additions & 0 deletions
12
base/src/main/java/avalanche/base/AvalancheDataInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package avalanche.base; | ||
|
||
/** | ||
* Created by benny on 6/17/16. | ||
*/ | ||
|
||
public interface AvalancheDataInterface { | ||
|
||
//TODO could also be an enum or whatever | ||
public boolean isHighPriority(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package avalanche.base; | ||
|
||
import android.app.Application; | ||
|
||
public interface AvalancheFeature extends Application.ActivityLifecycleCallbacks { | ||
|
||
String getName(); | ||
|
||
} |
Oops, something went wrong.