Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Rn57 android build fix #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions android/app/build.gradle
Expand Up @@ -94,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.rncameraexample"
minSdkVersion 16
targetSdkVersion 22
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
ndk {
Expand Down Expand Up @@ -138,9 +138,9 @@ android {

dependencies {
compile project(':react-native-camera')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be implementation?

compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}

// Run this once to be able to run the application with BUCK
Expand Down
23 changes: 16 additions & 7 deletions android/build.gradle
@@ -1,12 +1,20 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
}
repositories {
jcenter()
maven { url 'https://maven.google.com' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,24 +23,20 @@ buildscript {

allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
maven {
url "https://maven.google.com" // Google's Maven repository
}
maven { url "https://jitpack.io" }
}
}

ext {
compileSdkVersion = 26
buildToolsVersion = '26.0.2'
}

subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
Expand All @@ -43,3 +47,8 @@ subprojects { subproject ->
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
#Sun Jan 07 08:54:18 PST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -4,9 +4,9 @@
"dependencies": {
"@babel/runtime": "^7.1.2",
"babel": "^6.23.0",
"react": "16.5.0",
"react-native": "0.57.1",
"react-native-camera": "git+ssh://git@github.com/react-native-community/react-native-camera#fd87a3475aedf64243fc0cc5f225dcbf2484bbab"
"react": "^16.6.0-alpha.8af6728",
"react-native": "0.57.3",
"react-native-camera": "git+ssh://git@github.com/react-native-community/react-native-camera#31ab64"
},
"devDependencies": {
"babel-jest": "23.6.0",
Expand All @@ -22,6 +22,7 @@
"clear": "node node_modules/react-native/local-cli/cli.js start --reset-cache",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"run-android": "react-native run-android",
"postinstall": "scripts/post.sh"
}
}