Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty resource rule if using resource union. #438

Merged
merged 1 commit into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {
compile deps.external.xlogAndroidIdle
compile deps.apt.autoValue

compile project(':libraries:emptyResourceLibrary')
compile project(':libraries:emptylibrary')
devCompile project(path: ':dummylibrary', configuration: 'freeRelease')
prodCompile project(path: ':dummylibrary', configuration: 'paidRelease')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class AndroidResourceRule extends BuckRule {
@Override
protected final void printContent(PrintStream printer) {
printer.println("\tpackage = '${mPackage}',")
if (mRes) {
if (mRes || mResourceUnion) {
printer.println("\tres = res_glob([")
mRes.each {
printer.println("\t\t('${it}', '**'),")
Expand Down
6 changes: 6 additions & 0 deletions libraries/emptyResourceLibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apply plugin: 'com.android.library'

dependencies {
compile project(':libraries:emptylibrary')
compile deps.support.appCompat
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest package="com.uber.okbuck.library.empty.resources"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.uber.okbuck.library.empty.resources;

import android.content.Context;

public class Test {

public String foo(Context context) {
return context.getString(R.string.empty_release_string);
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include 'app'
include 'another-app'
include 'dummylibrary'
include 'libraries:emptyResourceLibrary'
include 'libraries:common'
include 'libraries:customLintLibrary'
include 'libraries:emptylibrary'
Expand Down