Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Added new examples #10

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated Kotlin, Gradle, OkHttp and Support libraries version. Also so…
…me minor changes to some classes
  • Loading branch information
Axier Fernandez committed Dec 26, 2017
commit 56cf1d53956c547acaf450eab8242f066faa8dae
10 changes: 5 additions & 5 deletions gradle/anko-asynchronous-tasks/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -25,9 +25,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Anko
Expand Down
2 changes: 1 addition & 1 deletion gradle/anko-asynchronous-tasks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'
ext.anko_version = '0.10.3'

repositories {
Expand Down
8 changes: 4 additions & 4 deletions gradle/anko-simple-ui/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
Expand All @@ -25,9 +25,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Anko
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class MainActivity : AppCompatActivity() {

}

fun readStream(inputStream: BufferedInputStream): String {
private fun readStream(inputStream: BufferedInputStream): String {
val bufferedReader = BufferedReader(InputStreamReader(inputStream))
val stringBuilder = StringBuilder()
bufferedReader.forEachLine { stringBuilder.append(it) }
Expand Down
2 changes: 1 addition & 1 deletion gradle/anko-simple-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'
ext.anko_version = '0.10.3'

repositories {
Expand Down
10 changes: 5 additions & 5 deletions gradle/gson-deserializers-okhttp-asynctask/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -26,9 +26,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MainActivity : AppCompatActivity() {

}

fun readStream(inputStream: BufferedInputStream): String {
private fun readStream(inputStream: BufferedInputStream): String {
val bufferedReader = BufferedReader(InputStreamReader(inputStream))
val stringBuilder = StringBuilder()
bufferedReader.forEachLine { stringBuilder.append(it) }
Expand Down
2 changes: 1 addition & 1 deletion gradle/gson-deserializers-okhttp-asynctask/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'

repositories {
jcenter()
Expand Down
8 changes: 4 additions & 4 deletions gradle/httpurlconnection-asynctask/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -26,7 +26,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,13 @@ class MainActivity : AppCompatActivity() {
return null
}

fun readStream(inputStream: BufferedInputStream): String {
private fun readStream(inputStream: BufferedInputStream): String {
val bufferedReader = BufferedReader(InputStreamReader(inputStream))
val stringBuilder = StringBuilder()
bufferedReader.forEachLine { stringBuilder.append(it) }
return stringBuilder.toString()
}

override fun onPreExecute() {
super.onPreExecute()
}

override fun onPostExecute(result: String?) {
super.onPostExecute(result)

Expand Down
2 changes: 1 addition & 1 deletion gradle/httpurlconnection-asynctask/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'

repositories {
jcenter()
Expand Down
8 changes: 4 additions & 4 deletions gradle/listview-baseadapter-data-object/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -26,7 +26,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/listview-baseadapter-data-object/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'

repositories {
jcenter()
Expand Down
10 changes: 5 additions & 5 deletions gradle/okhttp-asynctask/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "org.example.kotlin"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -26,8 +26,8 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/okhttp-asynctask/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {

ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.0'

repositories {
jcenter()
Expand Down