From c5f4f4b6706906e1ec62a68367b5eb8c1f6aa475 Mon Sep 17 00:00:00 2001 From: Amit Davidi Date: Sun, 26 May 2019 15:17:09 +0300 Subject: [PATCH 1/3] Upgrade Android test app and lib to RN 59.8 and Android sdk to 28 --- detox/android/build.gradle | 4 ++-- detox/android/detox/build.gradle | 6 +++--- detox/android/gradle/wrapper/gradle-wrapper.properties | 4 ++-- detox/package.json | 2 +- detox/test/android/app/build.gradle | 6 +++--- .../app/src/androidTest/java/com/example/DetoxTest.java | 2 +- detox/test/android/app/src/main/AndroidManifest.xml | 5 +---- .../app/src/main/java/com/example/MainApplication.java | 1 - detox/test/android/build.gradle | 5 +++-- detox/test/android/gradle.properties | 1 - detox/test/android/gradle/wrapper/gradle-wrapper.properties | 4 ++-- detox/test/package.json | 4 ++-- 12 files changed, 20 insertions(+), 24 deletions(-) diff --git a/detox/android/build.gradle b/detox/android/build.gradle index bc6c58a130..708954c6f8 100644 --- a/detox/android/build.gradle +++ b/detox/android/build.gradle @@ -2,15 +2,15 @@ buildscript { ext.isOfficialDetoxLib = true ext.kotlinVersion = '1.3.0' ext.detoxKotlinVerion = ext.kotlinVersion - ext.buildToolsVersion = '27.0.3' ext.dokkaVersion = '0.9.18' + ext.buildToolsVersion = '28.0.3' repositories { jcenter() google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" } diff --git a/detox/android/detox/build.gradle b/detox/android/detox/build.gradle index 0f7b924fcd..6d6b86e358 100644 --- a/detox/android/detox/build.gradle +++ b/detox/android/detox/build.gradle @@ -4,10 +4,10 @@ apply plugin: 'kotlin-android-extensions' def _ext = rootProject.ext -def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 25 -def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '27.0.3' +def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 28 +def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '28.0.3' def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 18 -def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 25 +def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 28 def _kotlinVersion = _ext.has('detoxKotlinVersion') ? _ext.detoxKotlinVersion : '1.2.0' def _kotlinStdlib = _ext.has('detoxKotlinStdlib') ? _ext.detoxKotlinStdlib : 'kotlin-stdlib-jdk8' diff --git a/detox/android/gradle/wrapper/gradle-wrapper.properties b/detox/android/gradle/wrapper/gradle-wrapper.properties index 815b0d783e..e70bc16216 100644 --- a/detox/android/gradle/wrapper/gradle-wrapper.properties +++ b/detox/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Dec 20 14:09:27 IST 2017 +#Sun May 26 15:32:06 IDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/detox/package.json b/detox/package.json index 4822f8280e..466231b703 100644 --- a/detox/package.json +++ b/detox/package.json @@ -34,7 +34,7 @@ "jest": "24.6.x", "mockdate": "^2.0.1", "prettier": "1.7.0", - "react-native": "0.56.0", + "react-native": "0.59.8", "wtfnode": "^0.8.0" }, "dependencies": { diff --git a/detox/test/android/app/build.gradle b/detox/test/android/app/build.gradle index d0cf81bdf7..c69af46679 100644 --- a/detox/test/android/app/build.gradle +++ b/detox/test/android/app/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'com.android.application' apply from: "../../node_modules/react-native/react.gradle" android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.wix.detox.test" minSdkVersion 18 - targetSdkVersion 26 + targetSdkVersion 28 versionCode 1 versionName "1.0" ndk { @@ -63,7 +63,7 @@ android { } dependencies { - implementation "com.android.support:appcompat-v7:27.1.1" + implementation "com.android.support:appcompat-v7:28.0.0" fromSourceImplementation(project(path: ":ReactAndroid")) // noinspection GradleDynamicVersion diff --git a/detox/test/android/app/src/androidTest/java/com/example/DetoxTest.java b/detox/test/android/app/src/androidTest/java/com/example/DetoxTest.java index 4ec717274f..5a0c347ee3 100644 --- a/detox/test/android/app/src/androidTest/java/com/example/DetoxTest.java +++ b/detox/test/android/app/src/androidTest/java/com/example/DetoxTest.java @@ -1,8 +1,8 @@ package com.example; import android.os.Bundle; -import android.test.suitebuilder.annotation.LargeTest; +import androidx.test.filters.LargeTest; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.rule.ActivityTestRule; diff --git a/detox/test/android/app/src/main/AndroidManifest.xml b/detox/test/android/app/src/main/AndroidManifest.xml index a18b83dd31..b55927060b 100644 --- a/detox/test/android/app/src/main/AndroidManifest.xml +++ b/detox/test/android/app/src/main/AndroidManifest.xml @@ -7,16 +7,13 @@ - -