Skip to content

Commit

Permalink
Update credential format for resolving conflicting between travis and…
Browse files Browse the repository at this point in the history
… local build
  • Loading branch information
W3-Mimo committed Feb 14, 2019
1 parent f471023 commit 0c9351b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
15 changes: 13 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,24 @@ repositories {
maven {
url "http://artifactory.rightmesh.io/artifactory/maven"
credentials {
username rightmesh_build_username

if (!hasRightMeshUsername)
username System.getenv('rightmesh_build_username')
else
username rightmesh_build_username

if (!hasRightMeshPassword)
password System.getenv('rightmesh_build_password')
else
password rightmesh_build_password

/*username rightmesh_build_username
if (username == null)
username System.getenv('rightmesh_build_username')
password rightmesh_build_password
if (password == null)
password System.getenv('rightmesh_build_password')
password System.getenv('rightmesh_build_password')*/
}
}
maven{
Expand Down
21 changes: 19 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
include ':app', ':viper'

def hasRightMeshUsername = hasProperty('rightmesh_build_username') &&
getProperty('rightmesh_build_username').toBoolean()
def hasRightMeshPassword = hasProperty('rightmesh_build_password') &&
getProperty('rightmesh_build_password').toBoolean()

pluginManagement.repositories {
jcenter()
google()
mavenCentral()
maven {
url 'https://artifactory.rightmesh.io/artifactory/maven'
credentials {
username System.getenv('rightmesh_build_username')

if (!hasRightMeshUsername)
username System.getenv('rightmesh_build_username')
else
username rightmesh_build_username

if (!hasRightMeshPassword)
password System.getenv('rightmesh_build_password')
else
password rightmesh_build_password

/*username System.getenv('rightmesh_build_username')
if (username == null)
username rightmesh_build_username
password System.getenv('rightmesh_build_password')
if (password == null)
password rightmesh_build_password
password rightmesh_build_password*/
}
}
}
Expand Down
20 changes: 18 additions & 2 deletions viper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def isDebugDatabaseEnabled = !project.hasProperty('org.w3.debugdb') ||//If not s
def isToastyEnabled = !project.hasProperty('org.w3.toasty') ||//If not specified then assume true
project.getProperty('org.w3.toasty').toBoolean()

def hasRightMeshUsername = hasProperty('rightmesh_build_username') &&
getProperty('rightmesh_build_username').toBoolean()
def hasRightMeshPassword = hasProperty('rightmesh_build_password') &&
getProperty('rightmesh_build_password').toBoolean()

if(isCrashLyticsEnabled) {
apply plugin: 'io.fabric'
}
Expand All @@ -22,13 +27,24 @@ repositories {
maven {
url "http://artifactory.rightmesh.io/artifactory/maven"
credentials {
username rightmesh_build_username

if (!hasRightMeshUsername)
username System.getenv('rightmesh_build_username')
else
username rightmesh_build_username

if (!hasRightMeshPassword)
password System.getenv('rightmesh_build_password')
else
password rightmesh_build_password

/*username rightmesh_build_username
if (username == null)
username System.getenv('rightmesh_build_username')
password rightmesh_build_password
if (password == null)
password System.getenv('rightmesh_build_password')
password System.getenv('rightmesh_build_password')*/
}
}
maven{
Expand Down

0 comments on commit 0c9351b

Please sign in to comment.