You have several options to try:
Option 1 - Server with admin access
If you have admin access to the server you could copy the play-services-tapandpay
folder to the server and refer to it in you gradle file (just like you did locally):
maven { url "file:*your server absolute path here*"}
Option 2 - AAR in the libs folder
You could put the play-services-tapandpay-x.y.z.aar
file in your project libs
folder and ensure you have the following in your build.gradle
file:
dependencies {
...
implementation fileTree(include: ['*.aar'], dir: 'libs')
...
}
You should also manually add all the dependencies from play-services-tapandpay-x.y.z.pom
to your build.gradle
.
Option 3 - Upload the files to a private Nexus Maven repository
The files you are required to upload are: maven-metadata.xml
, aar
and pom
.
You could use the UI or if you prefer the command line, these should be the commands:
curl -v -u $USERNAME:$PASSWORD \
--upload-file com/google/android/gms/play-services-tapandpay/maven-metadata.xml \
http://your.private.repository/repository/maven2-release-hosted/com/google/android/gms/play-services-tapandpay/maven-metadata.xml
curl -v -u $USERNAME:$PASSWORD \
--upload-file com/google/android/gms/play-services-tapandpay/x.y.z/play-services-tapandpay-x.y.z.pom \
http://your.private.repository/repository/maven2-release-hosted/com/google/android/gms/play-services-tapandpay/x.y.z/play-services-tapandpay-x.y.z.pom
curl -v -u $USERNAME:$PASSWORD \
--upload-file com/google/android/gms/play-services-tapandpay/x.y.z/play-services-tapandpay-x.y.z.aar \
http://your.private.repository/repository/maven2-release-hosted/com/google/android/gms/play-services-tapandpay/x.y.z/play-services-tapandpay-x.y.z.aar
Reference: https://support.sonatype.com/hc/en-us/articles/115006744008
Then in your settings.gradle
you need to add your private Maven repository:
maven {
url("http://your.private.repository/repository/maven2-group")
allowInsecureProtocol(true)
credentials {
username("$System.env.USERNAME")
password("$System.env.PASSWORD")
}
}
Finally, you can use the dependency in you build.gradle
:
implementation "com.google.android.gms:play-services-tapandpay:x.y.z"