-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gesh Markov
committed
May 22, 2018
1 parent
0adc299
commit e817779
Showing
63 changed files
with
1,391 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.* | ||
*.iml | ||
/captures | ||
/local.properties | ||
|
||
build/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
teams: | ||
- Core Android <core-android@yelp.com> |
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,39 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 27 | ||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 27 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
|
||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
dependencies { | ||
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation"org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" | ||
implementation 'com.android.support:appcompat-v7:27.1.1' | ||
implementation "io.reactivex.rxjava2:rxjava:2.1.13" | ||
implementation "com.google.guava:guava:25.0-android" | ||
|
||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.mockito:mockito-inline:2.18.3' | ||
|
||
androidTestImplementation 'org.mockito:mockito-android:2.18.3' | ||
androidTestImplementation 'com.android.support.test:runner:1.0.2' | ||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.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,7 @@ | ||
apply from:'../app.gradle' | ||
|
||
android { | ||
defaultConfig { | ||
applicationId "demo.my.myapplication" | ||
} | ||
} |
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,33 @@ | ||
open class Parent(arg: Unit = println("Parent primary default argument")) { | ||
private val a = println("Parent.a") | ||
|
||
init { | ||
println("Parent.init") | ||
} | ||
|
||
constructor(arg: Int, arg2: Unit = println("Parent secondary default argument")) : this() { | ||
println("Parent secondary constructor") | ||
} | ||
|
||
private val b = println("Parent.b") | ||
} | ||
|
||
class Child(arg: Unit = println("Child primary default argument")) : Parent(2) { | ||
val a = println("Child.a") | ||
|
||
init { | ||
println("Child.init 1") | ||
} | ||
|
||
val b = println("Child.b") | ||
|
||
constructor(arg: Int, arg2: Unit = println("Child secondary default argument")) : this() { | ||
println("Child secondary constructor") | ||
} | ||
|
||
init { | ||
println("Child.init 2") | ||
} | ||
} | ||
|
||
Child(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,19 @@ | ||
open class BackedByMap { | ||
protected val _map = mutableMapOf<String, Any?>() | ||
val map get() = _map.filterValues { it != null } | ||
} | ||
|
||
class Foo : BackedByMap() { | ||
var foo: String? by _map | ||
var bar: Int? by _map | ||
} | ||
|
||
val f = Foo() | ||
println(f.map) | ||
f.foo = "moo" | ||
f.bar = 5 | ||
println(f.map) | ||
f.foo = null | ||
println(f.map) | ||
f.bar = null | ||
println(f.map) |
Oops, something went wrong.