diff options
author | Yigit Boyar <yboyar@google.com> | 2015-04-21 14:05:41 -0700 |
---|---|---|
committer | Yigit Boyar <yboyar@google.com> | 2015-04-21 14:05:41 -0700 |
commit | c64ae35dc1f125186351cb75dc0e11a0071e934c (patch) | |
tree | 215f57ca310475bc24d4a49338a798cd6e39090b /samples/BindingDemo | |
parent | a235321379603958a3160382b33b840f381a07ea (diff) | |
download | data-binding-c64ae35dc1f125186351cb75dc0e11a0071e934c.tar.gz |
WIP eap
Diffstat (limited to 'samples/BindingDemo')
13 files changed, 29 insertions, 18 deletions
diff --git a/samples/BindingDemo/app/build.gradle b/samples/BindingDemo/app/build.gradle index fa54aab5..dbbf4e86 100644 --- a/samples/BindingDemo/app/build.gradle +++ b/samples/BindingDemo/app/build.gradle @@ -17,8 +17,6 @@ apply plugin: 'com.android.application' apply plugin: 'com.android.databinding' -def generatedSources = "$buildDir/generated/source/br" - android { compileSdkVersion 21 buildToolsVersion "21.1.1" @@ -45,27 +43,16 @@ android { } } -android.applicationVariants.all { variant -> - variant.javaCompile.doFirst { - println "*** compile doFirst ${variant.name}" - new File(generatedSources).mkdirs() - variant.javaCompile.options.compilerArgs += [ - '-s', generatedSources - ] - } -} - dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.+' - compile 'com.android.databinding:library:0.3-SNAPSHOT@aar' compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:gridlayout-v7:21.+' compile 'com.android.support:cardview-v7:21.+' - compile 'com.android.databinding:baseLibrary:0.3-SNAPSHOT' - compile 'com.android.databinding:adapters:0.3-SNAPSHOT' - provided 'com.android.databinding:annotationprocessor:0.3-SNAPSHOT' - provided fileTree(dir : 'build/databinder/src', include : ['*.java']) + compile "com.android.databinding:library:${config.snapshotVersion}" + compile "com.android.databinding:baseLibrary:${config.snapshotVersion}" + compile "com.android.databinding:adapters:${config.snapshotVersion}" + provided "com.android.databinding:annotationprocessor:${config.snapshotVersion}" testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:1.9.5' diff --git a/samples/BindingDemo/app/src/main/java/com/android/example/bindingdemo/vo/Users.java b/samples/BindingDemo/app/src/main/java/com/android/example/bindingdemo/vo/Users.java index d954888e..72e44d03 100644 --- a/samples/BindingDemo/app/src/main/java/com/android/example/bindingdemo/vo/Users.java +++ b/samples/BindingDemo/app/src/main/java/com/android/example/bindingdemo/vo/Users.java @@ -3,6 +3,25 @@ package com.android.example.bindingdemo.vo; import com.android.example.bindingdemo.R; public class Users { + public static final int[] ICONS = { + R.drawable.emo_im_angel, + R.drawable.emo_im_cool, + R.drawable.emo_im_crying, + R.drawable.emo_im_embarrassed, + R.drawable.emo_im_foot_in_mouth, + R.drawable.emo_im_happy, + R.drawable.emo_im_kissing, + R.drawable.emo_im_laughing, + R.drawable.emo_im_lips_are_sealed, + R.drawable.emo_im_money_mouth, + R.drawable.emo_im_sad, + R.drawable.emo_im_surprised, + R.drawable.emo_im_tongue_sticking_out, + R.drawable.emo_im_undecided, + R.drawable.emo_im_winking, + R.drawable.emo_im_wtf, + R.drawable.emo_im_yelling, + }; public static final User[] robots = new User[]{ new User("romain", "guy", R.drawable.romain, User.ROBOT), }; diff --git a/samples/BindingDemo/app/src/main/res/drawable/adam.png b/samples/BindingDemo/app/src/main/res/drawable/adam.png Binary files differdeleted file mode 100644 index 583a0654..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/adam.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/alan.png b/samples/BindingDemo/app/src/main/res/drawable/alan.png Binary files differdeleted file mode 100644 index c0c91615..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/alan.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/chet.png b/samples/BindingDemo/app/src/main/res/drawable/chet.png Binary files differdeleted file mode 100644 index 06cc751c..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/chet.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/chris.png b/samples/BindingDemo/app/src/main/res/drawable/chris.png Binary files differdeleted file mode 100644 index 11686c55..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/chris.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/george.png b/samples/BindingDemo/app/src/main/res/drawable/george.png Binary files differdeleted file mode 100644 index fe744e04..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/george.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/john.png b/samples/BindingDemo/app/src/main/res/drawable/john.png Binary files differdeleted file mode 100644 index 7bd01080..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/john.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/rob.png b/samples/BindingDemo/app/src/main/res/drawable/rob.png Binary files differdeleted file mode 100644 index fd41cb07..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/rob.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/romain.png b/samples/BindingDemo/app/src/main/res/drawable/romain.png Binary files differdeleted file mode 100644 index 7a9af15b..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/romain.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/tenghui.png b/samples/BindingDemo/app/src/main/res/drawable/tenghui.png Binary files differdeleted file mode 100644 index 13442b05..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/tenghui.png +++ /dev/null diff --git a/samples/BindingDemo/app/src/main/res/drawable/yigit.png b/samples/BindingDemo/app/src/main/res/drawable/yigit.png Binary files differdeleted file mode 100644 index 57e9bafc..00000000 --- a/samples/BindingDemo/app/src/main/res/drawable/yigit.png +++ /dev/null diff --git a/samples/BindingDemo/build.gradle b/samples/BindingDemo/build.gradle index 18f0f561..14766a7d 100644 --- a/samples/BindingDemo/build.gradle +++ b/samples/BindingDemo/build.gradle @@ -16,6 +16,11 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + def Properties dataBindingProperties = new Properties() + dataBindingProperties.load(new FileInputStream("${projectDir}/../../databinding.properties")) + dataBindingProperties.mavenRepoDir = "${projectDir}/../../${dataBindingProperties.mavenRepoName}" + ext.config = dataBindingProperties + repositories { jcenter() maven { @@ -25,7 +30,7 @@ buildscript { } dependencies { classpath "com.android.tools.build:gradle:1.1.3" - classpath 'com.android.databinding:dataBinder:0.3-SNAPSHOT' + classpath "com.android.databinding:dataBinder:${config.snapshotVersion}" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } |