Skip to content

Commit a5a97ba

Browse files
authored
[Paywalls V2] Removes the Paywalls V2 build flag (#2127)
1 parent 51b7955 commit a5a97ba

File tree

3 files changed

+6
-28
lines changed

3 files changed

+6
-28
lines changed

.circleci/config.yml

-8
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,6 @@ commands:
129129
- store_test_results:
130130
path: ~/gsutil/
131131

132-
enable-paywalls-v2:
133-
steps:
134-
- run:
135-
name: Enable the Paywall Components build flag
136-
command: echo 'revenuecat.flag.paywallComponents=true' >> local.properties
137-
138132
jobs:
139133

140134
assemble-magic-weather-compose-sample-app:
@@ -184,7 +178,6 @@ jobs:
184178
- run:
185179
name: Verify purchases-ui target SDK compatibility (currently 34)
186180
command: ./gradlew :test-apps:testpurchasesuiandroidcompatibility:assembleDebug
187-
- enable-paywalls-v2
188181
- run:
189182
name: Run Tests
190183
command: ./gradlew lint test
@@ -372,7 +365,6 @@ jobs:
372365
- android/accept-licenses
373366
- android/restore-gradle-cache
374367
- android/restore-build-cache
375-
- enable-paywalls-v2
376368
- run:
377369
name: Prepare Keystore
378370
working_directory: examples/paywall-tester

purchases/build.gradle

-9
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ android {
3737
resources.excludes.add("META-INF/LICENSE.md")
3838
resources.excludes.add("META-INF/LICENSE-notice.md")
3939
}
40-
41-
Properties properties = new Properties()
42-
def localProperties = project.rootProject.file('local.properties')
43-
if (localProperties.exists()) properties.load(localProperties.newDataInputStream())
44-
buildConfigField(
45-
"boolean",
46-
"FLAG_PAYWALL_COMPONENTS",
47-
properties.getOrDefault("revenuecat.flag.paywallComponents", "false")
48-
)
4940
}
5041

5142
testOptions {

purchases/src/main/kotlin/com/revenuecat/purchases/common/OfferingParser.kt

+6-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import com.revenuecat.purchases.Package
88
import com.revenuecat.purchases.PackageType
99
import com.revenuecat.purchases.PresentedOfferingContext
1010
import com.revenuecat.purchases.UiConfig
11-
import com.revenuecat.purchases.api.BuildConfig
1211
import com.revenuecat.purchases.models.StoreProduct
1312
import com.revenuecat.purchases.paywalls.PaywallData
1413
import com.revenuecat.purchases.paywalls.components.common.PaywallComponentsData
@@ -140,17 +139,13 @@ internal abstract class OfferingParser {
140139

141140
@Suppress("TooGenericExceptionCaught")
142141
val paywallComponentsData: PaywallComponentsData? =
143-
if (BuildConfig.FLAG_PAYWALL_COMPONENTS) {
144-
offeringJson.optJSONObject("paywall_components")?.let {
145-
try {
146-
json.decodeFromString<PaywallComponentsData>(it.toString())
147-
} catch (e: Throwable) {
148-
errorLog("Error deserializing paywall components data", e)
149-
null
150-
}
142+
offeringJson.optJSONObject("paywall_components")?.let {
143+
try {
144+
json.decodeFromString<PaywallComponentsData>(it.toString())
145+
} catch (e: Throwable) {
146+
errorLog("Error deserializing paywall components data", e)
147+
null
151148
}
152-
} else {
153-
null
154149
}
155150

156151
val paywallComponents = if (paywallComponentsData != null && uiConfig != null) {

0 commit comments

Comments
 (0)