Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 4359c184 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #8334 from wmontwe/add-billing-client

Add billing client
parents e7b79398 53f63d1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -220,7 +220,7 @@ dependencies {


    "fossImplementation"(projects.feature.funding.link)
    "fossImplementation"(projects.feature.funding.link)


    fullDebugImplementation(projects.feature.funding.link)
    fullDebugImplementation(projects.feature.funding.googleplay)
    fullDailyImplementation(projects.feature.funding.googleplay)
    fullDailyImplementation(projects.feature.funding.googleplay)
    fullBetaImplementation(projects.feature.funding.googleplay)
    fullBetaImplementation(projects.feature.funding.googleplay)
    fullReleaseImplementation(projects.feature.funding.googleplay)
    fullReleaseImplementation(projects.feature.funding.googleplay)
+1 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
    override fun createFeatureCatalog(): List<FeatureFlag> {
    override fun createFeatureCatalog(): List<FeatureFlag> {
        return listOf(
        return listOf(
            FeatureFlag(FeatureFlagKey("material3_navigation_drawer"), true),
            FeatureFlag(FeatureFlagKey("material3_navigation_drawer"), true),
            FeatureFlag(FeatureFlagKey("funding_google_play"), false),
            FeatureFlag(FeatureFlagKey("funding_google_play"), true),
        )
        )
    }
    }
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -10,10 +10,12 @@ android {
dependencies {
dependencies {
    api(projects.feature.funding.api)
    api(projects.feature.funding.api)


    implementation(projects.core.common)
    implementation(projects.core.ui.compose.designsystem)
    implementation(projects.core.ui.compose.designsystem)


    implementation(libs.android.billing)
    implementation(libs.android.billing)
    implementation(libs.android.billing.ktx)
    implementation(libs.android.billing.ktx)
    implementation(libs.timber)


    testImplementation(projects.core.ui.compose.testing)
    testImplementation(projects.core.ui.compose.testing)
}
}
+18 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android">

    <application>

        <meta-data
            android:name="com.google.android.play.largest_release_audience.NONPRODUCTION"
            android:value=""
            />
        <meta-data
            android:name="com.google.android.play.billingclient.enableBillingOverridesTesting"
            android:value="true"
            />

    </application>

</manifest>
+38 −2
Original line number Original line Diff line number Diff line
@@ -11,8 +11,10 @@ fun ContributionFooterPreview() {
        ContributionFooter(
        ContributionFooter(
            onPurchaseClick = {},
            onPurchaseClick = {},
            onManagePurchaseClick = {},
            onManagePurchaseClick = {},
            onShowContributionListClick = {},
            purchasedContribution = null,
            purchasedContribution = null,
            isPurchaseEnabled = true,
            isPurchaseEnabled = true,
            isContributionListShown = true,
        )
        )
    }
    }
}
}
@@ -22,9 +24,11 @@ fun ContributionFooterPreview() {
fun ContributionFooterDisabledPreview() {
fun ContributionFooterDisabledPreview() {
    PreviewWithTheme {
    PreviewWithTheme {
        ContributionFooter(
        ContributionFooter(
            purchasedContribution = null,
            onPurchaseClick = {},
            onPurchaseClick = {},
            onManagePurchaseClick = {},
            onManagePurchaseClick = {},
            purchasedContribution = null,
            onShowContributionListClick = {},
            isContributionListShown = false,
            isPurchaseEnabled = false,
            isPurchaseEnabled = false,
        )
        )
    }
    }
@@ -35,10 +39,42 @@ fun ContributionFooterDisabledPreview() {
fun ContributionFooterWithRecurringContributionPreview() {
fun ContributionFooterWithRecurringContributionPreview() {
    PreviewWithTheme {
    PreviewWithTheme {
        ContributionFooter(
        ContributionFooter(
            purchasedContribution = FakeData.recurringContribution,
            onPurchaseClick = {},
            onPurchaseClick = {},
            onManagePurchaseClick = {},
            onManagePurchaseClick = {},
            purchasedContribution = FakeData.recurringContribution,
            onShowContributionListClick = {},
            isPurchaseEnabled = true,
            isContributionListShown = false,
        )
    }
}

@Composable
@Preview(showBackground = true)
fun ContributionFooterWithOneTimeContributionPreview() {
    PreviewWithTheme {
        ContributionFooter(
            purchasedContribution = FakeData.oneTimeContribution,
            onPurchaseClick = {},
            onManagePurchaseClick = {},
            onShowContributionListClick = {},
            isPurchaseEnabled = true,
            isContributionListShown = false,
        )
    }
}

@Composable
@Preview(showBackground = true)
fun ContributionFooterWithOneTimeContributionAndListPreview() {
    PreviewWithTheme {
        ContributionFooter(
            purchasedContribution = FakeData.oneTimeContribution,
            onPurchaseClick = {},
            onManagePurchaseClick = {},
            onShowContributionListClick = {},
            isPurchaseEnabled = true,
            isPurchaseEnabled = true,
            isContributionListShown = true,
        )
        )
    }
    }
}
}
Loading