Skip to content

Commit 66e11dc

Browse files
committed
Initial commit
0 parents  commit 66e11dc

34 files changed

+1432
-0
lines changed

.gitignore

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
*.iml
2+
.gradle
3+
.idea/
4+
/local.properties
5+
/.idea/workspace.xml
6+
/.idea/libraries
7+
.DS_Store
8+
/build
9+
/captures
10+
.externalNativeBuild
11+
12+
13+
# Created by https://www.gitignore.io/api/java,gradle,intellij,osx,windows,linux
14+
15+
### Intellij ###
16+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
17+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
18+
19+
# User-specific stuff:
20+
.idea/**/workspace.xml
21+
.idea/**/tasks.xml
22+
23+
# Sensitive or high-churn files:
24+
.idea/**/dataSources/
25+
.idea/**/dataSources.ids
26+
.idea/**/dataSources.xml
27+
.idea/**/dataSources.local.xml
28+
.idea/**/sqlDataSources.xml
29+
.idea/**/dynamic.xml
30+
.idea/**/uiDesigner.xml
31+
32+
# Gradle:
33+
.idea/**/gradle.xml
34+
.idea/**/libraries
35+
36+
# Mongo Explorer plugin:
37+
.idea/**/mongoSettings.xml
38+
39+
## File-based project format:
40+
*.iws
41+
42+
## Plugin-specific files:
43+
44+
# IntelliJ
45+
/out/
46+
47+
# mpeltonen/sbt-idea plugin
48+
.idea_modules/
49+
50+
# JIRA plugin
51+
atlassian-ide-plugin.xml
52+
53+
# Crashlytics plugin (for Android Studio and IntelliJ)
54+
com_crashlytics_export_strings.xml
55+
crashlytics.properties
56+
crashlytics-build.properties
57+
fabric.properties
58+
59+
### Intellij Patch ###
60+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
61+
62+
# *.iml
63+
# modules.xml
64+
# .idea/misc.xml
65+
# *.ipr
66+
67+
### Java ###
68+
# Compiled class file
69+
*.class
70+
71+
# Log file
72+
*.log
73+
74+
# BlueJ files
75+
*.ctxt
76+
77+
# Mobile Tools for Java (J2ME)
78+
.mtj.tmp/
79+
80+
# Package Files #
81+
*.jar
82+
*.war
83+
*.ear
84+
*.zip
85+
*.tar.gz
86+
*.rar
87+
88+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
89+
hs_err_pid*
90+
91+
### Linux ###
92+
*~
93+
94+
# temporary files which can be created if a process still has a handle open of a deleted file
95+
.fuse_hidden*
96+
97+
# KDE directory preferences
98+
.directory
99+
100+
# Linux trash folder which might appear on any partition or disk
101+
.Trash-*
102+
103+
# .nfs files are created when an open file is removed but is still being accessed
104+
.nfs*
105+
106+
### OSX ###
107+
*.DS_Store
108+
.AppleDouble
109+
.LSOverride
110+
111+
# Icon must end with two \r
112+
Icon
113+
114+
115+
# Thumbnails
116+
._*
117+
118+
# Files that might appear in the root of a volume
119+
.DocumentRevisions-V100
120+
.fseventsd
121+
.Spotlight-V100
122+
.TemporaryItems
123+
.Trashes
124+
.VolumeIcon.icns
125+
.com.apple.timemachine.donotpresent
126+
127+
# Directories potentially created on remote AFP share
128+
.AppleDB
129+
.AppleDesktop
130+
Network Trash Folder
131+
Temporary Items
132+
.apdisk
133+
134+
### Windows ###
135+
# Windows thumbnail cache files
136+
Thumbs.db
137+
ehthumbs.db
138+
ehthumbs_vista.db
139+
140+
# Folder config file
141+
Desktop.ini
142+
143+
# Recycle Bin used on file shares
144+
$RECYCLE.BIN/
145+
146+
# Windows Installer files
147+
*.cab
148+
*.msi
149+
*.msm
150+
*.msp
151+
152+
# Windows shortcuts
153+
*.lnk
154+
155+
### Gradle ###
156+
.gradle
157+
/build/
158+
159+
# Ignore Gradle GUI config
160+
gradle-app.setting
161+
162+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
163+
!gradle-wrapper.jar
164+
165+
# Cache of project
166+
.gradletasknamecache
167+
168+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
169+
# gradle/wrapper/gradle-wrapper.properties
170+
171+
# End of https://www.gitignore.io/api/java,gradle,intellij,osx,windows,linux

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-kapt'
4+
5+
buildscript {
6+
ext {
7+
dagger_version = "2.8"
8+
rx_version = "2.0.3"
9+
rx_android_version = "2.0.1"
10+
leak_canary_version = "1.5"
11+
butterkinfe_version = "8.4.0"
12+
support_version = "25.1.0"
13+
target_sdk_version = 25
14+
}
15+
}
16+
17+
android {
18+
compileSdkVersion target_sdk_version
19+
buildToolsVersion "25.0.2"
20+
defaultConfig {
21+
applicationId "com.minivac.mini"
22+
minSdkVersion 21
23+
targetSdkVersion target_sdk_version
24+
versionCode 1
25+
versionName "1.0"
26+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
27+
}
28+
buildTypes {
29+
release {
30+
minifyEnabled false
31+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
32+
}
33+
}
34+
sourceSets {
35+
main.java.srcDirs += 'src/main/kotlin'
36+
}
37+
}
38+
39+
dependencies {
40+
compile fileTree(dir: 'libs', include: ['*.jar'])
41+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
42+
exclude group: 'com.android.support', module: 'support-annotations'
43+
})
44+
compile 'com.android.support:appcompat-v7:25.1.1'
45+
testCompile 'junit:junit:4.12'
46+
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
47+
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
48+
49+
//Dagger
50+
compile "com.google.dagger:dagger:$dagger_version"
51+
kapt "com.google.dagger:dagger-compiler:$dagger_version"
52+
53+
//Logs
54+
compile 'com.jakewharton.timber:timber:4.3.1'
55+
56+
//Rx
57+
compile "io.reactivex.rxjava2:rxjava:$rx_version"
58+
compile "io.reactivex.rxjava2:rxandroid:$rx_android_version"
59+
60+
//Test
61+
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
62+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
63+
exclude group: 'com.android.support', module: 'support-annotations'
64+
})
65+
66+
}
67+
repositories {
68+
mavenCentral()
69+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/pablo/development/android-sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}

