Skip to content

Commit 4e4b31e

Browse files
authored
Add consumer proguard rules to prevent minification (#137)
* Add consumer proguard rules to prevent minification * Update snapshot * Explicitly set swift version to 3.1.2
1 parent f0cc289 commit 4e4b31e

File tree

15 files changed

+583
-111
lines changed

15 files changed

+583
-111
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.1.2 - November 4, 2024
4+
5+
- Add `consumerProguardRules` build.gradle option to prevent minification of
6+
classes in release builds.
7+
38
## 3.1.1 - November 1, 2024
49

510
- Logs invalid JSON for lifecycle events

modules/@shopify/checkout-sheet-kit/RNShopifyCheckoutSheetKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
2020
s.source_files = "ios/*.{h,m,mm,swift}"
2121

2222
s.dependency "React-Core"
23-
s.dependency "ShopifyCheckoutSheetKit", "~> 3.1.1"
23+
s.dependency "ShopifyCheckoutSheetKit", "~> 3.1.2"
2424

2525
if fabric_enabled
2626
install_modules_dependencies(s)

modules/@shopify/checkout-sheet-kit/android/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,15 @@ android {
6060
}
6161

6262
buildTypes {
63+
debug {
64+
minifyEnabled false
65+
}
66+
6367
release {
6468
minifyEnabled false
69+
70+
// Rules in consumerProguardFiles are automatically included in the ProGuard configuration of any application that uses the library
71+
consumerProguardFiles 'proguard-rules.pro'
6572
}
6673
}
6774

modules/@shopify/checkout-sheet-kit/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ndkVersion=23.1.7779620
55
buildToolsVersion = "33.0.0"
66

77
# Version of Shopify Checkout SDK to use with React Native
8-
SHOPIFY_CHECKOUT_SDK_VERSION=3.2.0
8+
SHOPIFY_CHECKOUT_SDK_VERSION=3.2.2
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Keep Checkout Sheet Kit classes
2+
-keep class com.shopify.checkoutsheetkit.** { *; }

modules/@shopify/checkout-sheet-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@shopify/checkout-sheet-kit",
33
"license": "MIT",
4-
"version": "3.1.1",
4+
"version": "3.1.2",
55
"main": "lib/commonjs/index.js",
66
"types": "src/index.ts",
77
"source": "src/index.ts",

modules/@shopify/checkout-sheet-kit/package.snapshot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"RNShopifyCheckoutSheetKit.podspec",
44
"android/build.gradle",
55
"android/gradle.properties",
6+
"android/proguard-rules.pro",
67
"android/src/main/AndroidManifest.xml",
78
"android/src/main/AndroidManifestNew.xml",
89
"android/src/main/java/com/shopify/reactnative/checkoutsheetkit/CustomCheckoutEventProcessor.java",

sample/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '>= 1.15'
6+
gem 'cocoapods', '1.15.0'
77
gem 'cocoapods-check', '1.1.0'
88
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

sample/Gemfile.lock

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ GEM
1010
i18n (>= 1.6, < 2)
1111
minitest (>= 5.1)
1212
tzinfo (~> 2.0)
13-
addressable (2.8.6)
14-
public_suffix (>= 2.0.2, < 6.0)
13+
addressable (2.8.7)
14+
public_suffix (>= 2.0.2, < 7.0)
1515
algoliasearch (1.27.5)
1616
httpclient (~> 2.8, >= 2.8.3)
1717
json (>= 1.5.1)
1818
atomos (0.1.3)
1919
base64 (0.2.0)
2020
claide (1.1.0)
21-
cocoapods (1.15.2)
21+
cocoapods (1.15.0)
2222
addressable (~> 2.8)
2323
claide (>= 1.0.2, < 2.0)
24-
cocoapods-core (= 1.15.2)
24+
cocoapods-core (= 1.15.0)
2525
cocoapods-deintegrate (>= 1.0.3, < 2.0)
2626
cocoapods-downloader (>= 2.1, < 3.0)
2727
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -38,7 +38,7 @@ GEM
3838
xcodeproj (>= 1.23.0, < 2.0)
3939
cocoapods-check (1.1.0)
4040
cocoapods (~> 1.0)
41-
cocoapods-core (1.15.2)
41+
cocoapods-core (1.15.0)
4242
activesupport (>= 5.0, < 8)
4343
addressable (~> 2.8)
4444
algoliasearch (~> 1.0)
@@ -62,43 +62,41 @@ GEM
6262
escape (0.0.4)
6363
ethon (0.16.0)
6464
ffi (>= 1.15.0)
65-
ffi (1.16.3)
65+
ffi (1.17.0)
6666
fourflusher (2.3.1)
6767
fuzzy_match (2.0.4)
6868
gh_inspector (1.1.3)
6969
httpclient (2.8.3)
7070
i18n (1.14.1)
7171
concurrent-ruby (~> 1.0)
72-
json (2.7.2)
72+
json (2.8.2)
7373
minitest (5.20.0)
7474
molinillo (0.8.0)
75-
nanaimo (0.3.0)
75+
nanaimo (0.4.0)
7676
nap (1.1.0)
7777
netrc (0.11.0)
7878
nkf (0.2.0)
7979
public_suffix (4.0.7)
80-
rexml (3.3.6)
81-
strscan
80+
rexml (3.3.9)
8281
ruby-macho (2.5.1)
83-
strscan (3.1.0)
8482
typhoeus (1.4.1)
8583
ethon (>= 0.9.0)
8684
tzinfo (2.0.6)
8785
concurrent-ruby (~> 1.0)
88-
xcodeproj (1.25.0)
86+
xcodeproj (1.27.0)
8987
CFPropertyList (>= 2.3.3, < 4.0)
9088
atomos (~> 0.1.3)
9189
claide (>= 1.0.2, < 2.0)
9290
colored2 (~> 3.1)
93-
nanaimo (~> 0.3.0)
94-
rexml (>= 3.3.2, < 4.0)
91+
nanaimo (~> 0.4.0)
92+
rexml (>= 3.3.6, < 4.0)
9593

9694
PLATFORMS
9795
ruby
9896

9997
DEPENDENCIES
10098
activesupport (>= 6.1.7.5, < 7.1.0)
101-
cocoapods (>= 1.15)
99+
cocoapods (= 1.15.0)
102100
cocoapods-check (= 1.1.0)
103101

104102
RUBY VERSION

sample/android/app/build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ react {
5353
hermesFlags = ["-O", "-output-source-map"]
5454
}
5555

56-
/**
57-
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
58-
*/
59-
def enableProguardInReleaseBuilds = false
60-
6156
/**
6257
* The preferred build flavor of JavaScriptCore (JSC)
6358
*
@@ -115,7 +110,7 @@ android {
115110
}
116111
release {
117112
signingConfig signingConfigs.release
118-
minifyEnabled enableProguardInReleaseBuilds
113+
minifyEnabled true
119114
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
120115
}
121116
}

0 commit comments

Comments
 (0)