diff --git a/.github/workflows/e2e-harness-android.yml b/.github/workflows/e2e-harness-android.yml index 14b215d39..4f5083a6f 100644 --- a/.github/workflows/e2e-harness-android.yml +++ b/.github/workflows/e2e-harness-android.yml @@ -22,7 +22,7 @@ on: jobs: e2e-harness-android: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.label.name == 'e2e-harness-android' || github.event.label.name == 'e2e' }} - runs-on: [self-hosted, macos, ARM64] + runs-on: [self-hosted, macos] steps: - uses: actions/checkout@v2 - name: Setup diff --git a/.github/workflows/e2e-harness-androidtv.yml b/.github/workflows/e2e-harness-androidtv.yml index 7c624dea7..36ef3494a 100644 --- a/.github/workflows/e2e-harness-androidtv.yml +++ b/.github/workflows/e2e-harness-androidtv.yml @@ -22,7 +22,7 @@ on: jobs: e2e-harness-androidtv: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.label.name == 'e2e-harness-androidtv' || github.event.label.name == 'e2e' }} - runs-on: [self-hosted, macos, ARM64] + runs-on: [self-hosted, macos] steps: - uses: actions/checkout@v2 - name: Setup diff --git a/.github/workflows/e2e-harness-ios.yml b/.github/workflows/e2e-harness-ios.yml index 3b275ad72..4badb7759 100644 --- a/.github/workflows/e2e-harness-ios.yml +++ b/.github/workflows/e2e-harness-ios.yml @@ -22,7 +22,7 @@ on: jobs: e2e-harness-ios: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.label.name == 'e2e-harness-ios' || github.event.label.name == 'e2e' }} - runs-on: [self-hosted, macos, ARM64] + runs-on: [self-hosted, macos] steps: - uses: actions/checkout@v2 - name: Setup diff --git a/.github/workflows/e2e-template-ios.yml b/.github/workflows/e2e-template-ios.yml index c375e687f..4ca5328f7 100644 --- a/.github/workflows/e2e-template-ios.yml +++ b/.github/workflows/e2e-template-ios.yml @@ -22,7 +22,7 @@ on: jobs: e2e-template-ios: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.label.name == 'e2e-template-ios' || github.event.label.name == 'e2e' }} - runs-on: [self-hosted, macos, ARM64] + runs-on: [self-hosted, macos] steps: - uses: actions/checkout@v2 - name: Setup diff --git a/packages/app-harness/wdio.conf.js b/packages/app-harness/wdio.conf.js index b25ccc246..3be2ef903 100644 --- a/packages/app-harness/wdio.conf.js +++ b/packages/app-harness/wdio.conf.js @@ -13,6 +13,19 @@ if (deviceTarget) { console.log(`Using custom device target: ${deviceTarget}`); } +// Verify app exists before setting capabilities +const verifyAppPath = (appPath, platform) => { + console.log(`\nšŸ” Checking app path for ${platform}...`); + console.log(` Path: ${appPath}`); + if (!fs.existsSync(appPath)) { + console.warn(`āš ļø App not found at: ${appPath}`); + console.warn(` Make sure you've built the app first: yarn build:${platform}-test`); + return false; + } + console.log(`āœ… App found!`); + return true; +}; + const capabilities = { ios: [ { @@ -21,7 +34,14 @@ const capabilities = { 'appium:platformVersion': '16.4', 'appium:automationName': 'XCUITest', 'appium:bundleId': 'renative.harness.test', - 'appium:app': 'platformBuilds/harness_ios/build/RNVApp/Build/Products/Release-iphonesimulator/RNVApp.app', + 'appium:app': (() => { + const appPath = path.resolve( + __dirname, + 'platformBuilds/harness_ios/build/RNVApp/Build/Products/Release-iphonesimulator/RNVApp.app' + ); + verifyAppPath(appPath, 'ios'); + return appPath; + })(), 'appium:fullReset': true, }, ], @@ -32,8 +52,14 @@ const capabilities = { 'appium:platformVersion': '16.4', 'appium:automationName': 'XCUITest', 'appium:bundleId': 'renative.harness.test', - 'appium:app': - 'platformBuilds/harness_tvos/build/RNVApp/Build/Products/Release-appletvsimulator/RNVApp-tvOS.app', + 'appium:app': (() => { + const appPath = path.resolve( + __dirname, + 'platformBuilds/harness_tvos/build/RNVApp/Build/Products/Release-appletvsimulator/RNVApp-tvOS.app' + ); + verifyAppPath(appPath, 'tvos'); + return appPath; + })(), 'appium:fullReset': true, }, ], @@ -145,7 +171,7 @@ const config = { // Define all options that are relevant for the WebdriverIO instance here // // Level of logging verbosity: trace | debug | info | warn | error | silent - logLevel: 'info', + logLevel: 'debug', // // Set specific log levels per logger // loggers: @@ -196,6 +222,7 @@ const config = { [ 'appium', { + logPath: './reporting/', args: { ...(process.env.PLATFORM === 'ios' && { port: 3001, @@ -209,6 +236,8 @@ const config = { ...(process.env.PLATFORM === 'androidtv' && { port: 3004, }), + relaxedSecurity: true, + log: './reporting/appium.log', }, }, ], diff --git a/packages/core/src/schema/platforms/fragments/android.ts b/packages/core/src/schema/platforms/fragments/android.ts index df53e81f2..652c2129a 100644 --- a/packages/core/src/schema/platforms/fragments/android.ts +++ b/packages/core/src/schema/platforms/fragments/android.ts @@ -31,7 +31,7 @@ export const zodPlatformAndroidFragment = z .describe( 'Allows you define custom compileSdkVersion equivalent to: `compileSdkVersion = [VERSION]` in build.gradle' ), - kotlinVersion: z.string().default('1.7.10').describe('Allows you define custom kotlin version'), + kotlinVersion: z.string().default('2.0.21').describe('Allows you define custom kotlin version'), ndkVersion: z .string() .describe('Allows you define custom ndkVersion equivalent to: `ndkVersion = [VERSION]` in build.gradle'), diff --git a/packages/sdk-android/src/gradleParser.ts b/packages/sdk-android/src/gradleParser.ts index cb2c74e14..38acba477 100644 --- a/packages/sdk-android/src/gradleParser.ts +++ b/packages/sdk-android/src/gradleParser.ts @@ -188,7 +188,7 @@ export const parseAppBuildGradleSync = () => { c.payload.pluginConfigAndroid.gradleBuildToolsVersion = getConfigProp('gradleBuildToolsVersion') || '4.2.2'; c.payload.pluginConfigAndroid.supportLibVersion = getConfigProp('supportLibVersion') || '28.0.0'; c.payload.pluginConfigAndroid.buildToolsVersion = getConfigProp('buildToolsVersion') || '35.0.0'; - c.payload.pluginConfigAndroid.kotlinVersion = getConfigProp('kotlinVersion') || '1.9.24'; + c.payload.pluginConfigAndroid.kotlinVersion = getConfigProp('kotlinVersion') || '2.0.21'; c.payload.pluginConfigAndroid.googleServicesVersion = getConfigProp('googleServicesVersion') || '4.2.0'; const reactNativeEngine = getConfigProp('reactNativeEngine') || 'hermes'; diff --git a/packages/template-starter/renative.json b/packages/template-starter/renative.json index a8aa38d6a..47db47a18 100644 --- a/packages/template-starter/renative.json +++ b/packages/template-starter/renative.json @@ -54,7 +54,7 @@ "gradleBuildToolsVersion": "4.2.2", "gradleWrapperVersion": "8.10.2", "ndkVersion": "26.1.10909125", - "kotlinVersion": "1.9.24", + "kotlinVersion": "2.0.21", "reactNativeEngine": "hermes", "enableAndroidX": true, "newArchEnabled": true, diff --git a/packages/template-starter/wdio.conf.js b/packages/template-starter/wdio.conf.js index c0f5eda04..7aa65b084 100644 --- a/packages/template-starter/wdio.conf.js +++ b/packages/template-starter/wdio.conf.js @@ -13,6 +13,19 @@ if (deviceTarget) { console.log(`Using custom device target: ${deviceTarget}`); } +// Verify app exists before setting capabilities +const verifyAppPath = (appPath, platform) => { + console.log(`\nšŸ” Checking app path for ${platform}...`); + console.log(` Path: ${appPath}`); + if (!fs.existsSync(appPath)) { + console.warn(`āš ļø App not found at: ${appPath}`); + console.warn(` Make sure you've built the app first: yarn build:${platform}-test`); + return false; + } + console.log(`āœ… App found!`); + return true; +}; + const capabilities = { ios: [ { @@ -21,7 +34,14 @@ const capabilities = { 'appium:platformVersion': '16.4', 'appium:automationName': 'XCUITest', 'appium:bundleId': 'renative.helloworld.test', - 'appium:app': 'platformBuilds/template_ios/build/RNVApp/Build/Products/Release-iphonesimulator/RNVApp.app', + 'appium:app': (() => { + const appPath = path.resolve( + __dirname, + 'platformBuilds/template_ios/build/RNVApp/Build/Products/Release-iphonesimulator/RNVApp.app' + ); + verifyAppPath(appPath, 'ios'); + return appPath; + })(), 'appium:fullReset': true, }, ], @@ -32,8 +52,14 @@ const capabilities = { 'appium:platformVersion': '16.4', 'appium:automationName': 'XCUITest', 'appium:bundleId': 'renative.helloworld.test', - 'appium:app': - 'platformBuilds/template_tvos/build/RNVApp/Build/Products/Release-appletvsimulator/RNVApp-tvOS.app', + 'appium:app': (() => { + const appPath = path.resolve( + __dirname, + 'platformBuilds/template_tvos/build/RNVApp/Build/Products/Release-appletvsimulator/RNVApp-tvOS.app' + ); + verifyAppPath(appPath, 'tvos'); + return appPath; + })(), 'appium:fullReset': true, }, ], @@ -45,7 +71,11 @@ const capabilities = { 'appium:automationName': 'UiAutomator2', 'appium:appPackage': 'renative.helloworld.test', 'appium:appActivity': 'renative.helloworld.test.MainActivity', - 'appium:app': 'platformBuilds/template_android/app/build/outputs/apk/release/app-release.apk', + 'appium:app': (() => { + const appPath = path.resolve(__dirname, 'platformBuilds/template_android/app/build/outputs/apk/release/app-release.apk'); + verifyAppPath(appPath, 'android'); + return appPath; + })(), 'appium:fullReset': true, }, ], @@ -57,7 +87,11 @@ const capabilities = { 'appium:automationName': 'UiAutomator2', 'appium:appPackage': 'renative.helloworld.test', 'appium:appActivity': 'renative.helloworld.test.MainActivity', - 'appium:app': 'platformBuilds/template_androidtv/app/build/outputs/apk/release/app-release.apk', + 'appium:app': (() => { + const appPath = path.resolve(__dirname, 'platformBuilds/template_androidtv/app/build/outputs/apk/release/app-release.apk'); + verifyAppPath(appPath, 'androidtv'); + return appPath; + })(), 'appium:fullReset': true, }, ],