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 4ae3608
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 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
32 changes: 32 additions & 0 deletions IapExample/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
Expand Down Expand Up @@ -101,6 +103,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
4 changes: 0 additions & 4 deletions ios/RNIapIosSk2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ class RNIapIosSk2: RCTEventEmitter, Sk2Delegate {
delegate.stopObserving()
}

override func addListener(_ eventName: String?) {
super.addListener(eventName)
}

/**
"iap-transaction-updated" is unique to Sk2.
"iap-promoted-product" is only avaiable on Sk1
Expand Down

0 comments on commit 4ae3608

Please sign in to comment.