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
import kotlin.system.measureTimeMillis | |
fun main(args : Array<String>){ | |
val time = measureTimeMillis{ | |
val fibo = generateSequence(1 to 1) { | |
it.second to it.first + it.second | |
}.map{ it.second } | |
println(fibo.take(10000).joinToString()) | |
} |
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
implementation(Dependencies.Kotlin.kotlin_std) | |
implementation(Dependencies.SupportLibs.appcompat) | |
implementation(Dependencies.SupportLibs.constraint_layout) |
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
private const val kotlinVersion = "1.3.31" | |
private const val androidGradleVersion = "3.4.0" | |
//support libs | |
private const val appcompatVersion = "1.0.0" | |
private const val constraintLayoutVersion = "1.1.3" | |
//test libs | |
private const val junitVersion = "4.12" | |
private const val runnerVersion = "1.1.0" |
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
plugins { | |
`kotlin-dsl` | |
} | |
repositories { | |
jcenter() | |
} |
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
dependencies { | |
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) | |
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.31") | |
implementation("com.android.support:appcompat-v7:28.0.0") | |
implementation("com.android.support.constraint:constraint-layout:1.1.3") | |
testImplementation("junit:junit:4.12") | |
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
dependencies { | |
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) | |
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21") | |
implementation("com.android.support:appcompat-v7:28.0.0") | |
implementation("com.android.support.constraint:constraint-layout:1.1.3") | |
testImplementation("junit:junit:4.12") | |
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
android { | |
compileSdkVersion(28) | |
defaultConfig { | |
applicationId = "com.nrohmen.kotlinandroidcleanarchitecture" | |
minSdkVersion(19) | |
targetSdkVersion(28) | |
versionCode = 1 | |
versionName = "1.0" | |
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner" | |
} |
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
//from: | |
apply plugin: "com.android.application" | |
apply plugin: "kotlin-android" | |
apply plugin: "kotlin-android-extensions" | |
//to: | |
plugins{ | |
id("com.android.application") | |
kotlin("android") | |
kotlin("android.extensions") |
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
// before | |
include ':app' | |
// after | |
include(":app") |
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
distributionBase=GRADLE_USER_HOME | |
distributionPath=wrapper/dists | |
zipStoreBase=GRADLE_USER_HOME | |
zipStorePath=wrapper/dists | |
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip |
NewerOlder