-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Providing build config fields on multi-dimensional flavor types | ||
*/ | ||
|
||
android { | ||
flavorDimensions Dimensions.default, Dimensions.type | ||
productFlavors { | ||
prod { | ||
dimension Dimensions.default | ||
} | ||
|
||
beta { | ||
dimension Dimensions.default | ||
} | ||
|
||
alpha { | ||
dimension Dimensions.default | ||
} | ||
|
||
dev { | ||
dimension Dimensions.default | ||
} | ||
|
||
free { | ||
dimension Dimensions.type | ||
} | ||
|
||
paid { | ||
dimension Dimensions.type | ||
} | ||
} | ||
|
||
// Use combination of the flavor names | ||
libraryVariants.all { variant -> | ||
if (variant.getName().startsWith("prodPaid")) { | ||
variant.buildConfigField 'String', "key", "value" | ||
} else if (variant.getName().startsWith("betaPaid")) { | ||
variant.buildConfigField 'String', "key", "value" | ||
} else if (variant.getName().startsWith("alphaPaid")) { | ||
variant.buildConfigField 'String', "key", "value" | ||
} else if (variant.getName().startsWith("devPaid")) { | ||
variant.buildConfigField 'String', "key", "value" | ||
} | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.