Skip to content

Commit a2de61b

Browse files
committed
Update Kotlin version
1 parent ef2c246 commit a2de61b

File tree

13 files changed

+29
-20
lines changed

13 files changed

+29
-20
lines changed

Basic/app/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apply plugin: 'kotlin-android'
44

55
apply plugin: 'kotlin-android-extensions'
66

7+
apply plugin: 'kotlin-kapt'
8+
79
ext.support_version = "27.1.0"
810
ext.arch_version = "1.1.1"
911
ext.room_version = "1.0.0"

Basic/app/src/main/java/com/snappymob/kotlincomponents/db/AppDb.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class RepoDao {
2121
abstract fun insertRepos(repositories: List<Repo>)
2222

2323
@Query("SELECT * FROM Repo "
24-
+ "WHERE lower(owner_login) = lower(:arg0)"
24+
+ "WHERE lower(owner_login) = lower(:owner)"
2525
+ "ORDER BY stars DESC")
2626
abstract fun loadRepositories(owner: String): LiveData<List<Repo>>
2727

Basic/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.3-2'
4+
ext.kotlin_version = '1.2.31'
55
repositories {
66
google()
77
jcenter()

BasicRx/app/build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apply plugin: 'kotlin-android'
44

55
apply plugin: 'kotlin-android-extensions'
66

7+
apply plugin: 'kotlin-kapt'
8+
79
ext.dagger_version = "2.11"
810
ext.support_version = "27.1.0"
911
ext.arch_version = "1.1.1"
@@ -50,16 +52,16 @@ dependencies {
5052
//Room
5153
implementation "android.arch.persistence.room:runtime:$room_version"
5254
kapt "android.arch.persistence.room:compiler:$room_version"
53-
compile "android.arch.persistence.room:rxjava2:$room_version"
55+
implementation "android.arch.persistence.room:rxjava2:$room_version"
5456

5557
//Lifecycle
5658
implementation "android.arch.lifecycle:runtime:$arch_version"
5759
implementation "android.arch.lifecycle:extensions:$arch_version"
5860
kapt "android.arch.lifecycle:compiler:$arch_version"
5961

6062
//Rx
61-
compile 'io.reactivex.rxjava2:rxandroid:2.0.2'
62-
compile 'io.reactivex.rxjava2:rxkotlin:2.2.0'
63+
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
64+
implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
6365

6466
}
6567

BasicRx/app/src/main/java/com/snappymob/kotlincomponents/db/AppDb.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class RepoDao {
2121
abstract fun insertRepos(repositories: List<Repo>)
2222

2323
@Query("SELECT * FROM Repo "
24-
+ "WHERE lower(owner_login) = lower(:arg0)"
24+
+ "WHERE lower(owner_login) = lower(:owner)"
2525
+ "ORDER BY stars DESC")
2626
abstract fun loadRepositories(owner: String): Flowable<List<Repo>>
2727

BasicRx/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.51'
4+
ext.kotlin_version = '1.2.31'
55
repositories {
66
google()
77
jcenter()

Dagger/app/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apply plugin: 'kotlin-android'
44

55
apply plugin: 'kotlin-android-extensions'
66

7+
apply plugin: 'kotlin-kapt'
8+
79
ext.dagger_version = "2.15"
810
ext.support_version = "27.1.0"
911
ext.arch_version = "1.1.1"

Dagger/app/src/main/java/com/snappymob/kotlincomponents/db/AppDb.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class RepoDao {
2121
abstract fun insertRepos(repositories: List<Repo>)
2222

2323
@Query("SELECT * FROM Repo "
24-
+ "WHERE lower(owner_login) = lower(:arg0)"
24+
+ "WHERE lower(owner_login) = lower(:owner)"
2525
+ "ORDER BY stars DESC")
2626
abstract fun loadRepositories(owner: String): LiveData<List<Repo>>
2727

Dagger/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.51'
4+
ext.kotlin_version = '1.2.31'
55
repositories {
66
google()
77
jcenter()

Realm/app/build.gradle

+9-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ apply plugin: 'kotlin-android-extensions'
66

77
apply plugin: 'realm-android'
88

9-
ext.arch_version = "1.0.0-beta2"
9+
apply plugin: 'kotlin-kapt'
10+
11+
ext.support_version = "27.1.0"
12+
ext.arch_version = "1.1.1"
1013
ext.retrofit_version = "2.3.0"
1114

1215
android {
13-
compileSdkVersion 26
14-
buildToolsVersion '26.0.2'
16+
compileSdkVersion 27
17+
buildToolsVersion '27.0.3'
1518
defaultConfig {
1619
//TODO: Update applicationId
1720
applicationId "com.snappymob.kotlincomponents.realm"
1821
minSdkVersion 16
19-
targetSdkVersion 26
22+
targetSdkVersion 27
2023
versionCode 1
2124
versionName "1.0"
2225
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -32,8 +35,8 @@ android {
3235

3336
dependencies {
3437
implementation fileTree(dir: 'libs', include: ['*.jar'])
35-
implementation 'com.android.support:appcompat-v7:26.1.0'
36-
implementation 'com.android.support:recyclerview-v7:26.1.0'
38+
implementation "com.android.support:appcompat-v7:$support_version"
39+
implementation "com.android.support:recyclerview-v7:$support_version"
3740
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
3841
testImplementation 'junit:junit:4.12'
3942
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {

Realm/app/src/main/java/com/snappymob/kotlincomponents/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MainActivity : AppCompatActivity() {
104104
notifyDataSetChanged()
105105
}
106106

107-
override fun onCreateViewHolder(p0: ViewGroup?, p1: Int): RepoItemViewHolder {
107+
override fun onCreateViewHolder(p0: ViewGroup, p1: Int): RepoItemViewHolder {
108108
val textView = TextView(context)
109109

110110
return RepoItemViewHolder(textView)

Realm/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.51'
4+
ext.kotlin_version = '1.2.31'
55
repositories {
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.0-rc1'
10+
classpath 'com.android.tools.build:gradle:3.1.0'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
classpath "io.realm:realm-gradle-plugin:3.7.2"
1313
// NOTE: Do not place your application dependencies here; they belong
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Sep 09 10:33:57 MYT 2017
1+
#Sat Mar 31 13:31:25 MYT 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)