Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
java-library-glpi
Commits
21c7ea91
Commit
21c7ea91
authored
Oct 26, 2017
by
Rafa Hernandez
Committed by
Alexander Salas Bastidas
Oct 26, 2017
Browse files
build(gradle): check empty values
parent
1365dd5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/build.gradle
View file @
21c7ea91
...
...
@@ -13,9 +13,13 @@ android {
}
buildTypes
{
buildTypes
.
each
{
it
.
buildConfigField
'String'
,
'GLPI_USER'
,
glpi_user
it
.
buildConfigField
'String'
,
'GLPI_PASSWORD'
,
glpi_password
it
.
buildConfigField
'String'
,
'GLPI_URL'
,
glpi_url
def
glpi_user_val
=
glpi_user
?:
"\"\""
def
glpi_password_val
=
glpi_password
?:
"\"\""
def
glpi_url_val
=
glpi_url
?:
"\"\""
it
.
buildConfigField
'String'
,
'GLPI_USER'
,
glpi_user_val
it
.
buildConfigField
'String'
,
'GLPI_PASSWORD'
,
glpi_password_val
it
.
buildConfigField
'String'
,
'GLPI_URL'
,
glpi_url_val
}
release
{
minifyEnabled
false
...
...
glpi/build.gradle
View file @
21c7ea91
...
...
@@ -17,12 +17,14 @@ android {
buildTypes
{
buildTypes
.
each
{
if
(
glpi_user
==
null
)
{
glpi_user
=
"-"
}
if
(
glpi_password
==
null
)
{
glpi_password
=
"-"
}
if
(
glpi_url
==
null
)
{
glpi_url
=
"-"
}
it
.
buildConfigField
'String'
,
'GLPI_USER'
,
glpi_user
it
.
buildConfigField
'String'
,
'GLPI_PASSWORD'
,
glpi_password
it
.
buildConfigField
'String'
,
'GLPI_URL'
,
glpi_url
def
glpi_user_val
=
glpi_user
?:
"\"\""
def
glpi_password_val
=
glpi_password
?:
"\"\""
def
glpi_url_val
=
glpi_url
?:
"\"\""
it
.
buildConfigField
'String'
,
'GLPI_USER'
,
glpi_user_val
it
.
buildConfigField
'String'
,
'GLPI_PASSWORD'
,
glpi_password_val
it
.
buildConfigField
'String'
,
'GLPI_URL'
,
glpi_url_val
}
release
{
minifyEnabled
false
...
...
Write
Preview
Supports
Markdown
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