Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-notifications
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-notifications
Commits
35432ac0
Commit
35432ac0
authored
Sep 15, 2019
by
yogevbd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gradle resolve react-native version flavor
parent
1081242b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
example/android/myapplication/build.gradle
example/android/myapplication/build.gradle
+0
-1
lib/android/app/build.gradle
lib/android/app/build.gradle
+26
-0
No files found.
example/android/myapplication/build.gradle
View file @
35432ac0
...
...
@@ -23,7 +23,6 @@ android {
ndk
{
abiFilters
"armeabi-v7a"
,
"x86"
}
missingDimensionStrategy
"RNNotifications.reactNativeVersion"
,
"reactNative60"
}
buildTypes
{
release
{
...
...
lib/android/app/build.gradle
View file @
35432ac0
import
groovy.json.JsonSlurper
apply
plugin:
'com.android.library'
apply
from:
'../prepare-robolectric.gradle'
String
resolveFlavor
()
{
def
packageSlurper
=
new
JsonSlurper
()
def
reactNativePackageJson
=
packageSlurper
.
parse
file
(
'../../node_modules/react-native/package.json'
)
def
reactNativeVersion
=
reactNativePackageJson
.
version
List
versionComponents
=
reactNativeVersion
.
tokenize
(
'.'
)
if
(
versionComponents
[
1
].
toInteger
()
<
60
)
{
return
"reactNative59"
}
else
{
return
"reactNative60"
}
}
android
{
compileSdkVersion
27
buildToolsVersion
'28.0.3'
...
...
@@ -11,6 +27,7 @@ android {
versionCode
1
versionName
"1.0"
}
buildTypes
{
release
{
minifyEnabled
false
...
...
@@ -20,6 +37,7 @@ android {
debuggable
true
}
}
testOptions
{
unitTests
.
all
{
t
->
reports
{
...
...
@@ -49,6 +67,14 @@ android {
dimension
"RNNotifications.reactNativeVersion"
}
}
def
flavor
=
resolveFlavor
()
variantFilter
{
variant
->
def
names
=
variant
.
flavors
*.
name
if
(!
names
.
contains
(
flavor
))
{
setIgnore
(
true
)
}
}
}
dependencies
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment