From 4956f66657d7cb987150a5500f73bdf1f40898b3 Mon Sep 17 00:00:00 2001 From: Ryan Brooks Date: Mon, 30 Dec 2024 20:23:30 -0800 Subject: [PATCH 1/3] Add universal snapshot APK --- settings.gradle.kts | 1 + .../build.gradle.kts | 51 +++++++++++++++++++ .../src/main/AndroidManifest.xml | 20 ++++++++ 3 files changed, 72 insertions(+) create mode 100644 snapshots/snapshots-universal-invoker/build.gradle.kts create mode 100644 snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml diff --git a/settings.gradle.kts b/settings.gradle.kts index f773df6c..1e35cf73 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,6 +34,7 @@ include( ":snapshots:snapshots", ":snapshots:snapshots-annotations", ":snapshots:snapshots-shared", + ":snapshots:snapshots-universal-invoker", ":snapshots:sample", ":snapshots:sample:app", ":snapshots:sample:ui-module", diff --git a/snapshots/snapshots-universal-invoker/build.gradle.kts b/snapshots/snapshots-universal-invoker/build.gradle.kts new file mode 100644 index 00000000..75cbe45a --- /dev/null +++ b/snapshots/snapshots-universal-invoker/build.gradle.kts @@ -0,0 +1,51 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.serialization) +} + +android { + namespace = "com.emergetools.snapshots.universalinvoker" + compileSdk = 35 + + defaultConfig { + minSdk = 29 + targetSdk = 35 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + signingConfig = signingConfigs.getByName("debug") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() + } + + buildFeatures { + compose = true + } +} + +dependencies { + + implementation(platform(libs.compose.bom)) + implementation(libs.compose.runtime) + implementation(libs.compose.ui) + implementation(libs.compose.foundation.android) + + implementation(projects.snapshots.snapshots) + implementation(libs.androidx.test.ext.junit) + implementation(libs.kotlinx.serialization) +} diff --git a/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml new file mode 100644 index 00000000..616332b4 --- /dev/null +++ b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + From ac6956726152e52f5a6908a7d213120424510bce Mon Sep 17 00:00:00 2001 From: Ryan Brooks Date: Wed, 1 Jan 2025 18:16:56 -0800 Subject: [PATCH 2/3] Adjust --- .../snapshots-universal-invoker/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml index 616332b4..3e2ff05e 100644 --- a/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml +++ b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml @@ -15,6 +15,6 @@ + android:targetPackage="placeholder" /> From 609abc30d8691937ca1750a7a19670460132bf93 Mon Sep 17 00:00:00 2001 From: Ryan Brooks Date: Thu, 2 Jan 2025 10:11:44 -0800 Subject: [PATCH 3/3] TargetPackage as arg --- snapshots/snapshots-universal-invoker/build.gradle.kts | 4 +++- .../snapshots-universal-invoker/src/main/AndroidManifest.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/snapshots/snapshots-universal-invoker/build.gradle.kts b/snapshots/snapshots-universal-invoker/build.gradle.kts index 75cbe45a..f5d8b2aa 100644 --- a/snapshots/snapshots-universal-invoker/build.gradle.kts +++ b/snapshots/snapshots-universal-invoker/build.gradle.kts @@ -12,8 +12,10 @@ android { defaultConfig { minSdk = 29 targetSdk = 35 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + val targetPackage = project.properties["targetPackage"] as? String ?: "placeholder" + manifestPlaceholders["targetPackage"] = targetPackage } buildTypes { diff --git a/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml index 3e2ff05e..41e6061b 100644 --- a/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml +++ b/snapshots/snapshots-universal-invoker/src/main/AndroidManifest.xml @@ -15,6 +15,6 @@ + android:targetPackage="${targetPackage}" />