app/src/main/AndroidManifest.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.minivac.mini">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity android:name=".MainActivity">
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN"/>
14+
15+
<category android:name="android.intent.category.LAUNCHER"/>
16+
</intent-filter>
17+
</activity>
18+
</application>
19+
20+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.minivac.mini
2+
3+
import android.os.Bundle
4+
import android.support.v7.app.AppCompatActivity
5+
import com.minivac.mini.flux.Action
6+
import com.minivac.mini.flux.Dispatcher
7+
import io.reactivex.schedulers.Schedulers
8+
import timber.log.Timber
9+
import java.util.*
10+
11+
class MainActivity : AppCompatActivity() {
12+
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
super.onCreate(savedInstanceState)
15+
setContentView(R.layout.activity_main)
16+
17+
val dummyAction = DummyAction()
18+
dummyAction.tags
19+
Timber.d("TAGS: %s", Arrays.toString(dummyAction.tags))
20+
21+
Dispatcher.subscribe(tag = DummyAction::class, fn = { a ->
22+
a.tags;
23+
})
24+
25+
Dispatcher.subscribeFlowable(tag = Any::class, fn = {
26+
it.observeOn(Schedulers.io())
27+
.filter { it == null }
28+
.subscribe()
29+
})
30+
31+
Dispatcher.subscribeFlowable(tag = DummyAction::class) {
32+
it.filter { Any::class.java in it.tags }.subscribe {
33+
34+
}.dispose()
35+
}.dispose()
36+
37+
Dispatcher.dispatch(dummyAction)
38+
}
39+
40+
class DummyAction : Action
41+
}

0 commit comments

Comments
 (0)