forked from trent_larson/crowd-funder-for-time-pwa
rename app ID from app.timesafari.app to app.timesafari & adjust tests (Java 20 works)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,10 +1,10 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace "app.timesafari.app"
|
||||
namespace "app.timesafari"
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "app.timesafari.app"
|
||||
applicationId "app.timesafari"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
|
||||
@@ -15,6 +15,6 @@ public class ExampleInstrumentedTest {
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("app.timesafari.app", appContext.getPackageName());
|
||||
assertEquals("app.timesafari", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.getcapacitor.myapp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.getcapacitor.app", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -77,13 +77,12 @@ const checkConnectedDevices = async (log) => {
|
||||
|
||||
// Verify Java installation
|
||||
const verifyJavaInstallation = (log) => {
|
||||
log('🔍 Checking Java version...');
|
||||
const javaHome = '/usr/lib/jvm/java-17-openjdk';
|
||||
log('🔍 Checking Java...');
|
||||
const javaHome = process.env.JAVA_HOME;
|
||||
if (!existsSync(javaHome)) {
|
||||
throw new Error(`Required Java 17 not found at ${javaHome}. Please install OpenJDK 17.`);
|
||||
throw new Error(`Required Java not found at ${javaHome}. Please install OpenJDK.`);
|
||||
}
|
||||
log('✅ Java 17 found');
|
||||
return { JAVA_HOME: javaHome };
|
||||
log('✅ Java found');
|
||||
};
|
||||
|
||||
// Generate test data using generate_data.ts
|
||||
@@ -265,9 +264,10 @@ async function runAndroidTests() {
|
||||
await generateTestData(log);
|
||||
|
||||
await checkConnectedDevices(log);
|
||||
const env = { ...process.env, ...verifyJavaInstallation(log) };
|
||||
await verifyJavaInstallation(log);
|
||||
await buildWebAssets(log);
|
||||
await configureAndroidProject(log);
|
||||
const env = process.env;
|
||||
await buildAndTestAndroid(log, env);
|
||||
await runAndroidApp(log, env);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ execute_deeplink() {
|
||||
echo "---"
|
||||
else
|
||||
# Stop the app before executing the deep link
|
||||
adb shell am force-stop app.timesafari.app
|
||||
adb shell am force-stop app.timesafari
|
||||
sleep 1 # Give it a moment to fully stop
|
||||
|
||||
if adb shell am start -W -a android.intent.action.VIEW \
|
||||
|
||||
Reference in New Issue
Block a user