Skip to content

Commit

Permalink
fix: add missing build configs
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Dec 8, 2023
1 parent d663ebf commit a8b6f6c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-example-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
with:
working-directory: IapExample
bundler-cache: true
ruby-version: '2.7'

- name: SwiftLint
run: swiftlint lint --fix --format --path ios/*.swift --config .swiftlint.yml
Expand Down
30 changes: 30 additions & 0 deletions IapExample/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,36 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

flavorDimensions "appstore"

productFlavors {
googlePlay {
dimension "appstore"
missingDimensionStrategy "store", "play"
}

amazon {
dimension "appstore"
missingDimensionStrategy "store", "amazon"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
}
}

dependencies {
Expand Down

0 comments on commit a8b6f6c

Please sign in to comment.