25 Commits

Author SHA1 Message Date
dniz
3f6ba81d6e Remove library references to widget package
PiperOrigin-RevId: 191302154
2018-04-03 12:07:57 -04:00
travisc
5d3098956c Update gradle to 4.1 and Android gradle plugin to 3.0.
This changes all our dependencies to use the 3.0-style dep types (api and implementation). Generally it just makes everything api unless known otherwise, but moving to implementation where possible in the future would be desirable.

PiperOrigin-RevId: 177391618
2018-01-11 10:19:47 -05:00
travisc
9a2fde4aa3 Update MDC manifests to target 27.
PiperOrigin-RevId: 177064785
2018-01-03 14:47:15 -05:00
markwei
75dbb6bccc Create compatibility() and project(fromPath()) dep targets for consistent dependencies.
Add missing dependencies.

PiperOrigin-RevId: 172164225
2017-11-14 13:43:18 -05:00
miguely
289ccd7577 Add explicit exclusions to "**/build/**" in gradle files.
Since our source roots are the project's root directory, generated output falls inside it, unless properly excluded, all intermediate output such as R classes gets recompiled with each gradle pass.

This causes failures because of duplicate R classes.

PiperOrigin-RevId: 169588457
2017-09-21 16:13:59 -04:00
miguely
713ac062ad Update Gradle build to fit our new code structure.
We have subprojects of :lib: because our internal builds are bazel-based. Gradle does not support more than one project at any level with the same name, which is a staple of bazel-based builds, so gradle projects have to be renamed in runtime to include their whole path (see settings.gradle).

Furthermore since every node includes the path up until that node in its name, writing dependencies can get tedious, for this purpose there is a new method in build.gradle called getTransformedProjectPath which takes /-separated project path and turns it into the correct project path, after the rename.

This also updates versions for TargetSdk and SupportLibrary to 26, which is required by the newer code.

PiperOrigin-RevId: 169457686
2017-09-21 15:09:52 -04:00
Alan Viverette
d16cead6c8 Remove unnecessary casts on calls to findViewById
Bug: 24137209
Test: make -j32
Change-Id: I04084b2d05ddd7afaa160a76efe0b0d0c8eb5f00
PiperOrigin-RevId: 165042386
2017-09-21 14:30:28 -04:00
Travis Collins
4302673218 Upgrade complete codelab to gradle 2.3.2. 2017-05-16 15:46:21 -07:00
Travis Collins
9596d15435 Fix starter project build, can't use library attributes before we depend on the library. 2017-05-16 15:40:37 -07:00
Travis Collins
8f1649eca0 Correct ordering of attributes in main activiy; style should be just after id (if present). 2017-05-03 16:40:17 -07:00
Travis Collins
6522e99423 Extract some attributes into styles to make instructions more straightforward. 2017-05-03 16:09:17 -07:00
Travis Collins
01d563e3ca Update codelab header strings, remove unnecessary gradle comment. 2017-05-02 14:29:51 -07:00
Travis Collins
53862ce596 Implement grid layout and responsive column count. 2017-04-22 01:44:33 -07:00
Travis Collins
fec5119b47 Add collapsing app bar, beginnings of bottom navigation. 2017-04-21 23:54:58 -07:00
Travis Collins
6bbe6f3459 Make a copy of starter->complete to complete the codelab on. 2017-04-21 20:04:53 -07:00
Travis Collins
d9dcb21e29 Correct favorite button style, remove unnecessary clipPadding specification. 2017-04-21 19:53:09 -07:00
Travis Collins
02a1314122 Add correct product logo, favorite button on product cards. 2017-04-21 19:32:29 -07:00
Travis Collins
a1a2d4fe5d Add Shrine starter project for Building Beautiful Apps codelab. 2017-04-21 19:32:29 -07:00
travisc
5f8bb4c8a1 Bump versions to 25.3.1.
This also bumps up the build tools + Android gradle plugin version, since these
were out of date, and removes a couple unused version values.

PiperOrigin-RevId: 153652782
2017-04-19 16:56:46 -07:00
travisc
838d1c2d6e Fix various problems preventing MDC from building with gradle.
- AppBarWithCollapsingToolbarStateRestoreTest needed a variable used inside a closure to be marked as final (No idea why Bazel was okay with this)
- BottomNavigationViewTest/TabLayoutTest needed TargetApi annotations for tests that run on N+
- Every Shrine build.gradle file needs to specify values for Java includes and srcDirs, regardless of whether they contain Java. If they don't they get the default library values (which includes every subdirectory recursively), and result in duplicate classes being generated.
- Various styles.xml files in Shrine were using attributes only available in v17 or v21+

This also updates the main build.gradle file to print lint errors on stdout, so they're easier to look at in TravisCI.

PiperOrigin-RevId: 153389041
2017-04-17 14:52:28 -07:00
afohrman
79b844e0a2 Add Gradle build for Shrine.
The Gradle build includes a workaround to make our project structure work with Gradle. Gradle does not allow any duplicate names in the project structure, so to get around this, I put the demos package under a different group.

This commit also upgrades the targetSdkVersion to 25 to match the rest of material_components and restructures the FAB click listener to fix Gradle's complaint about the String in the listener having to be final.

Gradle build for Shrine's test directory to come in a future commit.

PiperOrigin-RevId: 152527247
2017-04-12 17:43:39 -07:00
afohrman
b140f8debc Make filters layout more pre-L friendly.
This commit changes the filters layout to use AppCompat's switch, which looks much nicer on pre-L versions. It also moves filters/ to use paddingStart/End to paddingLeft/Right, because that was only added in API level 17.

PiperOrigin-RevId: 152180875
2017-04-12 17:33:46 -07:00
afohrman
48e71e8c6b Fix VectorDrawable bugs in ItemActivity.
This commit fixes two bugs with VectorDrawable that were causing a crash in pre-L devices. One bug was a simple fix: using app:srcCompat instead of android:src for the FAB's icon. The other bug was more complicated, since it involved a VectorDrawable in a compound drawable. To work around the compatibility issues with this, I wrapped the VectorDrawable in a StateListDrawable and enabled AppCompat's ability to set vector drawables from resources.

PiperOrigin-RevId: 152136061
2017-04-12 17:31:46 -07:00
afohrman
5a8554ab40 Fix snackbar text color.
The text was illegible - it was showing up dark blue on a dark grey background. A simple tweak to the way text colors were set in the theme fixed this.

PiperOrigin-RevId: 150932983
2017-04-12 17:13:26 -07:00
afohrman
42fb7311bd Add Shrine demo app to material_components.
This builds on Bazel - Gradle setup to come in a future commit.

PiperOrigin-RevId: 150927644
2017-04-12 17:11:47 -07:00