Skip to content

Commit

Permalink
Upgrade android app to use gradle 3
Browse files Browse the repository at this point in the history
  • Loading branch information
akilburge committed Jun 5, 2018
1 parent f7a726e commit b7648b3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
30 changes: 11 additions & 19 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = true

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.rukatuk.app"
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3
versionName "2.0.1"
ndk {
Expand Down Expand Up @@ -158,26 +158,18 @@ android {
}

dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-config')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-navigation')

compile(project(':react-native-maps')) {
exclude group: 'com.google.android.gms'
}

compile 'com.google.android.gms:play-services-base:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.2.0'
implementation project(':react-native-vector-icons')
implementation project(':react-native-config')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-navigation')
implementation project(':react-native-maps')
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply plugin: 'com.google.gms.google-services'
}
21 changes: 19 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -26,3 +26,20 @@ allprojects {
}
}
}

ext {
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = "27.0.3"
}

subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 23 08:41:06 BST 2017
#Tue Jun 05 19:37:53 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit b7648b3

Please sign in to comment.