Skip to content

Commit

Permalink
init repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gesh Markov committed May 22, 2018
1 parent 0adc299 commit e817779
Show file tree
Hide file tree
Showing 63 changed files with 1,391 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
.*
*.iml
/captures
/local.properties

build/
254 changes: 254 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions OWNERS
@@ -0,0 +1,2 @@
teams:
- Core Android <core-android@yelp.com>
39 changes: 39 additions & 0 deletions app.gradle
@@ -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'
}
7 changes: 7 additions & 0 deletions app/build.gradle
@@ -0,0 +1,7 @@
apply from:'../app.gradle'

android {
defaultConfig {
applicationId "demo.my.myapplication"
}
}
33 changes: 33 additions & 0 deletions app/constructors.kts
@@ -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)
19 changes: 19 additions & 0 deletions app/delegates.kts
@@ -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)

0 comments on commit e817779

Please sign in to comment.