├── .gitignore ├── .gradle ├── 5.2.1 │ ├── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock │ ├── fileChanges │ │ └── last-build.bin │ ├── fileContent │ │ └── fileContent.lock │ ├── fileHashes │ │ ├── fileHashes.bin │ │ └── fileHashes.lock │ └── gc.properties ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ ├── cache.properties │ └── outputFiles.bin └── vcs-1 │ └── gc.properties ├── .idea ├── .gitignore ├── .name ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml └── vcs.xml ├── README.md ├── build.gradle ├── build ├── classes │ └── kotlin │ │ └── main │ │ └── META-INF │ │ └── KotlinWorkshop.kotlin_module └── kotlin │ └── compileKotlin │ ├── build-history.bin │ ├── caches-jvm │ ├── inputs │ │ ├── source-to-output.tab │ │ ├── source-to-output.tab.keystream │ │ ├── source-to-output.tab.keystream.len │ │ ├── source-to-output.tab.len │ │ ├── source-to-output.tab.values.at │ │ ├── source-to-output.tab_i │ │ └── source-to-output.tab_i.len │ ├── jvm │ │ └── kotlin │ │ │ ├── internal-name-to-source.tab │ │ │ ├── internal-name-to-source.tab.keystream │ │ │ ├── internal-name-to-source.tab.keystream.len │ │ │ ├── internal-name-to-source.tab.len │ │ │ ├── internal-name-to-source.tab.values.at │ │ │ ├── internal-name-to-source.tab_i │ │ │ ├── internal-name-to-source.tab_i.len │ │ │ ├── package-parts.tab │ │ │ ├── package-parts.tab.keystream │ │ │ ├── package-parts.tab.keystream.len │ │ │ ├── package-parts.tab.len │ │ │ ├── package-parts.tab.values.at │ │ │ ├── package-parts.tab_i │ │ │ ├── package-parts.tab_i.len │ │ │ ├── proto.tab │ │ │ ├── proto.tab.keystream │ │ │ ├── proto.tab.keystream.len │ │ │ ├── proto.tab.len │ │ │ ├── proto.tab.values.at │ │ │ ├── proto.tab_i │ │ │ ├── proto.tab_i.len │ │ │ ├── source-to-classes.tab │ │ │ ├── source-to-classes.tab.keystream │ │ │ ├── source-to-classes.tab.keystream.len │ │ │ ├── source-to-classes.tab.len │ │ │ ├── source-to-classes.tab.values.at │ │ │ ├── source-to-classes.tab_i │ │ │ └── source-to-classes.tab_i.len │ └── lookups │ │ ├── counters.tab │ │ ├── file-to-id.tab │ │ ├── file-to-id.tab.keystream │ │ ├── file-to-id.tab.keystream.len │ │ ├── file-to-id.tab.len │ │ ├── file-to-id.tab.values.at │ │ ├── file-to-id.tab_i │ │ ├── file-to-id.tab_i.len │ │ ├── id-to-file.tab │ │ ├── id-to-file.tab.keystream │ │ ├── id-to-file.tab.keystream.len │ │ ├── id-to-file.tab.len │ │ ├── id-to-file.tab.values.at │ │ ├── id-to-file.tab_i │ │ ├── id-to-file.tab_i.len │ │ ├── lookups.tab │ │ ├── lookups.tab.keystream │ │ ├── lookups.tab.keystream.len │ │ ├── lookups.tab.len │ │ ├── lookups.tab.values │ │ ├── lookups.tab.values.at │ │ ├── lookups.tab.values.s │ │ ├── lookups.tab_i │ │ └── lookups.tab_i.len │ └── last-build.bin ├── gradle.properties ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main └── kotlin └── Foundations.kt /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /.gradle/5.2.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/5.2.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /.gradle/5.2.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.2.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /.gradle/5.2.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/5.2.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/5.2.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/5.2.1/gc.properties -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Thu May 28 22:25:51 CDT 2020 2 | gradle.version=5.2.1 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | KotlinWorkshop -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Workshop de Kotlin 2 | Este repositorio contiene el código de ejemplo usado en el workshop de kotlin. 3 | 4 | ## ¿ Comó esta organizado ? 5 | El workshop tiene varios módulos y cada uno está representado en este repositorio por medio de una rama (branch) 6 | 7 | Así que las ramas son las siguientes: 8 | 9 | ### Rama Foundations 10 | Contiene los fundamentos de kotlin, aquí encontraras 11 | - Variables y tipos de datos 12 | - Operadores 13 | - Rangos 14 | - Control de flujo (if, when, for, while) 15 | - NullSafety y operador elvis 16 | - Funciones 17 | 18 | La presentación de este módulo se encuentra en [Presentación 1](https://docs.google.com/presentation/d/1MtAiObQStmQS-AiMw7VZAkjE09pvyMizNd3lXNn6HYc/edit?usp=sharing) 19 | 20 | Video de la clase [Clase 1](https://www.youtube.com/watch?v=5f0Yhyx3LPo&t=4744s) 21 | 22 | 23 | ### Rama OOP y OOP-2 24 | Contiene los ejemplos de programación orientada a objetos en Kotlin 25 | - Clases 26 | - Interfaces 27 | - Herencia. 28 | - Clases abstractas 29 | - Object. 30 | - Data Class. 31 | - Properties y delegated properties 32 | - Extensiones 33 | - Sealed Classes 34 | - Enum 35 | - Inline Clases 36 | - Type Alias 37 | 38 | La presentación de este módulo se encuentra en [Presentación 2 y 3](https://docs.google.com/presentation/d/1JVhzRCsjtIxXDjBP7EfczMDYY1ayQ9Qfdo7E1KHiRxw/edit?usp=sharing) 39 | 40 | Video de la clase [Clase 2](https://www.youtube.com/watch?v=wx8M8Jcs2lI) 41 | 42 | Video de la clase [Clase 3](https://www.youtube.com/watch?v=8aMQp0DCCBw) 43 | 44 | ### Rama Functional Programming 45 | Contiene los ejemplos de programación funcional en Kotlin 46 | - Lambdas 47 | - Funciones de orden superior 48 | - Colecciones 49 | - Secuencias 50 | - Listas 51 | - Set 52 | - Map 53 | - Inline Functions 54 | 55 | La presentación de este módulo se encuentra en [Presentación 4](https://docs.google.com/presentation/d/1d-sRIo6DCYbC-rD4pLJ2lV2V5ZFKblISw7zULbDK2rA/edit?usp=sharing) 56 | 57 | Video de la clase [Clase 4](https://www.youtube.com/watch?v=KqzSt8MSDkE) 58 | 59 | 60 | ### Rama Coroutines 61 | Contiene los ejemplos de coroutines en Kotlin 62 | - Coroutines 63 | - Context y Dispatchers 64 | - Jobs 65 | - Channels 66 | - Flows 67 | 68 | La presentación de este módulo se encuentra en [Presentación 5](https://docs.google.com/presentation/d/1iFvh8jkCllbLgo2OjPzhpIjbm-YsQ7J7dt5wK_3sPE0/edit?usp=sharing) 69 | 70 | Video de la clase [Clase 5](https://www.youtube.com/watch?v=iunr4l-m-dE) 71 | 72 | 73 | ### Otros Conceptos (Rama Multiplataforma) 74 | Contiene los ejemplos de 75 | - Kotlin Multiplataforma. 76 | - DSL. 77 | - Compatibilidad con Java. 78 | 79 | La presentación de este módulo se encuentra en [Presentación 6](https://docs.google.com/presentation/d/18-LWTuTjcSWpgI3nUcqa_vEwnJ56rVa-jGzWfYfXqf4/edit?usp=sharing) 80 | 81 | Video de la clase [Clase 6](https://youtu.be/bGCupD4Kv8Q) 82 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.jetbrains.kotlin.jvm' version '1.3.61' 3 | } 4 | 5 | group 'org.example' 6 | version '1.0-SNAPSHOT' 7 | 8 | repositories { 9 | mavenCentral() 10 | } 11 | 12 | dependencies { 13 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" 14 | } 15 | 16 | compileKotlin { 17 | kotlinOptions.jvmTarget = "1.8" 18 | } 19 | compileTestKotlin { 20 | kotlinOptions.jvmTarget = "1.8" 21 | } -------------------------------------------------------------------------------- /build/classes/kotlin/main/META-INF/KotlinWorkshop.kotlin_module: -------------------------------------------------------------------------------- 1 |  2 |  3 |  FoundationsKt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/build-history.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/build-history.bin -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream: -------------------------------------------------------------------------------- 1 | T/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.kt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len: -------------------------------------------------------------------------------- 1 | U -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream: -------------------------------------------------------------------------------- 1 | FoundationsKt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at: -------------------------------------------------------------------------------- 1 | /Header Record For PersistentHashMapValueStorageUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.kt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream: -------------------------------------------------------------------------------- 1 | FoundationsKt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at: -------------------------------------------------------------------------------- 1 | /Header Record For PersistentHashMapValueStorage -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream: -------------------------------------------------------------------------------- 1 | FoundationsKt.kotlin_module -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream: -------------------------------------------------------------------------------- 1 | T/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.kt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len: -------------------------------------------------------------------------------- 1 | U -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at: -------------------------------------------------------------------------------- 1 | /Header Record For PersistentHashMapValueStorage FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module FoundationsKt.kotlin_module -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab: -------------------------------------------------------------------------------- 1 | 17 2 | 16 -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream: -------------------------------------------------------------------------------- 1 | T/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.kt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len: -------------------------------------------------------------------------------- 1 | U -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at: -------------------------------------------------------------------------------- 1 | /Header Record For PersistentHashMapValueStorage  2 |     -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream: -------------------------------------------------------------------------------- 1 |  2 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at: -------------------------------------------------------------------------------- 1 | /Header Record For PersistentHashMapValueStorageUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.ktUT/Users/jggomez/Documents/devhack/code/kotlin-workshop/src/main/kotlin/Foundations.kt -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at: -------------------------------------------------------------------------------- 1 | 2 | $ 3 | @ 4 | @ 5 | @ 6 | @ 7 | < 8 | ( 9 | ( 10 | @ 11 | @ 12 | @ 13 | @ 14 | @ 15 | < 16 | < 17 | < 18 | < 19 | 0 20 | ( 21 | ( 22 | @ 23 | @ 24 | @ 25 | @ 26 | @ 27 | < 28 | < 29 | < 30 |  31 |  32 | ( 33 | ( 34 | ( 35 | ( 36 | < 37 | ( 38 | ( 39 | @ 40 | @ 41 | @ 42 | @ 43 | @ 44 | < 45 | < 46 | ( 47 | ( 48 | @ 49 | @ 50 | @ 51 | @ 52 | @ 53 | < 54 | < 55 | ( 56 | ( 57 | @ 58 | @ 59 | @ 60 | @ 61 | @ 62 | < 63 | $ 64 | $ 65 |   66 | < 67 |  68 | ( 69 | ( 70 | @ 71 | @ 72 | @ 73 | @ 74 | @ 75 | < 76 |  77 |  78 | < 79 | ( 80 | ( 81 | @ 82 | @ 83 | @ 84 | @ 85 | @ 86 | < 87 | < 88 | ( 89 | ( 90 | @ 91 | @ 92 | @ 93 | @ 94 | @ 95 | < 96 | @ 97 | @ 98 | D 99 | 4 100 | D 101 | @ 102 | $ 103 | 4 104 | , 105 | @ 106 | , 107 | 4 108 | ( 109 | @ 110 | 4 111 | @ 112 | D 113 | D 114 | @ 115 | D 116 | @ 117 | D 118 | D 119 | D 120 | D 121 | @ 122 | @ 123 | , 124 | , 125 | D 126 | D 127 | D 128 | D 129 | D 130 | @ 131 | @ 132 | @ 133 | @ 134 | @ 135 | $ 136 | @ 137 | @ 138 | @ 139 | $ 140 | @ 141 | 0 142 | D 143 | D 144 | D 145 | , 146 | , 147 | D 148 | D 149 | D 150 | D 151 | D 152 | @ 153 | @ 154 | @ 155 | $ 156 | $ 157 | ( 158 | ( 159 | D 160 | D 161 | D 162 | D 163 | @ 164 | , 165 | , 166 | D 167 | D 168 | D 169 | D 170 | D 171 | @ 172 | @ 173 | @ 174 | @ 175 | 4 176 | , 177 | , 178 | D 179 | D 180 | D 181 | D 182 | D 183 | @ 184 | @ 185 | @ 186 |  187 |  188 | , 189 | , 190 | , 191 | , 192 | @ 193 | , 194 | , 195 | D 196 | D 197 | D 198 | D 199 | D 200 | @ 201 | @ 202 | , 203 | , 204 | D 205 | D 206 | D 207 | D 208 | D 209 | @ 210 | @ 211 | , 212 | , 213 | D 214 | D 215 | D 216 | D 217 | D 218 | @ 219 | ( 220 | ( 221 | $ 222 | @ 223 |  224 | , 225 | , 226 | D 227 | D 228 | D 229 | D 230 | D 231 | @ 232 |  233 |  234 | @ 235 | , 236 | , 237 | D 238 | D 239 | D 240 | D 241 | D 242 | @ 243 | @ 244 | , 245 | , 246 | D 247 | D 248 | D 249 | D 250 | D 251 | @ 252 |  -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i.len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i.len -------------------------------------------------------------------------------- /build/kotlin/compileKotlin/last-build.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/escueladevhack/kotlin-workshop/617f80e725a45c49b3c7d9fb6d8658e20f298adc/build/kotlin/compileKotlin/last-build.bin -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS='"-Xmx64m"' 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS="-Xmx64m" 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'KotlinWorkshop' 2 | 3 | -------------------------------------------------------------------------------- /src/main/kotlin/Foundations.kt: -------------------------------------------------------------------------------- 1 | import kotlin.math.absoluteValue 2 | import kotlin.math.roundToInt 3 | 4 | /* Programa para evaluar el nivel de ingles 5 | 1. El usuario digite su nombre 6 | 2. El sistema generar una pregunta y mostrar al usuario 7 | 3. Usuario responde la pregunta 8 | 4. El sistema guarda la respuesta del usuario 9 | 5. Se repite el paso 2 al paso 4 por 5 veces. 10 | 6. Sistema imprime el número de respuestas correctas e incorrectas y el rendimiento 11 | el cual se calcula Número de respuestas correctas / el total de preguntas 12 | */ 13 | 14 | val questions = Array(5) { "" } 15 | val answers = Array(5) { "" } 16 | val correctAnswers = Array(5) { 0 } 17 | 18 | fun initQuestions() { 19 | questions[0] = "For ________ Numbers" 20 | questions[1] = "For ________ Numbers" 21 | questions[2] = "For ________ Numbers" 22 | questions[3] = "For ________ Numbers" 23 | questions[4] = "For ________ Numbers" 24 | } 25 | 26 | fun initAnswers() { 27 | answers[0] = "1. name | 2. user | 3. string | 4. integer" 28 | answers[1] = "1. name | 2. user | 3. string | 4. integer" 29 | answers[2] = "1. name | 2. user | 3. string | 4. integer" 30 | answers[3] = "1. name | 2. user | 3. string | 4. integer" 31 | answers[4] = "1. name | 2. user | 3. string | 4. integer" 32 | } 33 | 34 | fun initCorrectAnswers() { 35 | correctAnswers[0] = 1 36 | correctAnswers[1] = 2 37 | correctAnswers[2] = 1 38 | correctAnswers[3] = 4 39 | correctAnswers[4] = 3 40 | } 41 | 42 | fun requestName(): String { 43 | print("Por favor digita tu nombre: ") 44 | return readLine() ?: "" 45 | } 46 | 47 | fun printQuestionAndAnswers(question: String, answers: String): Int { 48 | println(question) 49 | println(answers) 50 | return readLine()?.toInt() ?: 0 51 | } 52 | 53 | fun createQuestions(userName: String): ArrayList { 54 | val userAnswers = ArrayList() 55 | println("Por favor responde ${userName.toUpperCase()}") 56 | for ((index, question) in questions.withIndex()) { 57 | val answer = (printQuestionAndAnswers(question, answers[index])) 58 | if (validateAnswer(answer)) userAnswers.add(answer) else userAnswers.add(0) 59 | } 60 | return userAnswers 61 | } 62 | 63 | fun validateAnswer(answer: Int) = answer in 1..4 64 | 65 | fun getCorrectAnswers(userAnswers: List) = 66 | userAnswers.filterIndexed { index, answer -> 67 | answer == correctAnswers[index] 68 | }.count() 69 | 70 | fun getIncorrectAnswers(userAnswers: List) = 71 | (getCorrectAnswers(userAnswers) - userAnswers.size).absoluteValue 72 | 73 | fun calculatePerformanceScore(userCorrectAnswers: Int, totalQuestions: Int) = 74 | (userCorrectAnswers.toDouble().div(totalQuestions.toDouble()) * 100).roundToInt() 75 | 76 | fun calculateLevel(performanceScore: Int) = 77 | when (performanceScore) { 78 | in 0..40 -> "Principiante" 79 | in 41..80 -> "Intermedio" 80 | in 81..100 -> "Avanzado" 81 | else -> "Ninguno" 82 | } 83 | 84 | fun main() { 85 | initQuestions() 86 | initAnswers() 87 | initCorrectAnswers() 88 | val userName = requestName() 89 | 90 | for (iteration in 1..4) { 91 | println("**********************************") 92 | println("Esta es la ronda => $iteration") 93 | val userAnswers = createQuestions(userName) 94 | val userCorrectAnswers = getCorrectAnswers(userAnswers) 95 | val userInCorrectAnswers = getIncorrectAnswers(userAnswers) 96 | val userPerformanceScore = calculatePerformanceScore(userCorrectAnswers, userAnswers.size) 97 | println("El número de respuestas correctas fueron => $userCorrectAnswers") 98 | println("El número de respuestas incorrectas fueron => $userInCorrectAnswers") 99 | println("El puntaje fue de => $userPerformanceScore %") 100 | println("Su nivel es => ${calculateLevel(userPerformanceScore)}") 101 | } 102 | } 103 | 104 | --------------------------------------------------------------------------------