Skip to content

Commit

Permalink
Switch to using androix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
smarki committed Jul 30, 2019
1 parent f019a1d commit 2a43b7c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 30 deletions.
4 changes: 4 additions & 0 deletions android/app/appcenter-post-clone.sh
@@ -1,3 +1,7 @@
# Update node version to latest; appcenter defaults to v6
brew uninstall node@6
brew install node

# Update project's dependencies
npm i

Expand Down
29 changes: 4 additions & 25 deletions android/app/build.gradle
Expand Up @@ -139,6 +139,10 @@ android {
dataBinding {
enabled true
}
packagingOptions {
pickFirst '**/libjsc.so'
pickFirst '**/libc++_shared.so'
}
}

project.ext.vectoricons = [
Expand Down Expand Up @@ -169,7 +173,6 @@ dependencies {
implementation project(":@react-native-community_async-storage")
implementation project(":mendixnative-release")
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "org.webkit:android-jsc:r245459"
}
Expand All @@ -181,28 +184,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
into "libs"
}

// Ensure that all android support dependencies use the same version, including
// other projects. Compilation might fail if this is not the case.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion rootProject.supportLibVersion
}
}
if (requested.group == "com.google.android.gms") {
// If different projects require different versions of
// Google Play Services it causes a crash on run.
// Fix by overriding version for all projects.
details.useVersion("9.6.1")
}
}

resolutionStrategy {
force "com.facebook.react:react-native:0.59.9"
force "org.webkit:android-jsc:r245459"
}
}

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
@@ -1,7 +1,8 @@
package com.mendix.nativetemplate;

import android.os.Bundle;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;


import com.mendix.mendixnative.activity.MendixReactActivity;
import com.mendix.mendixnative.config.AppUrl;
Expand Down
4 changes: 0 additions & 4 deletions android/build.gradle
Expand Up @@ -14,10 +14,6 @@ buildscript {
maven {
url "https://maven.fabric.io/public"
}
maven {
// Local Maven repo containing AARs with JSC library built for Android
url "$rootDir/../node_modules/jsc-android/dist"
}
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.0")
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Expand Up @@ -16,3 +16,5 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
Binary file modified android/mendixnative-release/mendixnative-release.aar
Binary file not shown.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"postinstall": "npx jetify",
"test": "jest"
},
"dependencies": {
Expand Down Expand Up @@ -36,6 +37,7 @@
"@babel/runtime": "^7.5.4",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"jetifier": "^1.6.3",
"metro-react-native-babel-preset": "^0.55.0",
"react-test-renderer": "16.8.3"
},
Expand Down

0 comments on commit 2a43b7c

Please sign in to comment.