Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Commit

Permalink
Fixing android tests and build
Browse files Browse the repository at this point in the history
  • Loading branch information
birkir committed Jul 26, 2018
1 parent 623535d commit 46cadaa
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 30 deletions.
9 changes: 5 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 25
buildToolsVersion '27.0.1'
compileSdkVersion 26
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.ueno.reactnativestarter"
minSdkVersion 21
targetSdkVersion 22
targetSdkVersion 26
versionCode 26
versionName "2.0.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative55"
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative56"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -132,6 +132,7 @@ android {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.debug
}
}
applicationVariants.all { variant ->
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="22" />
android:targetSdkVersion="26" />

<application
android:name=".MainApplication"
Expand Down
20 changes: 19 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@ project.ext {
minSdkVersion = 21
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = '27.0.1'
buildToolsVersion = '27.0.3'
}

subprojects { subproject ->
afterEvaluate {
if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
variantFilter { variant ->
def names = variant.flavors*.name
if (names.contains("reactNative51") || names.contains("reactNative55")) {
setIgnore(true)
}
}

compileSdkVersion 26
buildToolsVersion '27.0.3'
}
}
}
}

buildscript {
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"dependencies": {
"core-decorators": "0.20.0",
"date-fns": "1.29.0",
"jsc-android": "224109.0.0",
"lodash": "4.17.10",
"mobx": "5.0.3",
"mobx-react": "5.2.3",
Expand All @@ -36,7 +37,7 @@
"react-native-config": "0.11.5",
"react-native-fast-image": "4.0.14",
"react-native-firebase": "4.3.8",
"react-native-navigation": "2.0.2394",
"react-native-navigation": "2.0.2431",
"react-native-sentry": "0.38.3",
"react-native-version-number": "0.3.4"
},
Expand Down Expand Up @@ -84,18 +85,18 @@
"typescript": "2.9.2"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"<rootDir>/scripts/jest-setup.js"
],
"preset": "react-native",
"setupFiles": [
"<rootDir>/scripts/jest-setup.js"
],
"transform": {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.jsx?$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
"^.+\\.jsx?$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
"^.+\\.css$": "<rootDir>/scripts/jest-css.js"
},
"modulePaths": [
"<rootDir>"
],
"modulePaths": [
"<rootDir>"
],
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"testPathIgnorePatterns": [
"<rootDir>/node_modules/",
Expand All @@ -106,8 +107,8 @@
"tsx",
"js",
"jsx",
"json",
"node"
"json",
"node"
]
},
"detox": {
Expand All @@ -124,7 +125,7 @@
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "pushd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && popd",
"type": "android.emulator",
"name": "Nexus_5_API_27"
"name": "Nexus_5X_API_28"
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,9 @@
dependencies:
"@types/react" "*"

"@types/react-native@0.51.1":
version "0.51.1"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.51.1.tgz#ab47c0d17c68149cbe5233d9f67dc586c61146df"
"@types/react-native@0.51.x":
version "0.51.10"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.51.10.tgz#ab060c0b87110a32a2e797ebaef5b485a7856217"
dependencies:
"@types/react" "*"

Expand Down Expand Up @@ -4205,6 +4205,10 @@ jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"

jsc-android@224109.0.0:
version "224109.0.0"
resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-224109.0.0.tgz#decd9f4b6f76280a01697a3be9c1e56620659c2a"

jsdom@^11.5.1:
version "11.11.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.11.0.tgz#df486efad41aee96c59ad7a190e2449c7eb1110e"
Expand Down Expand Up @@ -5826,10 +5830,6 @@ rc@^1.0.1, rc@^1.1.2, rc@^1.1.6, rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

react-addons-test-utils@15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.6.2.tgz#c12b6efdc2247c10da7b8770d185080a7b047156"

react-clone-referenced-element@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/react-clone-referenced-element/-/react-clone-referenced-element-1.0.1.tgz#2bba8c69404c5e4a944398600bcc4c941f860682"
Expand Down Expand Up @@ -5902,15 +5902,15 @@ react-native-firebase@4.3.8:
postinstall-build "^5.0.1"
prop-types "^15.6.1"

react-native-navigation@2.0.2394:
version "2.0.2394"
resolved "https://registry.yarnpkg.com/react-native-navigation/-/react-native-navigation-2.0.2394.tgz#c454d007bbb30d6c474f988c10c2113c06030a79"
react-native-navigation@2.0.2431:
version "2.0.2431"
resolved "https://registry.yarnpkg.com/react-native-navigation/-/react-native-navigation-2.0.2431.tgz#dfd65c9b88e4ccf021cab6bd562176f5b1c2a92e"
dependencies:
"@types/jest" "22.x.x"
"@types/lodash" "4.x.x"
"@types/prop-types" "15.x.x"
"@types/react" "16.x.x"
"@types/react-native" "0.51.1"
"@types/react-native" "0.51.x"
"@types/react-test-renderer" "16.x.x"
hoist-non-react-statics "2.x.x"
lodash "4.x.x"
Expand Down

0 comments on commit 46cadaa

Please sign in to comment.