@@ -27,9 +27,9 @@ android {
2727 dimension " dependency"
2828 applicationIdSuffix " .project"
2929 }
30- jcenterDependency {
30+ mavenCentralDependency {
3131 dimension " dependency"
32- applicationIdSuffix " .jcenter "
32+ applicationIdSuffix " .mavenCentral "
3333 }
3434 appCenter {
3535 dimension " distribute"
@@ -55,8 +55,28 @@ android {
5555}
5656
5757repositories {
58+
59+ // Load credentials from local.properties file.
60+ File propertiesFile = project. rootProject. file(' local.properties' )
61+ def AZURE_USERNAME = null
62+ def AZURE_PASSWORD = null
63+
64+ // Check that file exist.
65+ if (propertiesFile. exists()) {
66+ Properties properties = new Properties ()
67+ properties. load(propertiesFile. newDataInputStream())
68+
69+ // Get properties. If properties aren't exist it returns null.
70+ AZURE_USERNAME = properties. getProperty(' AZURE_USERNAME' )
71+ AZURE_PASSWORD = properties. getProperty(' AZURE_PASSWORD' )
72+ }
73+
5874 maven {
59- url " https://dl.bintray.com/vsappcenter/appcenter-snapshot"
75+ credentials {
76+ username = AZURE_USERNAME
77+ password = AZURE_PASSWORD
78+ }
79+ url " https://msmobilecenter.pkgs.visualstudio.com/_packaging/AppCenter/maven/v1/"
6080 }
6181}
6282
@@ -70,16 +90,16 @@ dependencies {
7090 projectDependencyImplementation project(' :sdk:appcenter-crashes' )
7191
7292 def appCenterSdkVersion = " 4.1.0"
73- jcenterDependencyImplementation " com.microsoft.appcenter:appcenter-analytics:${ appCenterSdkVersion} "
74- jcenterDependencyImplementation " com.microsoft.appcenter:appcenter-crashes:${ appCenterSdkVersion} "
93+ mavenCentralDependencyImplementation " com.microsoft.appcenter:appcenter-analytics:${ appCenterSdkVersion} "
94+ mavenCentralDependencyImplementation " com.microsoft.appcenter:appcenter-crashes:${ appCenterSdkVersion} "
7595
7696 def taskRequests = getGradle(). getStartParameter(). getTaskRequests(). toString()
7797 if (taskRequests. contains(" GooglePlay" )) {
7898 projectDependencyImplementation project(' :sdk:appcenter-distribute-play' )
79- jcenterDependencyImplementation " com.microsoft.appcenter:appcenter-distribute-play:${ appCenterSdkVersion} "
99+ mavenCentralDependencyImplementation " com.microsoft.appcenter:appcenter-distribute-play:${ appCenterSdkVersion} "
80100 } else {
81101 projectDependencyImplementation project(' :sdk:appcenter-distribute' )
82- jcenterDependencyImplementation " com.microsoft.appcenter:appcenter-distribute:${ appCenterSdkVersion} "
102+ mavenCentralDependencyImplementation " com.microsoft.appcenter:appcenter-distribute:${ appCenterSdkVersion} "
83103 }
84104
85105 androidTestImplementation ' com.android.support.test:rules:1.0.2'
0 commit comments