-
Notifications
You must be signed in to change notification settings - Fork 1
Gradle Build Examples
Ryan Suzuki edited this page Mar 27, 2022
·
1 revision
For most use-cases, this should be sufficient.
android {
...
flavorDimensions "app"
productFlavors {
google {
applicationIdSuffix ".google"
}
amazon {
applicationIdSuffix ".amazon"
}
}
dependencies {
amazonApi ("com.github.rjsuzuki:billingz:v2.1.0") {
exclude module: "google"
}
googleApi ("com.github.rjsuzuki:billingz:v2.1.0") {
exclude module: "amazon"
}
}
...
}
For more unique use-cases when a direct call to a billing library's model or function is required, splitting the project into two separate modules will allow type casting from the Billingz library base model, such as Productz
, into AmazonProduct
or GoogleProduct
. Those variations will contain the original data passed by the relevant billing library.
- app-module
- amazon-module
- google-module