Skip to content

Commit

Permalink
Updated content provider template to support ${applicationId} variabl…
Browse files Browse the repository at this point in the history
…e that is supported in the new manifest merger build tool. http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
  • Loading branch information
almilli authored and BoD committed Apr 12, 2015
1 parent d9ad320 commit 21bddda
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public class ${config.providerClassName} extends BaseContentProvider {
private static final String TYPE_CURSOR_ITEM = "vnd.android.cursor.item/";
private static final String TYPE_CURSOR_DIR = "vnd.android.cursor.dir/";

public static final String AUTHORITY = "${config.authority}";
<#assign authority = "\"" + config.authority?replace(r"${applicationId}", "\" + BuildConfig.APPLICATION_ID + \"") + "\"">
<#assign authority = authority?replace(r'^"* \+ (.*?)', r"$1", "r")?replace(r'(.*?) \+ "*$', r"$1", "r")>
public static final String AUTHORITY = ${authority};
public static final String CONTENT_URI_BASE = "content://" + AUTHORITY;

<#assign i=0>
Expand Down

0 comments on commit 21bddda

Please sign in to comment.