From f02448d26562e63d561c1b3b088f79af409bb2bc Mon Sep 17 00:00:00 2001 From: Cesar de la Vega <664544+vegaro@users.noreply.github.com> Date: Thu, 9 Jul 2026 12:38:17 +0200 Subject: [PATCH 1/9] test: scaffold perftester app module --- local.properties.example | 7 +++ settings.gradle.kts | 1 + test-apps/perftester/.gitignore | 1 + test-apps/perftester/build.gradle.kts | 57 +++++++++++++++++++ .../perftester/src/main/AndroidManifest.xml | 23 ++++++++ .../com/revenuecat/perftester/MainActivity.kt | 18 ++++++ .../src/main/res/values/strings.xml | 4 ++ .../perftester/src/main/res/values/themes.xml | 5 ++ 8 files changed, 116 insertions(+) create mode 100644 test-apps/perftester/.gitignore create mode 100644 test-apps/perftester/build.gradle.kts create mode 100644 test-apps/perftester/src/main/AndroidManifest.xml create mode 100644 test-apps/perftester/src/main/java/com/revenuecat/perftester/MainActivity.kt create mode 100644 test-apps/perftester/src/main/res/values/strings.xml create mode 100644 test-apps/perftester/src/main/res/values/themes.xml diff --git a/local.properties.example b/local.properties.example index 8f5967d9ee..6e9dbb8d6f 100644 --- a/local.properties.example +++ b/local.properties.example @@ -74,3 +74,10 @@ ## Debug flags ## ────────────────────────────────────────────── #ENABLE_EXTRA_REQUEST_LOGGING=true + +## ────────────────────────────────────────────── +## Perf tester app (test-apps:perftester) +## Test Store API key recommended: the SDK selects SimulatedStoreBillingWrapper +## from the key type, so products resolve without any Play setup. +## ────────────────────────────────────────────── +#PERF_TESTER_API_KEY=your_test_store_key diff --git a/settings.gradle.kts b/settings.gradle.kts index 78048168ed..d19ac1895f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -74,4 +74,5 @@ include(":detekt-rules") include(":dokka-hide-internal") include(":baselineprofile") include(":test-apps:e2etests") +include(":test-apps:perftester") include(":examples:rcttester") diff --git a/test-apps/perftester/.gitignore b/test-apps/perftester/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/test-apps/perftester/.gitignore @@ -0,0 +1 @@ +/build diff --git a/test-apps/perftester/build.gradle.kts b/test-apps/perftester/build.gradle.kts new file mode 100644 index 0000000000..d71037ad80 --- /dev/null +++ b/test-apps/perftester/build.gradle.kts @@ -0,0 +1,57 @@ +import java.util.Properties + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.compose.compiler) +} + +val localProperties = Properties().apply { + val localPropsFile = rootProject.file("local.properties") + if (localPropsFile.exists()) { + localPropsFile.inputStream().use { load(it) } + } +} + +android { + namespace = "com.revenuecat.perftester" + compileSdk = 36 + + defaultConfig { + applicationId = "com.revenuecat.perftester" + minSdk = 24 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + missingDimensionStrategy("apis", "defaults") + + buildConfigField( + "String", + "PERF_TESTER_API_KEY", + "\"${localProperties.getProperty("PERF_TESTER_API_KEY", "")}\"", + ) + } + + buildFeatures { + compose = true + buildConfig = true + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } +} + +dependencies { + implementation(project(":purchases")) + + implementation(libs.androidx.core) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.activity.compose) + implementation(platform(libs.compose.bom)) + implementation(libs.compose.ui) + implementation(libs.compose.material3) +} diff --git a/test-apps/perftester/src/main/AndroidManifest.xml b/test-apps/perftester/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..7f02af6efb --- /dev/null +++ b/test-apps/perftester/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/test-apps/perftester/src/main/java/com/revenuecat/perftester/MainActivity.kt b/test-apps/perftester/src/main/java/com/revenuecat/perftester/MainActivity.kt new file mode 100644 index 0000000000..26b1e7ebf1 --- /dev/null +++ b/test-apps/perftester/src/main/java/com/revenuecat/perftester/MainActivity.kt @@ -0,0 +1,18 @@ +package com.revenuecat.perftester + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + MaterialTheme { + Text("perftester") + } + } + } +} diff --git a/test-apps/perftester/src/main/res/values/strings.xml b/test-apps/perftester/src/main/res/values/strings.xml new file mode 100644 index 0000000000..467db11f15 --- /dev/null +++ b/test-apps/perftester/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + RC Perf Tester + diff --git a/test-apps/perftester/src/main/res/values/themes.xml b/test-apps/perftester/src/main/res/values/themes.xml new file mode 100644 index 0000000000..1e7d1438ed --- /dev/null +++ b/test-apps/perftester/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +