Skip to content

Commit 7dbec32

Browse files
committed
m
1 parent 4c1bf8f commit 7dbec32

4 files changed

Lines changed: 26 additions & 80 deletions

File tree

android/build.gradle

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
buildscript {
2-
repositories {
3-
jcenter()
4-
}
5-
6-
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.3.3'
8-
}
9-
}
10-
111
apply plugin: 'com.android.library'
122

133
def _ext = rootProject.ext;
144

155
def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+';
16-
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 26;
17-
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '26.0.1';
6+
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 28;
7+
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '28.0.3';
188
def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16;
19-
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 26;
9+
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 28;
2010

2111
android {
2212
compileSdkVersion _compileSdkVersion
@@ -34,6 +24,9 @@ android {
3424
}
3525

3626
dependencies {
37-
//noinspection GradleDynamicVersion
38-
provided "com.facebook.react:react-native:${_reactNativeVersion}"
27+
if (GradleVersion.current() >= GradleVersion.version('4.1')) {
28+
compileOnly "com.facebook.react:react-native:${_reactNativeVersion}"
29+
} else {
30+
compile "com.facebook.react:react-native:${_reactNativeVersion}"
31+
}
3932
}

example/android/app/src/main/java/iyegoroff/RNTextGradientExample/MainActivity.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

example/android/app/src/main/java/iyegoroff/RNTextGradientExample/MainApplication.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

example/android/build.gradle

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ buildscript {
88
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
11+
1112
repositories {
12-
google()
1313
jcenter()
14+
google()
15+
maven {
16+
url "https://jitpack.io"
17+
}
1418
}
1519
dependencies {
1620
classpath 'com.android.tools.build:gradle:3.2.1'
@@ -23,17 +27,28 @@ buildscript {
2327
allprojects {
2428
repositories {
2529
mavenLocal()
26-
google()
2730
jcenter()
2831
maven {
2932
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
3033
url "$rootDir/../node_modules/react-native/android"
3134
}
35+
google()
3236
}
3337
}
3438

3539

3640
task wrapper(type: Wrapper) {
37-
gradleVersion = '4.7'
41+
gradleVersion = '4.4'
3842
distributionUrl = distributionUrl.replace("bin", "all")
3943
}
44+
45+
subprojects {
46+
afterEvaluate {project ->
47+
if (project.hasProperty("android")) {
48+
android {
49+
compileSdkVersion rootProject.ext.compileSdkVersion
50+
buildToolsVersion rootProject.ext.buildToolsVersion
51+
}
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)