Commit Graph

13 Commits

Author SHA1 Message Date
George Mount
fc195a64c6 Move to package android.databinding. 2015-03-23 16:51:33 -07:00
Yigit Boyar
243a1e3e18 Support for multi module setups
This CL adds support for building multi module apps
with proper context.

For library modules, we only generate base classes in the initial
compilation. We also generate a temporary BR file which does
not have final methods.

When final app is being generated, all layout binders, adapters
and Bindable information gets merged and all final classes
are generated in their appropriate packages.

This CL also adds support for Test runs and any
number of build variants.

Bug: 19714904
Change-Id: I9b50b54db05f3fa206eec33709d43c2ac94a9e5e
2015-03-19 12:40:00 -07:00
Yigit Boyar
f5140a1529 Move configuration values into a config file
Change-Id: I7055c109cb04ae2ae375c2126c2a70fa52e85e31
2015-03-13 12:57:48 -07:00
Yigit Boyar
1ec5cb0729 Restructure project for test apps
This CL updates project to use a local maven repo.
(local as in near source code w/ relative path).
This is necessary to have multiple versions of the
project on the same computer also provides better
separation.

I also moved integration tests to depend on these
because we cannot build the compiler and test app at
the same project.

I've changed library plugin's jar to be a separate
upload task to avoid some build issues in TestApp
when we release a @jar and @aar with same group and
artifact ids.

This CL also adds some convenience methods to
gradle build script to run all tests, prepare maven
repo, run integration tests etc. These were needed
to do CI.

Bug: 19718690
Change-Id: I3c80e09fe7c8c2780ca00c3e9b9ba99a162531cf
2015-03-12 19:27:20 -07:00
Yigit Boyar
20af2f0c5a Downgrade to java 1.6
This CL removes java 1.7 code so that we can easily integrate
w/ Idea.

It also partially removes dependency on ModelAnalyzer for
interface generation so that we can call it from the Idea
plugin.

Change-Id: Id7616987f5660911e951ddf20dacd4f407dacbd9
2015-03-12 09:17:11 -07:00
Yigit Boyar
ac5dc9a4e1 Check API version for methods called via binding
In data binding, setting an attribute actually means calling a method, which might be
an issue if the method is added after a certain API.

This CL introduces a change which will check called methods per api and add necessary
API check code to avoid calling those methods in older platforms.

This CL also resurrects the Java Model Analyzer (in testing) and also fixes compiler tests.

Bug: 19593398
Change-Id: I0da4194625231cf43125e1b43338069e7d191eb9
2015-03-11 10:44:08 -07:00
George Mount
f9c62b6f52 Don't require IDs for most bound views. 2015-03-04 14:12:06 -08:00
George Mount
81536a4da5 Move expression parsing to Annotation Processing stage.
Change-Id: Ibf1e9c02856212c20300f10e4c63b96ec33b7a13
2015-03-02 15:21:18 -08:00
George Mount
d872e1cdf7 Move expression generation to annotation processor. 2015-02-17 10:42:10 -08:00
George Mount
49f8a82653 Made expressions prefix with "@" 2015-02-04 13:15:26 -08:00
Yigit Boyar
6bd7cd429e Support for layout files in multiple resource folders
Multiple layout files with the same name now share a common interface.
They also share all variables no matter where it is defined.
If a variable is NOT used in one of the layout files, its implementation
does not create a field BUT STILL creates the setter (to implement
the base interface).

If the same view id is used for two different types of views, return
type in the interface is android.view.View. If it is an include,
the return value is IViewDataBinder.

Change-Id: Ie3cc2bb8ec5ea48b71337e314ec588a050d714df
2015-02-03 15:54:13 -08:00
George Mount
662d87aa0b Moved classes from library to baseLibrary
Added tests for some classes.
2015-01-27 15:47:05 -08:00
George Mount
860a2fc4aa Project renaming 2015-01-27 10:58:49 -08:00