Skip to content

Commit 4340ffe

Browse files
authored
Merge pull request #74 from apphud/develop
2.7.1
2 parents d37004c + bb9658d commit 4340ffe

File tree

7 files changed

+64
-4
lines changed

7 files changed

+64
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.7.1
2+
3+
- [Android] `proguard-rules.pro` was added
4+
15
## 2.7.0
26

37
- **BREAKING** [iOS], [Android] `addAttribution` method was renamed to `setAttribution`

android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ android {
3737
minSdkVersion 26
3838
targetSdk 34
3939
compileSdk 34
40+
consumerProguardFiles 'proguard-rules.pro'
4041
}
4142
lintOptions {
4243
disable 'InvalidPackage'

android/proguard-rules.pro

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
23+
##---------------Begin: proguard configuration for Gson ----------
24+
# Gson uses generic type information stored in a class file when working with fields. Proguard
25+
# removes such information by default, so configure it to keep all of it.
26+
-keepattributes Signature
27+
28+
# For using GSON @Expose annotation
29+
-keepattributes *Annotation*
30+
31+
# Gson specific classes
32+
-dontwarn sun.misc.**
33+
#-keep class com.google.gson.stream.** { *; }
34+
35+
# Application classes that will be serialized/deserialized over Gson
36+
-keep class com.apphud.sdk.** { <fields>; }
37+
-keep class com.apphud.fluttersdk.** { <fields>; }
38+
39+
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
40+
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
41+
-keep class * extends com.google.gson.TypeAdapter
42+
-keep class * implements com.google.gson.TypeAdapterFactory
43+
-keep class * implements com.google.gson.JsonSerializer
44+
-keep class * implements com.google.gson.JsonDeserializer
45+
46+
# Prevent R8 from leaving Data object members always null
47+
-keepclassmembers,allowobfuscation class * {
48+
@com.google.gson.annotations.SerializedName <fields>;
49+
}
50+
51+
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
52+
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
53+
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
54+
55+
##---------------End: proguard configuration for Gson ----------

android/src/main/kotlin/com/apphud/fluttersdk/ApphudPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class ApphudPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
128128

129129
private fun setHeaders() {
130130
HeadersInterceptor.X_SDK = "Flutter"
131-
HeadersInterceptor.X_SDK_VERSION = "2.7.0"
131+
HeadersInterceptor.X_SDK_VERSION = "2.7.1"
132132
}
133133

134134
override fun onDetachedFromActivityForConfigChanges() {

ios/Classes/SwiftApphudPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public class SwiftApphudPlugin: NSObject, FlutterPlugin {
3838
}
3939
private static func setHeaders() {
4040
ApphudHttpClient.shared.sdkType = "Flutter"
41-
ApphudHttpClient.shared.sdkVersion = "2.7.0"
41+
ApphudHttpClient.shared.sdkVersion = "2.7.1"
4242
}
4343
}

ios/apphud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Pod::Spec.new do |s|
77
s.name = 'apphud'
8-
s.version = '2.7.0'
8+
s.version = '2.7.1'
99
s.summary = 'Apphud SDK flutter plugin.'
1010
s.description = <<-DESC
1111
Apphud SDK flutter plugin.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: apphud
22
description: Official Apphud Flutter SDK is a lightweight open-source library to manage auto-renewable subscriptions and other in-app purchases in your iOS/Android app. No backend required.
3-
version: 2.7.0
3+
version: 2.7.1
44
homepage: 'https://apphud.com'
55
repository: 'https://github.com/apphud/ApphudSDK-Flutter'
66

0 commit comments

Comments
 (0)