File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
gradle/android-databinding
src/main/java/org/example/kotlin/databinding Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ dependencies {
3030 exclude group : ' com.android.support' , module : ' support-annotations'
3131 })
3232 compile ' com.android.support:appcompat-v7:25.3.1'
33- testCompile ' junit:junit:4.12'
3433 compile ' com.android.support.constraint:constraint-layout:1.0.1'
3534 compile " com.android.support:recyclerview-v7:25.3.1"
35+ compile ' com.github.bumptech.glide:glide:3.7.0'
36+
3637 kapt " com.android.databinding:compiler:$android_plugin_version "
3738 compile " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
38- compile ' com.github.bumptech.glide:glide:3.7.0'
39+
40+ compile " org.jetbrains.anko:anko-sdk25:$anko_version "
41+ compile " org.jetbrains.anko:anko-appcompat-v7-common:$anko_version "
42+
43+ testCompile ' junit:junit:4.12'
3944}
4045repositories {
4146 mavenCentral()
Original file line number Diff line number Diff line change 11package org.example.kotlin.databinding
22
3- import android.content.Intent
43import android.databinding.DataBindingUtil
54import android.os.Bundle
65import android.support.v7.app.AppCompatActivity
76import android.view.View
87import org.example.kotlin.databinding.databinding.ActivityMainBinding
8+ import org.jetbrains.anko.startActivity
99
1010
1111class MainActivity : AppCompatActivity () {
@@ -33,7 +33,5 @@ class MainActivity : AppCompatActivity() {
3333 weather.notifyChange()
3434 }
3535
36- fun startActivity (view : View ) {
37- startActivity(Intent (this , OtherActivity ::class .java))
38- }
36+ fun startActivity (view : View ) = startActivity<OtherActivity >()
3937}
Original file line number Diff line number Diff line change 33buildscript {
44 ext. android_plugin_version = ' 2.4.0-alpha7'
55 ext. kotlin_version = ' 1.1.2-3'
6+ ext. anko_version = ' 0.10.0-beta-2'
7+
68 repositories {
79 jcenter()
810 }
911 dependencies {
10- classpath " com.android.tools.build:gradle:$a ndroid_plugin_version "
12+ classpath ' com.android.tools.build:gradle:2.3.1 '
1113 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
1214
1315 // NOTE: Do not place your application dependencies here; they belong
@@ -18,6 +20,9 @@ buildscript {
1820allprojects {
1921 repositories {
2022 jcenter()
23+
24+ // for anko library
25+ maven { url " http://dl.bintray.com/kotlin/kotlin-dev" }
2126 }
2227}
2328
You can’t perform that action at this time.
0 commit comments